Class: Goraku::Client

Inherits:
Object
  • Object
show all
Includes:
Authentication, Log, Program, Recorded, Recording, Reserves, Rules, Schedule, Scheduler, Status, Storage, Configurable
Defined in:
lib/goraku/client.rb,
lib/goraku/client/log.rb,
lib/goraku/client/rules.rb,
lib/goraku/client/status.rb,
lib/goraku/client/program.rb,
lib/goraku/client/storage.rb,
lib/goraku/client/recorded.rb,
lib/goraku/client/reserves.rb,
lib/goraku/client/schedule.rb,
lib/goraku/client/recording.rb,
lib/goraku/client/scheduler.rb

Defined Under Namespace

Modules: Log, Program, Recorded, Recording, Reserves, Rules, Schedule, Scheduler, Status, Storage

Instance Attribute Summary

Attributes included from Configurable

#api_endpoint, #connection_options, #login, #middleware, #password, #proxy

Instance Method Summary collapse

Methods included from Storage

#storage

Methods included from Status

#status

Methods included from Scheduler

#exec_scheduler, #force_scheduler, #scheduler

Methods included from Schedule

#schedule, #schedule_broadcasting, #schedule_channel, #schedule_channel_broadcasting, #schedule_channel_programs, #schedule_programs

Methods included from Rules

#add_rule, #delete_rule, #rule, #rule_disable, #rule_enable, #rules, #update_rule

Methods included from Reserves

#delete_reserved_program, #reserves, #reserves_program, #skip_reserved_program, #unskip_reserved_program

Methods included from Recording

#recording, #recording_program, #recording_program_preview, #stop_recording_program, #watch_recording_program

Methods included from Recorded

#delete_recorded_program, #recorded, #recorded_program, #recorded_program_file, #recorded_program_preview, #watch_recorded_program

Methods included from Program

#program, #reserve_program

Methods included from Log

#operator_log, #scheduler_log, #wui_log

Methods included from Authentication

#basic_authenticated?

Methods included from Configurable

#configure, keys

Constructor Details

#initialize(options = {}) ⇒ Client

Returns a new instance of Client.



34
35
36
37
38
# File 'lib/goraku/client.rb', line 34

def initialize(options = {})
  Configurable.keys.each do |key|
    instance_variable_set(:"@#{key}", options[key] || Goraku.instance_variable_get(:"@#{key}"))
  end
end

Instance Method Details

#delete(path, options = {}) ⇒ Object



48
49
50
# File 'lib/goraku/client.rb', line 48

def delete(path, options = {})
  request :delete, path, options
end

#get(path, options = {}) ⇒ Object



40
41
42
# File 'lib/goraku/client.rb', line 40

def get(path, options = {})
  request :get, path, options
end

#inspectObject



56
57
58
59
# File 'lib/goraku/client.rb', line 56

def inspect
  inspected = super
  inspected.gsub! @password, "*****" if @password
end

#put(path, options = {}) ⇒ Object



44
45
46
# File 'lib/goraku/client.rb', line 44

def put(path, options = {})
  request :put, path, options
end

#rootObject



52
53
54
# File 'lib/goraku/client.rb', line 52

def root
  get '/'
end