Module: Fluxx
- Defined in:
- lib/fluxx/resources.rb,
lib/fluxx/token.rb,
lib/fluxx/version.rb,
lib/fluxx/resource.rb
Overview
Fluxx lightweight API wrapper
Defined Under Namespace
Constant Summary collapse
- VERSION =
'0.1.5'
- CORE_MODELS =
Core Fluxx API resource mappings.
{ GrantRequest: 'grant_request', RequestReport: 'request_report', RequestOrganization: 'request_organization', RequestUser: 'request_user', RequestTransaction: 'request_transaction', Organization: 'organization', Program: 'program', SubProgram: 'sub_program', ModelDocument: 'model_document', User: 'user', GeoCountry: 'geo_country', GeoState: 'geo_state' }
Class Method Summary collapse
-
.define_model(model_name, api_path) ⇒ Class
Helper to define the mapped models.
Class Method Details
.define_model(model_name, api_path) ⇒ Class
Helper to define the mapped models
24 25 26 27 28 |
# File 'lib/fluxx/resources.rb', line 24 def self.define_model(model_name, api_path) new_resource = Class.new(Resource) new_resource.path("/api/rest/v2/#{api_path}") const_set(model_name, new_resource) end |