Class: Openlive::MasterBuilder
- Defined in:
- lib/openlive/master_builder.rb
Instance Attribute Summary
Attributes inherited from Base
Class Method Summary collapse
-
.all ⇒ Array<MasterBuilder>
Fetch and return a list of all master builder units.
-
.find(id) ⇒ MasterBuilder
Find and return a masterbuilder record.
Methods inherited from Base
connection, #connection, handle_response, #initialize, #method_missing, #oauth, oauth, #refresh
Constructor Details
This class inherits a constructor from Openlive::Base
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Openlive::Base
Class Method Details
.all ⇒ Array<MasterBuilder>
Fetch and return a list of all master builder units
21 22 23 24 25 26 27 28 29 |
# File 'lib/openlive/master_builder.rb', line 21 def all response = Request.get("masterbuilders") handle_response(response, error_class: Openlive::APIError) do |response| response.body['data'].map do |mb| new(mb, response: response) end end end |
.find(id) ⇒ MasterBuilder
Find and return a masterbuilder record
9 10 11 12 13 14 15 |
# File 'lib/openlive/master_builder.rb', line 9 def find(id) response = Request.get("masterbuilders/#{id}") handle_response(response, error_class: APIError) do |response| new(response.body, response: response) end end |