marvelite 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -1
- data/README.md +2 -3
- data/lib/marvelite/api/config/v1.yml +3 -0
- data/lib/marvelite/version.rb +1 -1
- data/spec/fixtures/series/{serie_characters.json → series_characters.json} +0 -0
- data/spec/fixtures/series/{serie_comics.json → series_comics.json} +0 -0
- data/spec/fixtures/series/{serie_creators.json → series_creators.json} +0 -0
- data/spec/fixtures/series/{serie_events.json → series_events.json} +0 -0
- data/spec/fixtures/series/{serie_stories.json → series_stories.json} +0 -0
- data/spec/fixtures/stories/story_series.json +440 -0
- data/spec/marvelite/api/client_characters_endpoints_spec.rb +10 -10
- data/spec/marvelite/api/client_comics_endpoints_spec.rb +6 -6
- data/spec/marvelite/api/client_creators_endpoints_spec.rb +6 -6
- data/spec/marvelite/api/client_events_endpoints_spec.rb +7 -7
- data/spec/marvelite/api/client_series_endpoints_spec.rb +23 -23
- data/spec/marvelite/api/client_stories_endpoints_spec.rb +25 -6
- data/spec/spec_helper.rb +4 -0
- metadata +14 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 37537139d31ae17a9357c611142e7e68f6912c62
|
4
|
+
data.tar.gz: 38e437138be91950edb961f40d7c5000eedc53f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aaec02244829b1d6f5daa93080f00d54fc661be412abcbabfc58fd80eb287dffca8a27a9e1716c5ca1bf4867d103fd22ffc17b270e5eb2bc428bdfafcb5d30fb
|
7
|
+
data.tar.gz: e32212dd67b43938899b07f353436b6b4999884f26f64b808fc38d3161bb2714d54bc35a1d1738545efce8f6090f1e5475d9f00ba5962fccf7dc4c51d5ca9fdc
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
## Changelog
|
2
2
|
|
3
|
+
### 0.1.3
|
4
|
+
* retrieve story series by connecting to the API's `/stories/:id/series` endpoint
|
5
|
+
(contributed by [O-I](https://github.com/O-I)).
|
6
|
+
* Spec cleaning courtesy of [O-I](https://github.com/O-I).
|
7
|
+
* Removed Rubinius from `.travis.yml`.
|
8
|
+
|
9
|
+
|
3
10
|
### 0.1.2
|
4
11
|
* Adds `#raw_response` to store the original response from the API inside
|
5
12
|
a `Marvelite::API::Response` instance. Author: [Jon Allured](https://github.com/jonallured)
|
@@ -89,4 +96,4 @@
|
|
89
96
|
### 0.0.1
|
90
97
|
* Initial release and just two endpoints:
|
91
98
|
* retrieve characters by connecting to the API's `/characters` endpoint
|
92
|
-
* retrieve a character by connecting to the API's `/characters/:id` endpoint
|
99
|
+
* retrieve a character by connecting to the API's `/characters/:id` endpoint
|
data/README.md
CHANGED
@@ -1,7 +1,6 @@
|
|
1
|
-
# Marvelite
|
1
|
+
# Marvelite
|
2
2
|
|
3
|
-
[travis-
|
4
|
-
[travis]: http://travis-ci.org/antillas21/marvelite
|
3
|
+
[![Build Status](https://travis-ci.org/antillas21/marvelite.svg?branch=master)](https://travis-ci.org/antillas21/marvelite)
|
5
4
|
|
6
5
|
Simple Ruby wrapper to communicate with the Marvel Comics API.
|
7
6
|
|
data/lib/marvelite/version.rb
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,440 @@
|
|
1
|
+
{
|
2
|
+
"code": 200,
|
3
|
+
"status": "Ok",
|
4
|
+
"copyright": "© 2014 MARVEL",
|
5
|
+
"attributionText": "Data provided by Marvel. © 2014 MARVEL",
|
6
|
+
"attributionHTML": "<a href=\"http://marvel.com\">Data provided by Marvel. © 2014 MARVEL</a>",
|
7
|
+
"etag": "3b5201c90a6e0a421588e242f9b4f9fdcce9f870",
|
8
|
+
"data": {
|
9
|
+
"offset": 0,
|
10
|
+
"limit": 20,
|
11
|
+
"total": 1,
|
12
|
+
"count": 1,
|
13
|
+
"results": [
|
14
|
+
{
|
15
|
+
"id": 632,
|
16
|
+
"title": "Wolverine (2003 - 2009)",
|
17
|
+
"description": "A new decade means new mayhem for the X-Men's wildest member! Revisit memorable stories like Mark Millar and John Romita Jr.'s \"Enemy of the State,\" featuring Logan as the Marvel Universe's worst nightmare, and \"Evolution\" by Jeph Loeb and Simone Bianchi, exploring the true history of Wolverine!",
|
18
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/series/632",
|
19
|
+
"urls": [
|
20
|
+
{
|
21
|
+
"type": "detail",
|
22
|
+
"url": "http://marvel.com/comics/series/632/wolverine_2003_-_2009?utm_campaign=apiRef&utm_source=94f945fe8833c9a96e6f761b60562a45"
|
23
|
+
}
|
24
|
+
],
|
25
|
+
"startYear": 2003,
|
26
|
+
"endYear": 2009,
|
27
|
+
"rating": "Parental Advisory",
|
28
|
+
"type": "",
|
29
|
+
"modified": "2013-03-01T15:53:32-0500",
|
30
|
+
"thumbnail": {
|
31
|
+
"path": "http://i.annihil.us/u/prod/marvel/i/mg/2/f0/513114d9f116d",
|
32
|
+
"extension": "jpg"
|
33
|
+
},
|
34
|
+
"creators": {
|
35
|
+
"available": 64,
|
36
|
+
"collectionURI": "http://gateway.marvel.com/v1/public/series/632/creators",
|
37
|
+
"items": [
|
38
|
+
{
|
39
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/creators/11463",
|
40
|
+
"name": "Jason Aaron",
|
41
|
+
"role": "writer"
|
42
|
+
},
|
43
|
+
{
|
44
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/creators/644",
|
45
|
+
"name": "Marc Guggenheim",
|
46
|
+
"role": "writer"
|
47
|
+
},
|
48
|
+
{
|
49
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/creators/4014",
|
50
|
+
"name": "Axel Alonso",
|
51
|
+
"role": "editor"
|
52
|
+
},
|
53
|
+
{
|
54
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/creators/191",
|
55
|
+
"name": "Kaare Andrews",
|
56
|
+
"role": "penciller"
|
57
|
+
},
|
58
|
+
{
|
59
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/creators/648",
|
60
|
+
"name": "Simone Bianchi",
|
61
|
+
"role": "penciller"
|
62
|
+
},
|
63
|
+
{
|
64
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/creators/645",
|
65
|
+
"name": "Laurence Campbell",
|
66
|
+
"role": "penciller"
|
67
|
+
},
|
68
|
+
{
|
69
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/creators/10288",
|
70
|
+
"name": "Marko Djurdjevic",
|
71
|
+
"role": "penciller"
|
72
|
+
},
|
73
|
+
{
|
74
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/creators/273",
|
75
|
+
"name": "Leandro Fernandez",
|
76
|
+
"role": "penciller"
|
77
|
+
},
|
78
|
+
{
|
79
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/creators/808",
|
80
|
+
"name": "Howard Chaykin",
|
81
|
+
"role": "inker"
|
82
|
+
},
|
83
|
+
{
|
84
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/creators/429",
|
85
|
+
"name": "Carlos Alberto cruz Cuevas",
|
86
|
+
"role": "inker"
|
87
|
+
},
|
88
|
+
{
|
89
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/creators/589",
|
90
|
+
"name": "Nelson DeCastro",
|
91
|
+
"role": "inker"
|
92
|
+
},
|
93
|
+
{
|
94
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/creators/440",
|
95
|
+
"name": "Mark Farmer",
|
96
|
+
"role": "inker"
|
97
|
+
},
|
98
|
+
{
|
99
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/creators/638",
|
100
|
+
"name": "Edgar Clement",
|
101
|
+
"role": "colorist"
|
102
|
+
},
|
103
|
+
{
|
104
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/creators/430",
|
105
|
+
"name": "Edgar Delgado",
|
106
|
+
"role": "colorist"
|
107
|
+
},
|
108
|
+
{
|
109
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/creators/236",
|
110
|
+
"name": "Tommy Lee Edwards",
|
111
|
+
"role": "colorist"
|
112
|
+
},
|
113
|
+
{
|
114
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/creators/4258",
|
115
|
+
"name": "Studio F",
|
116
|
+
"role": "colorist"
|
117
|
+
},
|
118
|
+
{
|
119
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/creators/10454",
|
120
|
+
"name": "Nathan Fairbairn",
|
121
|
+
"role": "colorist"
|
122
|
+
},
|
123
|
+
{
|
124
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/creators/452",
|
125
|
+
"name": "Chris Eliopoulos",
|
126
|
+
"role": "letterer"
|
127
|
+
},
|
128
|
+
{
|
129
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/creators/8635",
|
130
|
+
"name": "Randy Gentile",
|
131
|
+
"role": "letterer"
|
132
|
+
},
|
133
|
+
{
|
134
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/creators/120",
|
135
|
+
"name": "Ron Garney",
|
136
|
+
"role": "artist"
|
137
|
+
}
|
138
|
+
],
|
139
|
+
"returned": 20
|
140
|
+
},
|
141
|
+
"characters": {
|
142
|
+
"available": 17,
|
143
|
+
"collectionURI": "http://gateway.marvel.com/v1/public/series/632/characters",
|
144
|
+
"items": [
|
145
|
+
{
|
146
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/characters/1009144",
|
147
|
+
"name": "A.I.M."
|
148
|
+
},
|
149
|
+
{
|
150
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/characters/1009175",
|
151
|
+
"name": "Beast"
|
152
|
+
},
|
153
|
+
{
|
154
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/characters/1009257",
|
155
|
+
"name": "Cyclops"
|
156
|
+
},
|
157
|
+
{
|
158
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/characters/1009288",
|
159
|
+
"name": "Elektra"
|
160
|
+
},
|
161
|
+
{
|
162
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/characters/1009310",
|
163
|
+
"name": "Emma Frost"
|
164
|
+
},
|
165
|
+
{
|
166
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/characters/1009324",
|
167
|
+
"name": "Gorgon"
|
168
|
+
},
|
169
|
+
{
|
170
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/characters/1009368",
|
171
|
+
"name": "Iron Man"
|
172
|
+
},
|
173
|
+
{
|
174
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/characters/1009508",
|
175
|
+
"name": "Kitty Pryde"
|
176
|
+
},
|
177
|
+
{
|
178
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/characters/1010954",
|
179
|
+
"name": "Mystique (House of M)"
|
180
|
+
},
|
181
|
+
{
|
182
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/characters/1009471",
|
183
|
+
"name": "Nick Fury"
|
184
|
+
},
|
185
|
+
{
|
186
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/characters/1010797",
|
187
|
+
"name": "Nitro"
|
188
|
+
},
|
189
|
+
{
|
190
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/characters/1009430",
|
191
|
+
"name": "Rachel Grey"
|
192
|
+
},
|
193
|
+
{
|
194
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/characters/1009554",
|
195
|
+
"name": "Sabretooth"
|
196
|
+
},
|
197
|
+
{
|
198
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/characters/1009570",
|
199
|
+
"name": "Sentinel"
|
200
|
+
},
|
201
|
+
{
|
202
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/characters/1009629",
|
203
|
+
"name": "Storm"
|
204
|
+
},
|
205
|
+
{
|
206
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/characters/1009718",
|
207
|
+
"name": "Wolverine"
|
208
|
+
},
|
209
|
+
{
|
210
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/characters/1009726",
|
211
|
+
"name": "X-Men"
|
212
|
+
}
|
213
|
+
],
|
214
|
+
"returned": 17
|
215
|
+
},
|
216
|
+
"stories": {
|
217
|
+
"available": 210,
|
218
|
+
"collectionURI": "http://gateway.marvel.com/v1/public/series/632/stories",
|
219
|
+
"items": [
|
220
|
+
{
|
221
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/stories/1050",
|
222
|
+
"name": "Cover #1050",
|
223
|
+
"type": "cover"
|
224
|
+
},
|
225
|
+
{
|
226
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/stories/1051",
|
227
|
+
"name": "Interior #1051",
|
228
|
+
"type": "interiorStory"
|
229
|
+
},
|
230
|
+
{
|
231
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/stories/1498",
|
232
|
+
"name": "Cover #1498",
|
233
|
+
"type": "cover"
|
234
|
+
},
|
235
|
+
{
|
236
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/stories/1499",
|
237
|
+
"name": "Interior #1499",
|
238
|
+
"type": "interiorStory"
|
239
|
+
},
|
240
|
+
{
|
241
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/stories/1766",
|
242
|
+
"name": "Cover #1766",
|
243
|
+
"type": "cover"
|
244
|
+
},
|
245
|
+
{
|
246
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/stories/1767",
|
247
|
+
"name": "Interior #1767",
|
248
|
+
"type": "interiorStory"
|
249
|
+
},
|
250
|
+
{
|
251
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/stories/1802",
|
252
|
+
"name": "Cover #1802",
|
253
|
+
"type": "cover"
|
254
|
+
},
|
255
|
+
{
|
256
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/stories/1803",
|
257
|
+
"name": "Interior #1803",
|
258
|
+
"type": "interiorStory"
|
259
|
+
},
|
260
|
+
{
|
261
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/stories/1911",
|
262
|
+
"name": "Cover #1911",
|
263
|
+
"type": "cover"
|
264
|
+
},
|
265
|
+
{
|
266
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/stories/1912",
|
267
|
+
"name": "Interior #1912",
|
268
|
+
"type": "interiorStory"
|
269
|
+
},
|
270
|
+
{
|
271
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/stories/2153",
|
272
|
+
"name": "3 of 6 - Enemy of the State",
|
273
|
+
"type": "cover"
|
274
|
+
},
|
275
|
+
{
|
276
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/stories/2154",
|
277
|
+
"name": "3 of 6 - Enemy of the State",
|
278
|
+
"type": "interiorStory"
|
279
|
+
},
|
280
|
+
{
|
281
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/stories/2166",
|
282
|
+
"name": "Cover #2166",
|
283
|
+
"type": "cover"
|
284
|
+
},
|
285
|
+
{
|
286
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/stories/2167",
|
287
|
+
"name": "Interior #2167",
|
288
|
+
"type": "interiorStory"
|
289
|
+
},
|
290
|
+
{
|
291
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/stories/2168",
|
292
|
+
"name": "Cover #2168",
|
293
|
+
"type": "cover"
|
294
|
+
},
|
295
|
+
{
|
296
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/stories/2169",
|
297
|
+
"name": "Interior #2169",
|
298
|
+
"type": "interiorStory"
|
299
|
+
},
|
300
|
+
{
|
301
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/stories/2170",
|
302
|
+
"name": "Cover #2170",
|
303
|
+
"type": "cover"
|
304
|
+
},
|
305
|
+
{
|
306
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/stories/2171",
|
307
|
+
"name": "Interior #2171",
|
308
|
+
"type": "interiorStory"
|
309
|
+
},
|
310
|
+
{
|
311
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/stories/2172",
|
312
|
+
"name": "Cover #2172",
|
313
|
+
"type": "cover"
|
314
|
+
},
|
315
|
+
{
|
316
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/stories/2173",
|
317
|
+
"name": "Interior #2173",
|
318
|
+
"type": "interiorStory"
|
319
|
+
}
|
320
|
+
],
|
321
|
+
"returned": 20
|
322
|
+
},
|
323
|
+
"comics": {
|
324
|
+
"available": 95,
|
325
|
+
"collectionURI": "http://gateway.marvel.com/v1/public/series/632/comics",
|
326
|
+
"items": [
|
327
|
+
{
|
328
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/comics/14225",
|
329
|
+
"name": "Wolverine (2003) #1"
|
330
|
+
},
|
331
|
+
{
|
332
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/comics/14236",
|
333
|
+
"name": "Wolverine (2003) #2"
|
334
|
+
},
|
335
|
+
{
|
336
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/comics/14247",
|
337
|
+
"name": "Wolverine (2003) #3"
|
338
|
+
},
|
339
|
+
{
|
340
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/comics/14259",
|
341
|
+
"name": "Wolverine (2003) #4"
|
342
|
+
},
|
343
|
+
{
|
344
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/comics/14264",
|
345
|
+
"name": "Wolverine (2003) #5"
|
346
|
+
},
|
347
|
+
{
|
348
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/comics/234",
|
349
|
+
"name": "Wolverine (2003) #6"
|
350
|
+
},
|
351
|
+
{
|
352
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/comics/233",
|
353
|
+
"name": "Wolverine (2003) #7"
|
354
|
+
},
|
355
|
+
{
|
356
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/comics/268",
|
357
|
+
"name": "Wolverine (2003) #8"
|
358
|
+
},
|
359
|
+
{
|
360
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/comics/231",
|
361
|
+
"name": "Wolverine (2003) #9"
|
362
|
+
},
|
363
|
+
{
|
364
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/comics/237",
|
365
|
+
"name": "Wolverine (2003) #10"
|
366
|
+
},
|
367
|
+
{
|
368
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/comics/236",
|
369
|
+
"name": "Wolverine (2003) #11"
|
370
|
+
},
|
371
|
+
{
|
372
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/comics/427",
|
373
|
+
"name": "Wolverine (2003) #12"
|
374
|
+
},
|
375
|
+
{
|
376
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/comics/464",
|
377
|
+
"name": "Wolverine (2003) #13"
|
378
|
+
},
|
379
|
+
{
|
380
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/comics/490",
|
381
|
+
"name": "Wolverine (2003) #14"
|
382
|
+
},
|
383
|
+
{
|
384
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/comics/658",
|
385
|
+
"name": "Wolverine (2003) #15"
|
386
|
+
},
|
387
|
+
{
|
388
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/comics/718",
|
389
|
+
"name": "Wolverine (2003) #16"
|
390
|
+
},
|
391
|
+
{
|
392
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/comics/527",
|
393
|
+
"name": "Wolverine (2003) #17"
|
394
|
+
},
|
395
|
+
{
|
396
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/comics/760",
|
397
|
+
"name": "Wolverine (2003) #18"
|
398
|
+
},
|
399
|
+
{
|
400
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/comics/828",
|
401
|
+
"name": "Wolverine (2003) #19"
|
402
|
+
},
|
403
|
+
{
|
404
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/comics/860",
|
405
|
+
"name": "Wolverine (2003) #20"
|
406
|
+
}
|
407
|
+
],
|
408
|
+
"returned": 20
|
409
|
+
},
|
410
|
+
"events": {
|
411
|
+
"available": 3,
|
412
|
+
"collectionURI": "http://gateway.marvel.com/v1/public/series/632/events",
|
413
|
+
"items": [
|
414
|
+
{
|
415
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/events/238",
|
416
|
+
"name": "Civil War"
|
417
|
+
},
|
418
|
+
{
|
419
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/events/245",
|
420
|
+
"name": "Enemy of the State"
|
421
|
+
},
|
422
|
+
{
|
423
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/events/251",
|
424
|
+
"name": "House of M"
|
425
|
+
}
|
426
|
+
],
|
427
|
+
"returned": 3
|
428
|
+
},
|
429
|
+
"next": {
|
430
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/series/7057",
|
431
|
+
"name": "Wolverine: Weapon X (2009 - Present)"
|
432
|
+
},
|
433
|
+
"previous": {
|
434
|
+
"resourceURI": "http://gateway.marvel.com/v1/public/series/2262",
|
435
|
+
"name": "Wolverine (1988 - 2003)"
|
436
|
+
}
|
437
|
+
}
|
438
|
+
]
|
439
|
+
}
|
440
|
+
}
|
@@ -13,7 +13,7 @@ describe Marvelite::API::Client do
|
|
13
13
|
expect(client.characters).to be_a(Marvelite::API::Response)
|
14
14
|
end
|
15
15
|
|
16
|
-
it 'Response object is populated with JSON from the characters endpoint' do
|
16
|
+
it 'Response object is populated with JSON from the /characters endpoint' do
|
17
17
|
expect(client.characters["status"]).to eq("Ok")
|
18
18
|
expect(client.characters[:data][:results].size).to eq(20)
|
19
19
|
end
|
@@ -29,7 +29,7 @@ describe Marvelite::API::Client do
|
|
29
29
|
expect(client.character(1009610)).to be_a(Marvelite::API::Response)
|
30
30
|
end
|
31
31
|
|
32
|
-
it 'Response object is populated with JSON from the
|
32
|
+
it 'Response object is populated with JSON from the /characters/:id endpoint' do
|
33
33
|
expect(client.character(1009610)[:data][:results][0][:name]).to eq('Spider-Man')
|
34
34
|
end
|
35
35
|
|
@@ -52,7 +52,7 @@ describe Marvelite::API::Client do
|
|
52
52
|
expect(client.character_comics(1009610)).to be_a(Marvelite::API::Response)
|
53
53
|
end
|
54
54
|
|
55
|
-
it 'Response object is populated with JSON from the characters endpoint' do
|
55
|
+
it 'Response object is populated with JSON from the /characters/:id/comics endpoint' do
|
56
56
|
expect(client.character_comics(1009610)["status"]).to eq("Ok")
|
57
57
|
expect(client.character_comics(1009610)[:data][:results].size).to eq(20)
|
58
58
|
end
|
@@ -61,7 +61,7 @@ describe Marvelite::API::Client do
|
|
61
61
|
expect(client.character_comics(1009610)[:data][:results][0][:title]).to eq('Superior Spider-Man (2013) #22')
|
62
62
|
end
|
63
63
|
|
64
|
-
it '
|
64
|
+
it 'accepts a String as character id' do
|
65
65
|
expect(client.character_comics('Spider-Man')["status"]).to eq("Ok")
|
66
66
|
expect(client.character_comics('Spider-Man')[:data][:results].size).to eq(20)
|
67
67
|
end
|
@@ -76,7 +76,7 @@ describe Marvelite::API::Client do
|
|
76
76
|
expect(client.character_events(1009610)).to be_a(Marvelite::API::Response)
|
77
77
|
end
|
78
78
|
|
79
|
-
it 'Response object is populated with JSON from the characters endpoint' do
|
79
|
+
it 'Response object is populated with JSON from the /characters/:id/events endpoint' do
|
80
80
|
expect(client.character_events(1009610)["status"]).to eq("Ok")
|
81
81
|
expect(client.character_events(1009610)[:data][:results].size).to eq(20)
|
82
82
|
end
|
@@ -85,7 +85,7 @@ describe Marvelite::API::Client do
|
|
85
85
|
expect(client.character_events(1009610)[:data][:results][0][:title]).to eq('Acts of Vengeance!')
|
86
86
|
end
|
87
87
|
|
88
|
-
it '
|
88
|
+
it 'accepts a String as character id' do
|
89
89
|
expect(client.character_comics('Spider-Man')["status"]).to eq("Ok")
|
90
90
|
expect(client.character_comics('Spider-Man')[:data][:results].size).to eq(20)
|
91
91
|
end
|
@@ -100,7 +100,7 @@ describe Marvelite::API::Client do
|
|
100
100
|
expect(client.character_series(1009610)).to be_a(Marvelite::API::Response)
|
101
101
|
end
|
102
102
|
|
103
|
-
it 'Response object is populated with JSON from the characters endpoint' do
|
103
|
+
it 'Response object is populated with JSON from the /characters/:id/series endpoint' do
|
104
104
|
expect(client.character_series(1009610)["status"]).to eq("Ok")
|
105
105
|
expect(client.character_series(1009610)[:data][:results].size).to eq(20)
|
106
106
|
end
|
@@ -109,7 +109,7 @@ describe Marvelite::API::Client do
|
|
109
109
|
expect(client.character_series(1009610)[:data][:results][0][:title]).to eq('A+X (2012 - Present)')
|
110
110
|
end
|
111
111
|
|
112
|
-
it '
|
112
|
+
it 'accepts a String as character id' do
|
113
113
|
expect(client.character_comics('Spider-Man')["status"]).to eq("Ok")
|
114
114
|
expect(client.character_comics('Spider-Man')[:data][:results].size).to eq(20)
|
115
115
|
end
|
@@ -125,7 +125,7 @@ describe Marvelite::API::Client do
|
|
125
125
|
expect(client.character_stories(1009610)).to be_a(Marvelite::API::Response)
|
126
126
|
end
|
127
127
|
|
128
|
-
it 'Response object is populated with JSON from the characters endpoint' do
|
128
|
+
it 'Response object is populated with JSON from the /characters/:id/stories endpoint' do
|
129
129
|
expect(client.character_stories(1009610)["status"]).to eq("Ok")
|
130
130
|
expect(client.character_stories(1009610)[:data][:results].size).to eq(20)
|
131
131
|
end
|
@@ -134,7 +134,7 @@ describe Marvelite::API::Client do
|
|
134
134
|
expect(client.character_stories(1009610)[:data][:results][0][:title]).to eq('Interior #483')
|
135
135
|
end
|
136
136
|
|
137
|
-
it '
|
137
|
+
it 'accepts a String as character id' do
|
138
138
|
expect(client.character_comics('Spider-Man')["status"]).to eq("Ok")
|
139
139
|
expect(client.character_comics('Spider-Man')[:data][:results].size).to eq(20)
|
140
140
|
end
|
@@ -13,7 +13,7 @@ describe Marvelite::API::Client do
|
|
13
13
|
expect(client.comics).to be_a(Marvelite::API::Response)
|
14
14
|
end
|
15
15
|
|
16
|
-
it 'Response object is populated with JSON from the comics endpoint' do
|
16
|
+
it 'Response object is populated with JSON from the /comics endpoint' do
|
17
17
|
expect(client.comics["status"]).to eq("Ok")
|
18
18
|
expect(client.comics[:data][:results].size).to eq(20)
|
19
19
|
end
|
@@ -27,7 +27,7 @@ describe Marvelite::API::Client do
|
|
27
27
|
expect(client.comic(40128)).to be_a(Marvelite::API::Response)
|
28
28
|
end
|
29
29
|
|
30
|
-
it 'Response object is populated with JSON from the
|
30
|
+
it 'Response object is populated with JSON from the /comics/:id endpoint' do
|
31
31
|
expect(client.comic(40128)[:data][:results][0][:title]).to eq('Amazing Spider-Man (1999) #700')
|
32
32
|
end
|
33
33
|
|
@@ -45,7 +45,7 @@ describe Marvelite::API::Client do
|
|
45
45
|
expect(client.comic_characters(40128)).to be_a(Marvelite::API::Response)
|
46
46
|
end
|
47
47
|
|
48
|
-
it 'Response object is populated with JSON from the comics endpoint' do
|
48
|
+
it 'Response object is populated with JSON from the /comics/:id/characters endpoint' do
|
49
49
|
expect(client.comic_characters(40128)["status"]).to eq("Ok")
|
50
50
|
expect(client.comic_characters(40128)[:data][:results].size).to eq(1)
|
51
51
|
end
|
@@ -64,7 +64,7 @@ describe Marvelite::API::Client do
|
|
64
64
|
expect(client.comic_events(40128)).to be_a(Marvelite::API::Response)
|
65
65
|
end
|
66
66
|
|
67
|
-
it 'Response object is populated with JSON from the comics endpoint' do
|
67
|
+
it 'Response object is populated with JSON from the /comics/:id/events endpoint' do
|
68
68
|
expect(client.comic_events(40128)["status"]).to eq("Ok")
|
69
69
|
expect(client.comic_events(40128)[:data][:results].size).to eq(1)
|
70
70
|
end
|
@@ -83,7 +83,7 @@ describe Marvelite::API::Client do
|
|
83
83
|
expect(client.comic_creators(40128)).to be_a(Marvelite::API::Response)
|
84
84
|
end
|
85
85
|
|
86
|
-
it 'Response object is populated with JSON from the comics endpoint' do
|
86
|
+
it 'Response object is populated with JSON from the /comics/:id/creators endpoint' do
|
87
87
|
expect(client.comic_creators(40128)["status"]).to eq("Ok")
|
88
88
|
expect(client.comic_creators(40128)[:data][:results].size).to eq(12)
|
89
89
|
end
|
@@ -102,7 +102,7 @@ describe Marvelite::API::Client do
|
|
102
102
|
expect(client.comic_stories(40128)).to be_a(Marvelite::API::Response)
|
103
103
|
end
|
104
104
|
|
105
|
-
it 'Response object is populated with JSON from the comics endpoint' do
|
105
|
+
it 'Response object is populated with JSON from the /comics/:id/stories endpoint' do
|
106
106
|
expect(client.comic_stories(40128)["status"]).to eq("Ok")
|
107
107
|
expect(client.comic_stories(40128)[:data][:results].size).to eq(2)
|
108
108
|
end
|
@@ -13,7 +13,7 @@ describe Marvelite::API::Client do
|
|
13
13
|
expect(client.creators).to be_a(Marvelite::API::Response)
|
14
14
|
end
|
15
15
|
|
16
|
-
it 'Response object is populated with JSON from the creators endpoint' do
|
16
|
+
it 'Response object is populated with JSON from the /creators endpoint' do
|
17
17
|
expect(client.creators["status"]).to eq("Ok")
|
18
18
|
expect(client.creators[:data][:results].size).to eq(20)
|
19
19
|
end
|
@@ -29,7 +29,7 @@ describe Marvelite::API::Client do
|
|
29
29
|
expect(client.creator(593)).to be_a(Marvelite::API::Response)
|
30
30
|
end
|
31
31
|
|
32
|
-
it 'Response object is populated with JSON from the
|
32
|
+
it 'Response object is populated with JSON from the /creators/:id endpoint' do
|
33
33
|
expect(client.creator(593)[:data][:results][0][:lastName]).to eq('Loughridge')
|
34
34
|
end
|
35
35
|
|
@@ -48,7 +48,7 @@ describe Marvelite::API::Client do
|
|
48
48
|
expect(client.creator_comics(593)).to be_a(Marvelite::API::Response)
|
49
49
|
end
|
50
50
|
|
51
|
-
it 'Response object is populated with JSON from the
|
51
|
+
it 'Response object is populated with JSON from the /creators/:id/comics endpoint' do
|
52
52
|
expect(client.creator_comics(593)["status"]).to eq("Ok")
|
53
53
|
expect(client.creator_comics(593)[:data][:results].size).to eq(20)
|
54
54
|
end
|
@@ -67,7 +67,7 @@ describe Marvelite::API::Client do
|
|
67
67
|
expect(client.creator_events(593)).to be_a(Marvelite::API::Response)
|
68
68
|
end
|
69
69
|
|
70
|
-
it 'Response object is populated with JSON from the
|
70
|
+
it 'Response object is populated with JSON from the /creators/:id/events endpoint' do
|
71
71
|
expect(client.creator_events(593)["status"]).to eq("Ok")
|
72
72
|
expect(client.creator_events(593)[:data][:results].size).to eq(2)
|
73
73
|
end
|
@@ -86,7 +86,7 @@ describe Marvelite::API::Client do
|
|
86
86
|
expect(client.creator_series(593)).to be_a(Marvelite::API::Response)
|
87
87
|
end
|
88
88
|
|
89
|
-
it 'Response object is populated with JSON from the
|
89
|
+
it 'Response object is populated with JSON from the /creators/:id/series endpoint' do
|
90
90
|
expect(client.creator_series(593)["status"]).to eq("Ok")
|
91
91
|
expect(client.creator_series(593)[:data][:results].size).to eq(20)
|
92
92
|
end
|
@@ -105,7 +105,7 @@ describe Marvelite::API::Client do
|
|
105
105
|
expect(client.creator_stories(593)).to be_a(Marvelite::API::Response)
|
106
106
|
end
|
107
107
|
|
108
|
-
it 'Response object is populated with JSON from the
|
108
|
+
it 'Response object is populated with JSON from the /creators/:id/stories endpoint' do
|
109
109
|
expect(client.creator_stories(593)["status"]).to eq("Ok")
|
110
110
|
expect(client.creator_stories(593)[:data][:results].size).to eq(20)
|
111
111
|
end
|
@@ -13,7 +13,7 @@ describe Marvelite::API::Client do
|
|
13
13
|
expect(client.events).to be_a(Marvelite::API::Response)
|
14
14
|
end
|
15
15
|
|
16
|
-
it 'Response object is populated with JSON from the events endpoint' do
|
16
|
+
it 'Response object is populated with JSON from the /events endpoint' do
|
17
17
|
expect(client.events["status"]).to eq("Ok")
|
18
18
|
expect(client.events[:data][:results].size).to eq(20)
|
19
19
|
end
|
@@ -28,7 +28,7 @@ describe Marvelite::API::Client do
|
|
28
28
|
expect(client.event(116)).to be_a(Marvelite::API::Response)
|
29
29
|
end
|
30
30
|
|
31
|
-
it 'Response object is populated with JSON from the
|
31
|
+
it 'Response object is populated with JSON from the /events/:id endpoint' do
|
32
32
|
expect(client.event(116)[:data][:results][0][:title]).to eq('Acts of Vengeance!')
|
33
33
|
end
|
34
34
|
|
@@ -50,7 +50,7 @@ describe Marvelite::API::Client do
|
|
50
50
|
expect(client.event_characters(116)).to be_a(Marvelite::API::Response)
|
51
51
|
end
|
52
52
|
|
53
|
-
it 'Response object is populated with JSON from the events endpoint' do
|
53
|
+
it 'Response object is populated with JSON from the /events/:id/characters endpoint' do
|
54
54
|
expect(client.event_characters(116)["status"]).to eq("Ok")
|
55
55
|
expect(client.event_characters(116)[:data][:results].size).to eq(20)
|
56
56
|
end
|
@@ -73,7 +73,7 @@ describe Marvelite::API::Client do
|
|
73
73
|
expect(client.event_comics(116)).to be_a(Marvelite::API::Response)
|
74
74
|
end
|
75
75
|
|
76
|
-
it 'Response object is populated with JSON from the events endpoint' do
|
76
|
+
it 'Response object is populated with JSON from the /events/:id/comics endpoint' do
|
77
77
|
expect(client.event_comics(116)["status"]).to eq("Ok")
|
78
78
|
expect(client.event_comics(116)[:data][:results].size).to eq(20)
|
79
79
|
end
|
@@ -96,7 +96,7 @@ describe Marvelite::API::Client do
|
|
96
96
|
expect(client.event_creators(116)).to be_a(Marvelite::API::Response)
|
97
97
|
end
|
98
98
|
|
99
|
-
it 'Response object is populated with JSON from the events endpoint' do
|
99
|
+
it 'Response object is populated with JSON from the /events/:id/creators endpoint' do
|
100
100
|
expect(client.event_creators(116)["status"]).to eq("Ok")
|
101
101
|
expect(client.event_creators(116)[:data][:results].size).to eq(20)
|
102
102
|
end
|
@@ -119,7 +119,7 @@ describe Marvelite::API::Client do
|
|
119
119
|
expect(client.event_series(116)).to be_a(Marvelite::API::Response)
|
120
120
|
end
|
121
121
|
|
122
|
-
it 'Response object is populated with JSON from the events endpoint' do
|
122
|
+
it 'Response object is populated with JSON from the /events/:id/series endpoint' do
|
123
123
|
expect(client.event_series(116)["status"]).to eq("Ok")
|
124
124
|
expect(client.event_series(116)[:data][:results].size).to eq(20)
|
125
125
|
end
|
@@ -142,7 +142,7 @@ describe Marvelite::API::Client do
|
|
142
142
|
expect(client.event_stories(116)).to be_a(Marvelite::API::Response)
|
143
143
|
end
|
144
144
|
|
145
|
-
it 'Response object is populated with JSON from the events endpoint' do
|
145
|
+
it 'Response object is populated with JSON from the /events/:id/stories endpoint' do
|
146
146
|
expect(client.event_stories(116)["status"]).to eq("Ok")
|
147
147
|
expect(client.event_stories(116)[:data][:results].size).to eq(20)
|
148
148
|
end
|
@@ -13,7 +13,7 @@ describe Marvelite::API::Client do
|
|
13
13
|
expect(client.series).to be_a(Marvelite::API::Response)
|
14
14
|
end
|
15
15
|
|
16
|
-
it 'Response object is populated with JSON from the series endpoint' do
|
16
|
+
it 'Response object is populated with JSON from the /series endpoint' do
|
17
17
|
expect(client.series["status"]).to eq("Ok")
|
18
18
|
expect(client.series[:data][:results].size).to eq(20)
|
19
19
|
end
|
@@ -28,106 +28,106 @@ describe Marvelite::API::Client do
|
|
28
28
|
expect(client.serie(2069)).to be_a(Marvelite::API::Response)
|
29
29
|
end
|
30
30
|
|
31
|
-
it 'Response object is populated with JSON from the
|
31
|
+
it 'Response object is populated with JSON from the /series/:id endpoint' do
|
32
32
|
expect(client.serie(2069)[:data][:results][0][:title]).to eq('Spider-Man (1990 - 1998)')
|
33
33
|
end
|
34
34
|
|
35
|
-
it 'accepts an Integer as
|
35
|
+
it 'accepts an Integer as series id' do
|
36
36
|
expect(client.serie(2069)[:data][:results][0][:title]).to eq('Spider-Man (1990 - 1998)')
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
40
|
-
describe '#
|
40
|
+
describe '#series_characters' do
|
41
41
|
before do
|
42
|
-
stub_get('series/2069/characters?apikey=123456&ts=1&hash=d4f1bab013916a533ef31e3ad5fb0887', 'series/
|
42
|
+
stub_get('series/2069/characters?apikey=123456&ts=1&hash=d4f1bab013916a533ef31e3ad5fb0887', 'series/series_characters.json')
|
43
43
|
end
|
44
44
|
|
45
45
|
it 'returns a Marvelite::API::Response object' do
|
46
46
|
expect(client.series_characters(2069)).to be_a(Marvelite::API::Response)
|
47
47
|
end
|
48
48
|
|
49
|
-
it 'Response object is populated with JSON from the series endpoint' do
|
49
|
+
it 'Response object is populated with JSON from the /series/:id/characters endpoint' do
|
50
50
|
expect(client.series_characters(2069)["status"]).to eq("Ok")
|
51
51
|
expect(client.series_characters(2069)[:data][:results].size).to eq(16)
|
52
52
|
end
|
53
53
|
|
54
|
-
it 'accepts an Integer as
|
54
|
+
it 'accepts an Integer as series id' do
|
55
55
|
expect(client.series_characters(2069)[:data][:results][0][:name]).to eq('Adam Warlock')
|
56
56
|
end
|
57
57
|
end
|
58
58
|
|
59
|
-
describe '#
|
59
|
+
describe '#series_comics' do
|
60
60
|
before do
|
61
|
-
stub_get('series/2069/comics?apikey=123456&ts=1&hash=d4f1bab013916a533ef31e3ad5fb0887', 'series/
|
61
|
+
stub_get('series/2069/comics?apikey=123456&ts=1&hash=d4f1bab013916a533ef31e3ad5fb0887', 'series/series_comics.json')
|
62
62
|
end
|
63
63
|
|
64
64
|
it 'returns a Marvelite::API::Response object' do
|
65
65
|
expect(client.series_comics(2069)).to be_a(Marvelite::API::Response)
|
66
66
|
end
|
67
67
|
|
68
|
-
it 'Response object is populated with JSON from the series endpoint' do
|
68
|
+
it 'Response object is populated with JSON from the /series/:id/comics endpoint' do
|
69
69
|
expect(client.series_comics(2069)["status"]).to eq("Ok")
|
70
70
|
expect(client.series_comics(2069)[:data][:results].size).to eq(20)
|
71
71
|
end
|
72
72
|
|
73
|
-
it 'accepts an Integer as
|
73
|
+
it 'accepts an Integer as series id' do
|
74
74
|
expect(client.series_comics(2069)[:data][:results][0][:title]).to eq('Spider-Man (1990) #98')
|
75
75
|
end
|
76
76
|
end
|
77
77
|
|
78
|
-
describe '#
|
78
|
+
describe '#series_creators' do
|
79
79
|
before do
|
80
|
-
stub_get('series/2069/creators?apikey=123456&ts=1&hash=d4f1bab013916a533ef31e3ad5fb0887', 'series/
|
80
|
+
stub_get('series/2069/creators?apikey=123456&ts=1&hash=d4f1bab013916a533ef31e3ad5fb0887', 'series/series_creators.json')
|
81
81
|
end
|
82
82
|
|
83
83
|
it 'returns a Marvelite::API::Response object' do
|
84
84
|
expect(client.series_creators(2069)).to be_a(Marvelite::API::Response)
|
85
85
|
end
|
86
86
|
|
87
|
-
it 'Response object is populated with JSON from the series endpoint' do
|
87
|
+
it 'Response object is populated with JSON from the /series/:id/creators endpoint' do
|
88
88
|
expect(client.series_creators(2069)["status"]).to eq("Ok")
|
89
89
|
expect(client.series_creators(2069)[:data][:results].size).to eq(20)
|
90
90
|
end
|
91
91
|
|
92
|
-
it 'accepts an Integer as
|
92
|
+
it 'accepts an Integer as series id' do
|
93
93
|
expect(client.series_creators(2069)[:data][:results][0][:fullName]).to eq('Comicraft')
|
94
94
|
end
|
95
95
|
end
|
96
96
|
|
97
|
-
describe '#
|
97
|
+
describe '#series_events' do
|
98
98
|
before do
|
99
|
-
stub_get('series/2069/events?apikey=123456&ts=1&hash=d4f1bab013916a533ef31e3ad5fb0887', 'series/
|
99
|
+
stub_get('series/2069/events?apikey=123456&ts=1&hash=d4f1bab013916a533ef31e3ad5fb0887', 'series/series_events.json')
|
100
100
|
end
|
101
101
|
|
102
102
|
it 'returns a Marvelite::API::Response object' do
|
103
103
|
expect(client.series_events(2069)).to be_a(Marvelite::API::Response)
|
104
104
|
end
|
105
105
|
|
106
|
-
it 'Response object is populated with JSON from the series endpoint' do
|
106
|
+
it 'Response object is populated with JSON from the /series/:id/events endpoint' do
|
107
107
|
expect(client.series_events(2069)["status"]).to eq("Ok")
|
108
108
|
expect(client.series_events(2069)[:data][:results].size).to eq(3)
|
109
109
|
end
|
110
110
|
|
111
|
-
it 'accepts an Integer as
|
111
|
+
it 'accepts an Integer as series id' do
|
112
112
|
expect(client.series_events(2069)[:data][:results][0][:title]).to eq('Infinity War')
|
113
113
|
end
|
114
114
|
end
|
115
115
|
|
116
|
-
describe '#
|
116
|
+
describe '#series_stories' do
|
117
117
|
before do
|
118
|
-
stub_get('series/2069/stories?apikey=123456&ts=1&hash=d4f1bab013916a533ef31e3ad5fb0887', 'series/
|
118
|
+
stub_get('series/2069/stories?apikey=123456&ts=1&hash=d4f1bab013916a533ef31e3ad5fb0887', 'series/series_stories.json')
|
119
119
|
end
|
120
120
|
|
121
121
|
it 'returns a Marvelite::API::Response object' do
|
122
122
|
expect(client.series_stories(2069)).to be_a(Marvelite::API::Response)
|
123
123
|
end
|
124
124
|
|
125
|
-
it 'Response object is populated with JSON from the series endpoint' do
|
125
|
+
it 'Response object is populated with JSON from the /series/:id/stories endpoint' do
|
126
126
|
expect(client.series_stories(2069)["status"]).to eq("Ok")
|
127
127
|
expect(client.series_stories(2069)[:data][:results].size).to eq(20)
|
128
128
|
end
|
129
129
|
|
130
|
-
it 'accepts an Integer as
|
130
|
+
it 'accepts an Integer as series id' do
|
131
131
|
expect(client.series_stories(2069)[:data][:results][0][:title]).to eq('Cover #23741')
|
132
132
|
end
|
133
133
|
end
|
@@ -13,7 +13,7 @@ describe Marvelite::API::Client do
|
|
13
13
|
expect(client.stories).to be_a(Marvelite::API::Response)
|
14
14
|
end
|
15
15
|
|
16
|
-
it 'Response object is populated with JSON from the stories endpoint' do
|
16
|
+
it 'Response object is populated with JSON from the /stories endpoint' do
|
17
17
|
expect(client.stories["status"]).to eq("Ok")
|
18
18
|
expect(client.stories[:data][:results].size).to eq(20)
|
19
19
|
end
|
@@ -27,7 +27,7 @@ describe Marvelite::API::Client do
|
|
27
27
|
expect(client.story(2210)).to be_a(Marvelite::API::Response)
|
28
28
|
end
|
29
29
|
|
30
|
-
it 'Response object is populated with JSON from the
|
30
|
+
it 'Response object is populated with JSON from the /stories/:id endpoint' do
|
31
31
|
expect(client.story(2210)[:data][:results][0][:title]).to eq('2 of 3 - House of M')
|
32
32
|
end
|
33
33
|
|
@@ -45,7 +45,7 @@ describe Marvelite::API::Client do
|
|
45
45
|
expect(client.story_characters(2210)).to be_a(Marvelite::API::Response)
|
46
46
|
end
|
47
47
|
|
48
|
-
it 'Response object is populated with JSON from the stories endpoint' do
|
48
|
+
it 'Response object is populated with JSON from the /stories/:id/characters endpoint' do
|
49
49
|
expect(client.story_characters(2210)["status"]).to eq("Ok")
|
50
50
|
expect(client.story_characters(2210)[:data][:results].size).to eq(3)
|
51
51
|
end
|
@@ -64,7 +64,7 @@ describe Marvelite::API::Client do
|
|
64
64
|
expect(client.story_comics(2210)).to be_a(Marvelite::API::Response)
|
65
65
|
end
|
66
66
|
|
67
|
-
it 'Response object is populated with JSON from the stories endpoint' do
|
67
|
+
it 'Response object is populated with JSON from the /stories/:id/comics endpoint' do
|
68
68
|
expect(client.story_comics(2210)["status"]).to eq("Ok")
|
69
69
|
expect(client.story_comics(2210)[:data][:results].size).to eq(1)
|
70
70
|
end
|
@@ -83,7 +83,7 @@ describe Marvelite::API::Client do
|
|
83
83
|
expect(client.story_creators(2210)).to be_a(Marvelite::API::Response)
|
84
84
|
end
|
85
85
|
|
86
|
-
it 'Response object is populated with JSON from the stories endpoint' do
|
86
|
+
it 'Response object is populated with JSON from the /stories/:id/creators endpoint' do
|
87
87
|
expect(client.story_creators(2210)["status"]).to eq("Ok")
|
88
88
|
expect(client.story_creators(2210)[:data][:results].size).to eq(1)
|
89
89
|
end
|
@@ -102,7 +102,7 @@ describe Marvelite::API::Client do
|
|
102
102
|
expect(client.story_events(2210)).to be_a(Marvelite::API::Response)
|
103
103
|
end
|
104
104
|
|
105
|
-
it 'Response object is populated with JSON from the stories endpoint' do
|
105
|
+
it 'Response object is populated with JSON from the /stories/:id/events endpoint' do
|
106
106
|
expect(client.story_events(2210)["status"]).to eq("Ok")
|
107
107
|
expect(client.story_events(2210)[:data][:results].size).to eq(1)
|
108
108
|
end
|
@@ -111,5 +111,24 @@ describe Marvelite::API::Client do
|
|
111
111
|
expect(client.story_events(2210)[:data][:results][0][:title]).to eq('House of M')
|
112
112
|
end
|
113
113
|
end
|
114
|
+
|
115
|
+
describe '#story_series' do
|
116
|
+
before do
|
117
|
+
stub_get('stories/2210/series?apikey=123456&ts=1&hash=d4f1bab013916a533ef31e3ad5fb0887', 'stories/story_series.json')
|
118
|
+
end
|
119
|
+
|
120
|
+
it 'returns a Marvelite::API::Response object' do
|
121
|
+
expect(client.story_series(2210)).to be_a(Marvelite::API::Response)
|
122
|
+
end
|
123
|
+
|
124
|
+
it 'Response object is populated with JSON from the /stories/:id/series endpoint' do
|
125
|
+
expect(client.story_series(2210)["status"]).to eq("Ok")
|
126
|
+
expect(client.story_series(2210)[:data][:results].size).to eq(1)
|
127
|
+
end
|
128
|
+
|
129
|
+
it 'accepts an Integer as story id' do
|
130
|
+
expect(client.story_series(2210)[:data][:results][0][:title]).to eq('Wolverine (2003 - 2009)')
|
131
|
+
end
|
132
|
+
end
|
114
133
|
end
|
115
134
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -11,6 +11,10 @@ $LOAD_PATH.unshift(File.dirname(__FILE__))
|
|
11
11
|
RSpec.configure do |config|
|
12
12
|
FakeWeb.allow_net_connect = false
|
13
13
|
|
14
|
+
config.mock_with :rspec do |c|
|
15
|
+
c.syntax = [:should, :expect]
|
16
|
+
end
|
17
|
+
|
14
18
|
def marvel_url(url)
|
15
19
|
"http://gateway.marvel.com/v1/public/#{url}"
|
16
20
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: marvelite
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Antonio Antillon
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-07-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -149,18 +149,19 @@ files:
|
|
149
149
|
- spec/fixtures/events/event_stories.json
|
150
150
|
- spec/fixtures/events/events.json
|
151
151
|
- spec/fixtures/series/serie.json
|
152
|
-
- spec/fixtures/series/serie_characters.json
|
153
|
-
- spec/fixtures/series/serie_comics.json
|
154
|
-
- spec/fixtures/series/serie_creators.json
|
155
|
-
- spec/fixtures/series/serie_events.json
|
156
|
-
- spec/fixtures/series/serie_stories.json
|
157
152
|
- spec/fixtures/series/series.json
|
153
|
+
- spec/fixtures/series/series_characters.json
|
154
|
+
- spec/fixtures/series/series_comics.json
|
155
|
+
- spec/fixtures/series/series_creators.json
|
156
|
+
- spec/fixtures/series/series_events.json
|
157
|
+
- spec/fixtures/series/series_stories.json
|
158
158
|
- spec/fixtures/stories/stories.json
|
159
159
|
- spec/fixtures/stories/story.json
|
160
160
|
- spec/fixtures/stories/story_characters.json
|
161
161
|
- spec/fixtures/stories/story_comics.json
|
162
162
|
- spec/fixtures/stories/story_creators.json
|
163
163
|
- spec/fixtures/stories/story_events.json
|
164
|
+
- spec/fixtures/stories/story_series.json
|
164
165
|
- spec/marvelite/api/client_characters_endpoints_spec.rb
|
165
166
|
- spec/marvelite/api/client_comics_endpoints_spec.rb
|
166
167
|
- spec/marvelite/api/client_creators_endpoints_spec.rb
|
@@ -228,18 +229,19 @@ test_files:
|
|
228
229
|
- spec/fixtures/events/event_stories.json
|
229
230
|
- spec/fixtures/events/events.json
|
230
231
|
- spec/fixtures/series/serie.json
|
231
|
-
- spec/fixtures/series/serie_characters.json
|
232
|
-
- spec/fixtures/series/serie_comics.json
|
233
|
-
- spec/fixtures/series/serie_creators.json
|
234
|
-
- spec/fixtures/series/serie_events.json
|
235
|
-
- spec/fixtures/series/serie_stories.json
|
236
232
|
- spec/fixtures/series/series.json
|
233
|
+
- spec/fixtures/series/series_characters.json
|
234
|
+
- spec/fixtures/series/series_comics.json
|
235
|
+
- spec/fixtures/series/series_creators.json
|
236
|
+
- spec/fixtures/series/series_events.json
|
237
|
+
- spec/fixtures/series/series_stories.json
|
237
238
|
- spec/fixtures/stories/stories.json
|
238
239
|
- spec/fixtures/stories/story.json
|
239
240
|
- spec/fixtures/stories/story_characters.json
|
240
241
|
- spec/fixtures/stories/story_comics.json
|
241
242
|
- spec/fixtures/stories/story_creators.json
|
242
243
|
- spec/fixtures/stories/story_events.json
|
244
|
+
- spec/fixtures/stories/story_series.json
|
243
245
|
- spec/marvelite/api/client_characters_endpoints_spec.rb
|
244
246
|
- spec/marvelite/api/client_comics_endpoints_spec.rb
|
245
247
|
- spec/marvelite/api/client_creators_endpoints_spec.rb
|