Class: Psapi::BroadcastHistory

Inherits:
API_Object show all
Extended by:
PeercastStation
Defined in:
lib/psapi/broadcast_history.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from PeercastStation

initialize, method_missing

Methods inherited from API_Object

accessors_for, define_all_with, inherited, #mass_assign

Methods included from Internal

camel_to_snake

Constructor Details

#initialize(hash = {}) ⇒ BroadcastHistory

Returns a new instance of BroadcastHistory.



17
18
19
# File 'lib/psapi/broadcast_history.rb', line 17

def initialize(hash = {})
  super
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Psapi::PeercastStation

Class Method Details

.allObject



5
6
7
8
9
# File 'lib/psapi/broadcast_history.rb', line 5

def all
  getBroadcastHistory.map do |hist|
    BroadcastHistory.new(hist)
  end
end

Instance Method Details

#saveObject



21
22
23
# File 'lib/psapi/broadcast_history.rb', line 21

def save
  addBroadcastHistory(info: to_hash)
end