Class: ProteusClient::Representers::Recording

Inherits:
Object
  • Object
show all
Defined in:
lib/proteus_client/representers/recording.rb

Instance Method Summary collapse

Constructor Details

#initialize(raw_response) ⇒ Recording

Returns a new instance of Recording.



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/proteus_client/representers/recording.rb', line 5

def initialize(raw_response)
  response = JSON.parse(raw_response)

  @properties = { 
    id: response['id'],
    adobe_rtmpe_file:  response['_links']['adobe_rtmpe:file']['href'],
    adobe_rtmpe_write: response['_links']['adobe_rtmpe:write']['href'],
    adobe_rtmpe_read:  response['_links']['adobe_rtmpe:read']['href'],
    generic_https:     response['_links']['generic_https']['href']
  }
end

Instance Method Details

#to_hashObject



17
18
19
# File 'lib/proteus_client/representers/recording.rb', line 17

def to_hash
  @properties
end