Class: Timepad::Event
Instance Method Summary collapse
-
#create(attrs) ⇒ Array
Create event.
-
#export(event_id, attrs = nil) ⇒ Array
Get event members.
-
#get(event_id) ⇒ Array
Get event by event_id.
-
#get_list(attrs = {}) ⇒ Array
Get all events.
-
#initialize(timepad_client) ⇒ Event
constructor
A new instance of Event.
-
#register(attrs) ⇒ Object
Register event member.
Methods inherited from Base
#make_query, #make_uri, #request, #subscribers_to_hash
Constructor Details
#initialize(timepad_client) ⇒ Event
Returns a new instance of Event.
4 5 6 |
# File 'lib/timepad/event.rb', line 4 def initialize(timepad_client) @client = timepad_client end |
Instance Method Details
#create(attrs) ⇒ Array
Create event
38 39 40 |
# File 'lib/timepad/event.rb', line 38 def create(attrs) request 'create', attrs end |
#export(event_id, attrs = nil) ⇒ Array
Get event members
28 29 30 31 32 |
# File 'lib/timepad/event.rb', line 28 def export(event_id, attrs = nil) request_attrs = {:e_id => event_id} request_attrs.merge!(attrs) unless attrs.nil? request 'export', request_attrs end |
#get(event_id) ⇒ Array
Get event by event_id
20 21 22 |
# File 'lib/timepad/event.rb', line 20 def get(event_id) request 'get', :e_id => event_id end |
#get_list(attrs = {}) ⇒ Array
Get all events
12 13 14 |
# File 'lib/timepad/event.rb', line 12 def get_list(attrs = {}) request 'getlist', attrs end |
#register(attrs) ⇒ Object
Register event member
46 47 48 |
# File 'lib/timepad/event.rb', line 46 def register(attrs) request 'register', attrs end |