Class: Stagebloc
- Inherits:
-
Object
- Object
- Stagebloc
- Defined in:
- lib/stagebloc.rb
Constant Summary collapse
- BASE_URL =
"https://api.stagebloc.com/v1"
Instance Method Summary collapse
- #account(account_id) ⇒ Object
- #children_for_account(account_id) ⇒ Object
- #get_audio(account_id, audio_id) ⇒ Object
-
#initialize(client_id) ⇒ Stagebloc
constructor
A new instance of Stagebloc.
Constructor Details
#initialize(client_id) ⇒ Stagebloc
Returns a new instance of Stagebloc.
5 6 7 |
# File 'lib/stagebloc.rb', line 5 def initialize client_id @client ||= "client_id=#{client_id}" end |
Instance Method Details
#account(account_id) ⇒ Object
9 10 11 |
# File 'lib/stagebloc.rb', line 9 def account account_id get "#{BASE_URL}/account/#{account_id}?#{@client}" end |
#children_for_account(account_id) ⇒ Object
13 14 15 |
# File 'lib/stagebloc.rb', line 13 def children_for_account account_id get("#{BASE_URL}/account/#{account_id}/children?#{@client}")['child_accounts'] end |
#get_audio(account_id, audio_id) ⇒ Object
17 18 19 |
# File 'lib/stagebloc.rb', line 17 def get_audio account_id, audio_id get "#{BASE_URL}/account/#{account_id}/audio/#{audio_id}?#{@client}" end |