Class: Harkness::EventResource
- Defined in:
- lib/harkness/resources/event.rb
Overview
The event resource.
Instance Attribute Summary
Attributes inherited from Resource
Instance Method Summary collapse
-
#characters(event_id:) ⇒ Harkness::CharaacterDataWrapper
Get a list of characters for a particular event.
-
#comics(event_id:) ⇒ Harkness::ComicDataWrapper
Get a list of comics for a particular event.
-
#creators(event_id:) ⇒ Harkness::CreatorDataWrapper
Get a list of creators for a particular event.
-
#list(**params) ⇒ Harkness::EventDataWrapper
Get a list of events.
-
#retrieve(event_id:) ⇒ Harkness::EventDataWrapper
Get a single event.
-
#series(event_id:) ⇒ Harkness::SeriesDataWrapper
Get a list of series for a particular event.
-
#stories(event_id:) ⇒ Harkness::StoryDataWrapper
Get a list of stories for a particular event.
Methods inherited from Resource
Constructor Details
This class inherits a constructor from Harkness::Resource
Instance Method Details
#characters(event_id:) ⇒ Harkness::CharaacterDataWrapper
Get a list of characters for a particular event.
59 60 61 |
# File 'lib/harkness/resources/event.rb', line 59 def characters(event_id:) CharacterDataWrapper.from_json(get_request("events/#{event_id}/characters").body) end |
#comics(event_id:) ⇒ Harkness::ComicDataWrapper
Get a list of comics for a particular event.
32 33 34 |
# File 'lib/harkness/resources/event.rb', line 32 def comics(event_id:) ComicDataWrapper.from_json(get_request("events/#{event_id}/comics").body) end |
#creators(event_id:) ⇒ Harkness::CreatorDataWrapper
Get a list of creators for a particular event.
68 69 70 |
# File 'lib/harkness/resources/event.rb', line 68 def creators(event_id:) CreatorDataWrapper.from_json(get_request("events/#{event_id}/creators").body) end |
#list(**params) ⇒ Harkness::EventDataWrapper
Get a list of events.
14 15 16 |
# File 'lib/harkness/resources/event.rb', line 14 def list(**params) EventDataWrapper.from_json(get_request("events", params: params).body) end |
#retrieve(event_id:) ⇒ Harkness::EventDataWrapper
Get a single event.
23 24 25 |
# File 'lib/harkness/resources/event.rb', line 23 def retrieve(event_id:) EventDataWrapper.from_json(get_request("events/#{event_id}").body) end |
#series(event_id:) ⇒ Harkness::SeriesDataWrapper
Get a list of series for a particular event.
41 42 43 |
# File 'lib/harkness/resources/event.rb', line 41 def series(event_id:) SeriesDataWrapper.from_json(get_request("events/#{event_id}/series").body) end |
#stories(event_id:) ⇒ Harkness::StoryDataWrapper
Get a list of stories for a particular event.
50 51 52 |
# File 'lib/harkness/resources/event.rb', line 50 def stories(event_id:) StoryDataWrapper.from_json(get_request("events/#{event_id}/stories").body) end |