Module: GogoKit::Client::Event
Overview
GogoKit::Client methods for getting events
Instance Method Summary collapse
-
#get_event(event_id, options = {}) ⇒ GogoKit::Event
Retrieves a event by ID.
-
#get_events_by_category(category_id, options = {}) ⇒ GogoKit::PagedResource
Retrieves all events in a particular category.
Methods included from Utils
Instance Method Details
#get_event(event_id, options = {}) ⇒ GogoKit::Event
Retrieves a event by ID
15 16 17 18 19 20 21 22 23 |
# File 'lib/gogokit/client/event.rb', line 15 def get_event(event_id, = {}) root = get_root object_from_response(GogoKit::Event, GogoKit::EventRepresenter, :get, "#{root.links['self'].href}/events/" \ "#{event_id}", ) end |
#get_events_by_category(category_id, options = {}) ⇒ GogoKit::PagedResource
Retrieves all events in a particular category
30 31 32 33 34 35 36 37 38 |
# File 'lib/gogokit/client/event.rb', line 30 def get_events_by_category(category_id, = {}) root = get_root object_from_response(GogoKit::PagedResource, GogoKit::EventsRepresenter, :get, "#{root.links['self'].href}/categories/" \ "#{category_id}/events", ) end |