Module: Goraku::Client::Recorded

Included in:
Goraku::Client
Defined in:
lib/goraku/client/recorded.rb

Instance Method Summary collapse

Instance Method Details

#delete_recorded_program(program_id) ⇒ Object



13
14
15
# File 'lib/goraku/client/recorded.rb', line 13

def delete_recorded_program(program_id)
  delete "/recorded/#{program_id}.json"
end

#recordedObject



5
6
7
# File 'lib/goraku/client/recorded.rb', line 5

def recorded
  get '/recorded.json'
end

#recorded_program(program_id) ⇒ Object



9
10
11
# File 'lib/goraku/client/recorded.rb', line 9

def recorded_program(program_id)
  get "/recorded/#{program_id}.json"
end

#recorded_program_file(program_id, format = 'json') ⇒ Object



17
18
19
# File 'lib/goraku/client/recorded.rb', line 17

def recorded_program_file(program_id, format = 'json')
  get "/recorded/#{program_id}/file.#{format}"
end

#recorded_program_preview(program_id, format = 'png', options = {}) ⇒ Object

Raises:

  • (StandardError)


21
22
23
24
25
26
27
# File 'lib/goraku/client/recorded.rb', line 21

def recorded_program_preview(program_id, format = 'png', options = {})
  raise StandardError.new unless ['png', 'jpg', 'txt'].include?(format)
  default_options = {pos: 7, width: 320, height: 180}
  options = options.merge(default_options)

  get "/recorded/#{program_id}/preview.#{format}", options
end

#watch_recorded_program(program_id) ⇒ Object

Not implemented

Raises:

  • (NotImplementedError)


30
31
32
# File 'lib/goraku/client/recorded.rb', line 30

def watch_recorded_program(program_id)
  raise NotImplementedError.new
end