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