0.0
No commit activity in last 3 years
No release in over 3 years
Instead of translating method calls into ORM, APIcasso Brush retrieves it's data from your configured service. This makes it possible to make a convergent application, that gets data from multiple API sources.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

 Project Readme

APIcasso Brush Build Status Maintainability Test Coverage Inline docs

Consume your APIcasso microservices

This is a client to consume data from microservices built upon APIcasso. It makes PORO classes supercharged by injecting Rails-like behavior through the methods:

  • find()
  • all()
  • where()
  • save

Instead of translating those calls into ORM APIcasso Brush retrieves it's data from your configured service. This makes it possible to make a convergent application, that gets data from multiple API sources.

Usage

To start consuming from your services just create a class inheriting from Apicasso::Brush and declare how APIcasso should stroke the brush. First declare the base for current class, which is a index action from your API for the given resource, then pass a token that has access into that resource.

class ModelFromService < Apicasso::Brush
  brush_on 'http://my.service.com/model',
           token: '5e1057e7a51ee7a55',
           include: :a_relation, :a_method # Optional
end

You can also by default include relations or methods that should get built into your ModelFromService objects.

Installation

Add this line to your application's Gemfile:

gem 'apicasso_brush'

And then execute:

$ bundle

Or install it yourself as:

$ gem install apicasso_brush

License

The gem is available as open source under the terms of the MIT License.