Class: Wowzer::Interview

Inherits:
Resource show all
Defined in:
lib/wowzer/interview.rb

Instance Attribute Summary

Attributes inherited from Resource

#resource

Instance Method Summary collapse

Methods inherited from Resource

all, client, find, #initialize, #method_missing

Constructor Details

This class inherits a constructor from Wowzer::Resource

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Wowzer::Resource

Instance Method Details

#applicationsObject



4
5
6
7
8
# File 'lib/wowzer/interview.rb', line 4

def applications
  applications_link.embedded['wowzer:application'].map do |application_resource|
    Application.new(application_resource)
  end
end


10
11
12
# File 'lib/wowzer/interview.rb', line 10

def applications_link
  resource.links['wowzer:applications']
end

#create_application(options = {}) ⇒ Object



14
15
16
17
18
19
# File 'lib/wowzer/interview.rb', line 14

def create_application(options={})
  response = applications_link.post(options)
  resource = ::Hyperclient::Resource.new(response.body, self.class.client)

  Application.new(resource)
end