Class: Qubell::API
Overview
Implements wrapper for Qubell API
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ API
constructor
A new instance of API.
-
#organizations ⇒ Array<Qubell::Organization>
Get list of all organizations that current user belong to.
Methods inherited from Base
#==, #to_hash, #to_json, #to_s
Constructor Details
#initialize(options = {}) ⇒ API
Returns a new instance of API.
24 25 26 27 28 |
# File 'lib/qubell_api.rb', line 24 def initialize( = {}) .each do |key| Qubell.configuration.send("#{key[0]}=", key[1]) end end |
Instance Method Details
#organizations ⇒ Array<Qubell::Organization>
Get list of all organizations that current user belong to.
32 33 34 35 36 |
# File 'lib/qubell_api.rb', line 32 def organizations Qubell::APICall.get('/organizations').map do |org| Qubell::Organization.new(org) end end |