Class: Marvel::Client
- Inherits:
-
Object
- Object
- Marvel::Client
- Includes:
- Configuration, Connection, Request
- Defined in:
- lib/marvel/client.rb
Constant Summary
Constants included from Connection
Marvel::Connection::BASE_API_URL, Marvel::Connection::HEADERS
Instance Attribute Summary
Attributes included from Configuration
Attributes included from Response
#code, #count, #etag, #limit, #offset, #status, #total
Instance Method Summary collapse
-
#character(id, options = {}) ⇒ Object
fetches a single character by id.
-
#character_comics(id, options = {}) ⇒ Object
fetches lists of comics filtered by a character id.
-
#character_events(id, options = {}) ⇒ Object
fetches lists of events filtered by a character id.
-
#character_series(id, options = {}) ⇒ Object
fetches lists of series filtered by a character id.
-
#character_stories(id, options = {}) ⇒ Object
fetches lists of stories filtered by a character id.
-
#characters(options = {}) ⇒ Object
fetches lists of characters.
-
#comic(id, options = {}) ⇒ Object
fetches a single comic by id.
-
#comic_characters(id, options = {}) ⇒ Object
fetches lists of characters filtered by a comic id.
-
#comic_creators(id, options = {}) ⇒ Object
fetches lists of creators filtered by a comic id.
-
#comic_events(id, options = {}) ⇒ Object
fetches lists of events filtered by a comic id.
-
#comic_stories(id, options = {}) ⇒ Object
fetches lists of stories filtered by a comic id.
-
#comics(options = {}) ⇒ Object
fetches lists of comics.
-
#creator(id, options = {}) ⇒ Object
fetches a single creator by id.
-
#creator_comics(id, options = {}) ⇒ Object
fetches lists of comics filtered by a creator id.
-
#creator_events(id, options = {}) ⇒ Object
fetches lists of events filtered by a creator id.
-
#creator_series(id, options = {}) ⇒ Object
fetches lists of series filtered by a creator id.
-
#creator_stories(id, options = {}) ⇒ Object
fetches lists of stories filtered by a creator id.
-
#creators(options = {}) ⇒ Object
fetches lists of creators.
-
#event(id, options = {}) ⇒ Object
fetches a single event by id.
-
#event_characters(id, options = {}) ⇒ Object
fetches lists of characters filtered by an event id.
-
#event_comics(id, options = {}) ⇒ Object
fetches lists of comics filtered by an event id.
-
#event_creators(id, options = {}) ⇒ Object
fetches lists of creators filtered by an event id.
-
#event_series(id, options = {}) ⇒ Object
fetches lists of series filtered by an event id.
-
#event_stories(id, options = {}) ⇒ Object
fetches lists of stories filtered by an event id.
-
#events(options = {}) ⇒ Object
fetches lists of events.
-
#initialize ⇒ Client
constructor
A new instance of Client.
-
#serie(id, options = {}) ⇒ Object
fetches a single comic series by id.
-
#series(options = {}) ⇒ Object
fetches lists of series.
-
#series_characters(id, options = {}) ⇒ Object
fetches lists of characters filtered by a series id.
-
#series_comics(id, options = {}) ⇒ Object
fetches lists of comics filtered by a series id.
-
#series_creators(id, options = {}) ⇒ Object
fetches lists of creators filtered by a series id.
-
#series_events(id, options = {}) ⇒ Object
fetches lists of events filtered by a series id.
-
#series_stories(id, options = {}) ⇒ Object
fetches lists of stories filtered by a series id.
-
#stories(options = {}) ⇒ Object
fetches lists of stories.
-
#story(id, options = {}) ⇒ Object
fetches a single comic story by id.
-
#story_characters(id, options = {}) ⇒ Object
fetches lists of characters filtered by a story id.
-
#story_comics(id, options = {}) ⇒ Object
fetches lists of comics filtered by a story id.
-
#story_creators(id, options = {}) ⇒ Object
fetches lists of creators filtered by a story id.
-
#story_events(id, options = {}) ⇒ Object
fetches lists of events filtered by a story id.
-
#story_series(id, options = {}) ⇒ Object
fetches lists of series filtered by a story id.
Methods included from Configuration
Methods included from Request
Methods included from Response
Constructor Details
#initialize ⇒ Client
Returns a new instance of Client.
15 16 17 |
# File 'lib/marvel/client.rb', line 15 def initialize reset end |
Instance Method Details
#character(id, options = {}) ⇒ Object
fetches a single character by id
38 39 40 41 |
# File 'lib/marvel/client.rb', line 38 def character(id, = {}) # v1/public/characters/{characterId} get("characters/#{id}", ) end |
#character_comics(id, options = {}) ⇒ Object
fetches lists of comics filtered by a character id
44 45 46 47 |
# File 'lib/marvel/client.rb', line 44 def character_comics(id, = {}) # v1/public/characters/{characterId}/comics get("characters/#{id}/comics", ) end |
#character_events(id, options = {}) ⇒ Object
fetches lists of events filtered by a character id
50 51 52 53 |
# File 'lib/marvel/client.rb', line 50 def character_events(id, = {}) # v1/public/characters/{characterId}/events get("characters/#{id}/events", ) end |
#character_series(id, options = {}) ⇒ Object
fetches lists of series filtered by a character id
56 57 58 59 |
# File 'lib/marvel/client.rb', line 56 def character_series(id, = {}) # vi/public/characters/{characterId}/series get("characters/#{id}/series", ) end |
#character_stories(id, options = {}) ⇒ Object
fetches lists of stories filtered by a character id
62 63 64 65 |
# File 'lib/marvel/client.rb', line 62 def character_stories(id, = {}) # v1/public/characters/{characterId}/stories get("characters/#{id}/stories", ) end |
#characters(options = {}) ⇒ Object
fetches lists of characters
32 33 34 35 |
# File 'lib/marvel/client.rb', line 32 def characters( = {}) # v1/public/characters get('characters', ) end |
#comic(id, options = {}) ⇒ Object
fetches a single comic by id
76 77 78 79 |
# File 'lib/marvel/client.rb', line 76 def comic(id, = {}) # v1/public/comics/{comicId} get("comics/#{id}", ) end |
#comic_characters(id, options = {}) ⇒ Object
fetches lists of characters filtered by a comic id
82 83 84 85 |
# File 'lib/marvel/client.rb', line 82 def comic_characters(id, = {}) # v1/public/comics/{comicId}/characters get("comics/#{id}/characters", ) end |
#comic_creators(id, options = {}) ⇒ Object
fetches lists of creators filtered by a comic id
88 89 90 91 |
# File 'lib/marvel/client.rb', line 88 def comic_creators(id, = {}) # v1/public/comics/{comicId}/creators get("comics/#{id}/creators", ) end |
#comic_events(id, options = {}) ⇒ Object
fetches lists of events filtered by a comic id
94 95 96 97 |
# File 'lib/marvel/client.rb', line 94 def comic_events(id, = {}) # v1/public/comics/{comicId}/events get("comics/#{id}/events", ) end |
#comic_stories(id, options = {}) ⇒ Object
fetches lists of stories filtered by a comic id
100 101 102 103 |
# File 'lib/marvel/client.rb', line 100 def comic_stories(id, = {}) # v1/public/comics/{comicId}/stories get("comics/#{id}/stories", ) end |
#comics(options = {}) ⇒ Object
fetches lists of comics
70 71 72 73 |
# File 'lib/marvel/client.rb', line 70 def comics( = {}) # v1/public/comics get('comics', ) end |
#creator(id, options = {}) ⇒ Object
fetches a single creator by id
114 115 116 117 |
# File 'lib/marvel/client.rb', line 114 def creator(id, = {}) # v1/public/creators/{creatorId} get("creators/#{id}", ) end |
#creator_comics(id, options = {}) ⇒ Object
fetches lists of comics filtered by a creator id
120 121 122 123 |
# File 'lib/marvel/client.rb', line 120 def creator_comics(id, = {}) # v1/public/creators/{creatorId}/comics get("creators/#{id}/comics", ) end |
#creator_events(id, options = {}) ⇒ Object
fetches lists of events filtered by a creator id
126 127 128 129 |
# File 'lib/marvel/client.rb', line 126 def creator_events(id, = {}) # v1/public/creators/{creatorId}/events get("creators/#{id}/events", ) end |
#creator_series(id, options = {}) ⇒ Object
fetches lists of series filtered by a creator id
132 133 134 135 |
# File 'lib/marvel/client.rb', line 132 def creator_series(id, = {}) # v1/public/creators/{creatorId}/series get("creators/#{id}/series", ) end |
#creator_stories(id, options = {}) ⇒ Object
fetches lists of stories filtered by a creator id
138 139 140 141 |
# File 'lib/marvel/client.rb', line 138 def creator_stories(id, = {}) # v1/public/creators/{creatorId}/stories get("creators/#{id}/stories", ) end |
#creators(options = {}) ⇒ Object
fetches lists of creators
108 109 110 111 |
# File 'lib/marvel/client.rb', line 108 def creators( = {}) # v1/public/creators get('creators', ) end |
#event(id, options = {}) ⇒ Object
fetches a single event by id
152 153 154 155 |
# File 'lib/marvel/client.rb', line 152 def event(id, = {}) # v1/public/events/{eventId} get("events/#{id}", ) end |
#event_characters(id, options = {}) ⇒ Object
fetches lists of characters filtered by an event id
158 159 160 161 |
# File 'lib/marvel/client.rb', line 158 def event_characters(id, = {}) # v1/public/events/{eventId}/characters get("events/#{id}/characters", ) end |
#event_comics(id, options = {}) ⇒ Object
fetches lists of comics filtered by an event id
164 165 166 167 |
# File 'lib/marvel/client.rb', line 164 def event_comics(id, = {}) # v1/public/events/{eventId}/comics get("events/#{id}/comics", ) end |
#event_creators(id, options = {}) ⇒ Object
fetches lists of creators filtered by an event id
170 171 172 173 |
# File 'lib/marvel/client.rb', line 170 def event_creators(id, = {}) # v1/public/events/{eventId}/creators get("events/#{id}/creators", ) end |
#event_series(id, options = {}) ⇒ Object
fetches lists of series filtered by an event id
176 177 178 179 |
# File 'lib/marvel/client.rb', line 176 def event_series(id, = {}) # vi/public/events/{eventId}/series get("events/#{id}/series", ) end |
#event_stories(id, options = {}) ⇒ Object
fetches lists of stories filtered by an event id
182 183 184 185 |
# File 'lib/marvel/client.rb', line 182 def event_stories(id, = {}) # v1/public/events/{eventId}/stories get("events/#{id}/stories", ) end |
#events(options = {}) ⇒ Object
fetches lists of events
146 147 148 149 |
# File 'lib/marvel/client.rb', line 146 def events( = {}) # v1/public/events get('events', ) end |
#serie(id, options = {}) ⇒ Object
fetches a single comic series by id
197 198 199 200 |
# File 'lib/marvel/client.rb', line 197 def serie(id, = {}) # v1/public/series/{seriesId} get("series/#{id}", ) end |
#series(options = {}) ⇒ Object
fetches lists of series
191 192 193 194 |
# File 'lib/marvel/client.rb', line 191 def series( = {}) # v1/public/series get('series', ) end |
#series_characters(id, options = {}) ⇒ Object
fetches lists of characters filtered by a series id
203 204 205 206 |
# File 'lib/marvel/client.rb', line 203 def series_characters(id, = {}) # v1/public/series/{seriesId}/characters get("series/#{id}/characters", ) end |
#series_comics(id, options = {}) ⇒ Object
fetches lists of comics filtered by a series id
209 210 211 212 |
# File 'lib/marvel/client.rb', line 209 def series_comics(id, = {}) # v1/public/series/{seriesId}/comics get("series/#{id}/comics", ) end |
#series_creators(id, options = {}) ⇒ Object
fetches lists of creators filtered by a series id
215 216 217 218 |
# File 'lib/marvel/client.rb', line 215 def series_creators(id, = {}) # v1/public/series/{seriesId}/creators get("series/#{id}/creators", ) end |
#series_events(id, options = {}) ⇒ Object
fetches lists of events filtered by a series id
221 222 223 224 |
# File 'lib/marvel/client.rb', line 221 def series_events(id, = {}) # v1/public/series/{seriesId}/events get("series/#{id}/events", ) end |
#series_stories(id, options = {}) ⇒ Object
fetches lists of stories filtered by a series id
227 228 229 230 |
# File 'lib/marvel/client.rb', line 227 def series_stories(id, = {}) # v1/public/series/{seriesId}/stories get("series/#{id}/stories", ) end |
#stories(options = {}) ⇒ Object
fetches lists of stories
235 236 237 238 |
# File 'lib/marvel/client.rb', line 235 def stories( = {}) # v1/public/stories get('stories', ) end |
#story(id, options = {}) ⇒ Object
fetches a single comic story by id
241 242 243 244 |
# File 'lib/marvel/client.rb', line 241 def story(id, = {}) # v1/public/stories/{storyId} get("stories/#{id}", ) end |
#story_characters(id, options = {}) ⇒ Object
fetches lists of characters filtered by a story id
247 248 249 250 |
# File 'lib/marvel/client.rb', line 247 def story_characters(id, = {}) # v1/public/stories/{storyId}/characters get("stories/#{id}/characters", ) end |
#story_comics(id, options = {}) ⇒ Object
fetches lists of comics filtered by a story id
253 254 255 256 |
# File 'lib/marvel/client.rb', line 253 def story_comics(id, = {}) # v1/public/stories/{storyId}/comics get("stories/#{id}/comics", ) end |
#story_creators(id, options = {}) ⇒ Object
fetches lists of creators filtered by a story id
259 260 261 262 |
# File 'lib/marvel/client.rb', line 259 def story_creators(id, = {}) # v1/public/stories/{storyId}/creators get("stories/#{id}/creators", ) end |
#story_events(id, options = {}) ⇒ Object
fetches lists of events filtered by a story id
265 266 267 268 |
# File 'lib/marvel/client.rb', line 265 def story_events(id, = {}) # v1/public/stories/{storyId}/events get("stories/#{id}/events", ) end |
#story_series(id, options = {}) ⇒ Object
fetches lists of series filtered by a story id
271 272 273 274 |
# File 'lib/marvel/client.rb', line 271 def story_series(id, = {}) # v1/public/stories/{storyId}/series get("stories/#{id}/series", ) end |