memo_tomato 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +4 -0
- data/Gemfile +4 -0
- data/README.md +32 -0
- data/Rakefile +1 -0
- data/lib/memo_tomato/actor.rb +6 -0
- data/lib/memo_tomato/client.rb +45 -0
- data/lib/memo_tomato/director.rb +5 -0
- data/lib/memo_tomato/genre.rb +5 -0
- data/lib/memo_tomato/movie.rb +17 -0
- data/lib/memo_tomato/node.rb +12 -0
- data/lib/memo_tomato/parser/base.rb +50 -0
- data/lib/memo_tomato/parser/movie_info.rb +13 -0
- data/lib/memo_tomato/parser/search_movie.rb +15 -0
- data/lib/memo_tomato/parser/similar_movies.rb +14 -0
- data/lib/memo_tomato/parser/upcoming_movies.rb +14 -0
- data/lib/memo_tomato/parser.rb +6 -0
- data/lib/memo_tomato/version.rb +3 -0
- data/lib/memo_tomato.rb +16 -0
- data/memo_tomato.gemspec +30 -0
- data/spec/helpers/webmock_helper.rb +73 -0
- data/spec/memo_tomato/client_spec.rb +19 -0
- data/spec/memo_tomato/parser/movie_info_spec.rb +15 -0
- data/spec/memo_tomato/parser/search_movie_spec.rb +18 -0
- data/spec/memo_tomato/parser/similar_movies_spec.rb +13 -0
- data/spec/memo_tomato/parser/upcoming_movies_spec.rb +13 -0
- data/spec/mock_json/lists/movies/upcoming.json +788 -0
- data/spec/mock_json/movies/770672122/similar.json +375 -0
- data/spec/mock_json/movies/770672122.json +65 -0
- data/spec/mock_json/movies.json +1797 -0
- data/spec/spec_helper.rb +15 -0
- metadata +168 -0
@@ -0,0 +1,375 @@
|
|
1
|
+
{
|
2
|
+
"movies": [
|
3
|
+
{
|
4
|
+
"id": "770671912",
|
5
|
+
"title": "Up",
|
6
|
+
"year": 2009,
|
7
|
+
"mpaa_rating": "PG",
|
8
|
+
"runtime": 89,
|
9
|
+
"critics_consensus": "Another masterful work of art from Pixar, Up is an exciting, hilarious, and heartfelt adventure impeccably crafted and told with wit and depth.",
|
10
|
+
"release_dates": {
|
11
|
+
"theater": "2009-05-29",
|
12
|
+
"dvd": "2009-11-10"
|
13
|
+
},
|
14
|
+
"ratings": {
|
15
|
+
"critics_rating": "Certified Fresh",
|
16
|
+
"critics_score": 98,
|
17
|
+
"audience_rating": "Upright",
|
18
|
+
"audience_score": 86
|
19
|
+
},
|
20
|
+
"synopsis": "",
|
21
|
+
"posters": {
|
22
|
+
"thumbnail": "http://content7.flixster.com/movie/10/89/43/10894361_mob.jpg",
|
23
|
+
"profile": "http://content7.flixster.com/movie/10/89/43/10894361_pro.jpg",
|
24
|
+
"detailed": "http://content7.flixster.com/movie/10/89/43/10894361_det.jpg",
|
25
|
+
"original": "http://content7.flixster.com/movie/10/89/43/10894361_ori.jpg"
|
26
|
+
},
|
27
|
+
"abridged_cast": [
|
28
|
+
{
|
29
|
+
"name": "Edward Asner",
|
30
|
+
"id": "162659188",
|
31
|
+
"characters": [
|
32
|
+
"Carl Fredricksen"
|
33
|
+
]
|
34
|
+
},
|
35
|
+
{
|
36
|
+
"name": "Christopher Plummer",
|
37
|
+
"id": "162652929",
|
38
|
+
"characters": [
|
39
|
+
"Charles Muntz"
|
40
|
+
]
|
41
|
+
},
|
42
|
+
{
|
43
|
+
"name": "John Ratzenberger",
|
44
|
+
"id": "381422124",
|
45
|
+
"characters": [
|
46
|
+
"Construction Foreman Tom"
|
47
|
+
]
|
48
|
+
},
|
49
|
+
{
|
50
|
+
"name": "Bob Peterson",
|
51
|
+
"id": "770689967",
|
52
|
+
"characters": [
|
53
|
+
"Alpha",
|
54
|
+
"Dug"
|
55
|
+
]
|
56
|
+
},
|
57
|
+
{
|
58
|
+
"name": "Jordan Nagai",
|
59
|
+
"id": "770803286",
|
60
|
+
"characters": [
|
61
|
+
"Russell"
|
62
|
+
]
|
63
|
+
}
|
64
|
+
],
|
65
|
+
"alternate_ids": {
|
66
|
+
"imdb": "1049413"
|
67
|
+
},
|
68
|
+
"links": {
|
69
|
+
"self": "http://api.rottentomatoes.com/api/public/v1.0/movies/770671912.json",
|
70
|
+
"alternate": "http://www.rottentomatoes.com/m/up/",
|
71
|
+
"cast": "http://api.rottentomatoes.com/api/public/v1.0/movies/770671912/cast.json",
|
72
|
+
"clips": "http://api.rottentomatoes.com/api/public/v1.0/movies/770671912/clips.json",
|
73
|
+
"reviews": "http://api.rottentomatoes.com/api/public/v1.0/movies/770671912/reviews.json",
|
74
|
+
"similar": "http://api.rottentomatoes.com/api/public/v1.0/movies/770671912/similar.json"
|
75
|
+
}
|
76
|
+
},
|
77
|
+
{
|
78
|
+
"id": "9414",
|
79
|
+
"title": "Toy Story 2",
|
80
|
+
"year": 1999,
|
81
|
+
"mpaa_rating": "G",
|
82
|
+
"runtime": 92,
|
83
|
+
"critics_consensus": "Entertaining characters and eye-popping animation make this sequel an instant classic.",
|
84
|
+
"release_dates": {
|
85
|
+
"theater": "1999-11-24",
|
86
|
+
"dvd": "2000-10-17"
|
87
|
+
},
|
88
|
+
"ratings": {
|
89
|
+
"critics_rating": "Certified Fresh",
|
90
|
+
"critics_score": 100,
|
91
|
+
"audience_rating": "Upright",
|
92
|
+
"audience_score": 72
|
93
|
+
},
|
94
|
+
"synopsis": "",
|
95
|
+
"posters": {
|
96
|
+
"thumbnail": "http://content6.flixster.com/movie/10/93/63/10936392_mob.jpg",
|
97
|
+
"profile": "http://content6.flixster.com/movie/10/93/63/10936392_pro.jpg",
|
98
|
+
"detailed": "http://content6.flixster.com/movie/10/93/63/10936392_det.jpg",
|
99
|
+
"original": "http://content6.flixster.com/movie/10/93/63/10936392_ori.jpg"
|
100
|
+
},
|
101
|
+
"abridged_cast": [
|
102
|
+
{
|
103
|
+
"name": "Tom Hanks",
|
104
|
+
"id": "162655641",
|
105
|
+
"characters": [
|
106
|
+
"Woody"
|
107
|
+
]
|
108
|
+
},
|
109
|
+
{
|
110
|
+
"name": "Tim Allen",
|
111
|
+
"id": "162655909",
|
112
|
+
"characters": [
|
113
|
+
"Buzz Lightyear"
|
114
|
+
]
|
115
|
+
},
|
116
|
+
{
|
117
|
+
"name": "Joan Cusack",
|
118
|
+
"id": "162655020",
|
119
|
+
"characters": [
|
120
|
+
"Jessie the Cowgirl"
|
121
|
+
]
|
122
|
+
},
|
123
|
+
{
|
124
|
+
"name": "Kelsey Grammer",
|
125
|
+
"id": "162660300",
|
126
|
+
"characters": [
|
127
|
+
"Stinky Pete the Prospector"
|
128
|
+
]
|
129
|
+
},
|
130
|
+
{
|
131
|
+
"name": "Don Rickles",
|
132
|
+
"id": "341817905",
|
133
|
+
"characters": [
|
134
|
+
"Mr. Potato Head"
|
135
|
+
]
|
136
|
+
}
|
137
|
+
],
|
138
|
+
"alternate_ids": {
|
139
|
+
"imdb": "0120363"
|
140
|
+
},
|
141
|
+
"links": {
|
142
|
+
"self": "http://api.rottentomatoes.com/api/public/v1.0/movies/9414.json",
|
143
|
+
"alternate": "http://www.rottentomatoes.com/m/toy_story_2/",
|
144
|
+
"cast": "http://api.rottentomatoes.com/api/public/v1.0/movies/9414/cast.json",
|
145
|
+
"clips": "http://api.rottentomatoes.com/api/public/v1.0/movies/9414/clips.json",
|
146
|
+
"reviews": "http://api.rottentomatoes.com/api/public/v1.0/movies/9414/reviews.json",
|
147
|
+
"similar": "http://api.rottentomatoes.com/api/public/v1.0/movies/9414/similar.json"
|
148
|
+
}
|
149
|
+
},
|
150
|
+
{
|
151
|
+
"id": "9559",
|
152
|
+
"title": "Toy Story",
|
153
|
+
"year": 1995,
|
154
|
+
"mpaa_rating": "G",
|
155
|
+
"runtime": 80,
|
156
|
+
"critics_consensus": "As entertaining as it is innovative, Toy Story kicked off Pixar's unprecedented run of quality pictures, reinvigorating animated film in the process.",
|
157
|
+
"release_dates": {
|
158
|
+
"theater": "1995-11-22",
|
159
|
+
"dvd": "2001-03-20"
|
160
|
+
},
|
161
|
+
"ratings": {
|
162
|
+
"critics_rating": "Certified Fresh",
|
163
|
+
"critics_score": 100,
|
164
|
+
"audience_rating": "Upright",
|
165
|
+
"audience_score": 81
|
166
|
+
},
|
167
|
+
"synopsis": "",
|
168
|
+
"posters": {
|
169
|
+
"thumbnail": "http://content7.flixster.com/movie/10/93/63/10936393_mob.jpg",
|
170
|
+
"profile": "http://content7.flixster.com/movie/10/93/63/10936393_pro.jpg",
|
171
|
+
"detailed": "http://content7.flixster.com/movie/10/93/63/10936393_det.jpg",
|
172
|
+
"original": "http://content7.flixster.com/movie/10/93/63/10936393_ori.jpg"
|
173
|
+
},
|
174
|
+
"abridged_cast": [
|
175
|
+
{
|
176
|
+
"name": "Tom Hanks",
|
177
|
+
"id": "162655641",
|
178
|
+
"characters": [
|
179
|
+
"Woody"
|
180
|
+
]
|
181
|
+
},
|
182
|
+
{
|
183
|
+
"name": "Tim Allen",
|
184
|
+
"id": "162655909",
|
185
|
+
"characters": [
|
186
|
+
"Buzz Lightyear"
|
187
|
+
]
|
188
|
+
},
|
189
|
+
{
|
190
|
+
"name": "Don Rickles",
|
191
|
+
"id": "341817905",
|
192
|
+
"characters": [
|
193
|
+
"Mr. Potato Head"
|
194
|
+
]
|
195
|
+
},
|
196
|
+
{
|
197
|
+
"name": "Jim Varney",
|
198
|
+
"id": "162662792",
|
199
|
+
"characters": [
|
200
|
+
"Slinky Dog"
|
201
|
+
]
|
202
|
+
},
|
203
|
+
{
|
204
|
+
"name": "Wallace Shawn",
|
205
|
+
"id": "162671862",
|
206
|
+
"characters": [
|
207
|
+
"Rex"
|
208
|
+
]
|
209
|
+
}
|
210
|
+
],
|
211
|
+
"alternate_ids": {
|
212
|
+
"imdb": "0114709"
|
213
|
+
},
|
214
|
+
"links": {
|
215
|
+
"self": "http://api.rottentomatoes.com/api/public/v1.0/movies/9559.json",
|
216
|
+
"alternate": "http://www.rottentomatoes.com/m/toy_story/",
|
217
|
+
"cast": "http://api.rottentomatoes.com/api/public/v1.0/movies/9559/cast.json",
|
218
|
+
"clips": "http://api.rottentomatoes.com/api/public/v1.0/movies/9559/clips.json",
|
219
|
+
"reviews": "http://api.rottentomatoes.com/api/public/v1.0/movies/9559/reviews.json",
|
220
|
+
"similar": "http://api.rottentomatoes.com/api/public/v1.0/movies/9559/similar.json"
|
221
|
+
}
|
222
|
+
},
|
223
|
+
{
|
224
|
+
"id": "9749",
|
225
|
+
"title": "A Bug's Life",
|
226
|
+
"year": 1998,
|
227
|
+
"mpaa_rating": "G",
|
228
|
+
"runtime": 96,
|
229
|
+
"critics_consensus": "Blending top notch animation with rousing adventure, witty dialogue, and memorable characters, A Bug's Life is another Pixar winner.",
|
230
|
+
"release_dates": {
|
231
|
+
"theater": "1998-11-20",
|
232
|
+
"dvd": "1999-04-20"
|
233
|
+
},
|
234
|
+
"ratings": {
|
235
|
+
"critics_rating": "Certified Fresh",
|
236
|
+
"critics_score": 92,
|
237
|
+
"audience_rating": "Upright",
|
238
|
+
"audience_score": 61
|
239
|
+
},
|
240
|
+
"synopsis": "",
|
241
|
+
"posters": {
|
242
|
+
"thumbnail": "http://content9.flixster.com/movie/10/93/89/10938947_mob.jpg",
|
243
|
+
"profile": "http://content9.flixster.com/movie/10/93/89/10938947_pro.jpg",
|
244
|
+
"detailed": "http://content9.flixster.com/movie/10/93/89/10938947_det.jpg",
|
245
|
+
"original": "http://content9.flixster.com/movie/10/93/89/10938947_ori.jpg"
|
246
|
+
},
|
247
|
+
"abridged_cast": [
|
248
|
+
{
|
249
|
+
"name": "Dave Foley",
|
250
|
+
"id": "162657624",
|
251
|
+
"characters": [
|
252
|
+
"Flik"
|
253
|
+
]
|
254
|
+
},
|
255
|
+
{
|
256
|
+
"name": "Kevin Spacey",
|
257
|
+
"id": "162657625",
|
258
|
+
"characters": [
|
259
|
+
"Hopper"
|
260
|
+
]
|
261
|
+
},
|
262
|
+
{
|
263
|
+
"name": "Julia Louis-Dreyfus",
|
264
|
+
"id": "364622432",
|
265
|
+
"characters": [
|
266
|
+
"Princess Atta"
|
267
|
+
]
|
268
|
+
},
|
269
|
+
{
|
270
|
+
"name": "Hayden Panettiere",
|
271
|
+
"id": "162671852",
|
272
|
+
"characters": [
|
273
|
+
"Dot"
|
274
|
+
]
|
275
|
+
},
|
276
|
+
{
|
277
|
+
"name": "Phyllis Diller",
|
278
|
+
"id": "162653473",
|
279
|
+
"characters": [
|
280
|
+
"Queen"
|
281
|
+
]
|
282
|
+
}
|
283
|
+
],
|
284
|
+
"alternate_ids": {
|
285
|
+
"imdb": "0120623"
|
286
|
+
},
|
287
|
+
"links": {
|
288
|
+
"self": "http://api.rottentomatoes.com/api/public/v1.0/movies/9749.json",
|
289
|
+
"alternate": "http://www.rottentomatoes.com/m/bugs_life/",
|
290
|
+
"cast": "http://api.rottentomatoes.com/api/public/v1.0/movies/9749/cast.json",
|
291
|
+
"clips": "http://api.rottentomatoes.com/api/public/v1.0/movies/9749/clips.json",
|
292
|
+
"reviews": "http://api.rottentomatoes.com/api/public/v1.0/movies/9749/reviews.json",
|
293
|
+
"similar": "http://api.rottentomatoes.com/api/public/v1.0/movies/9749/similar.json"
|
294
|
+
}
|
295
|
+
},
|
296
|
+
{
|
297
|
+
"id": "9382",
|
298
|
+
"title": "Monsters, Inc.",
|
299
|
+
"year": 2001,
|
300
|
+
"mpaa_rating": "G",
|
301
|
+
"runtime": 92,
|
302
|
+
"critics_consensus": "Even though Monsters, Inc lacks the sophistication of the Toy Story series, it is a still delight for children of all ages.",
|
303
|
+
"release_dates": {
|
304
|
+
"theater": "2001-11-02",
|
305
|
+
"dvd": "2002-09-17"
|
306
|
+
},
|
307
|
+
"ratings": {
|
308
|
+
"critics_rating": "Certified Fresh",
|
309
|
+
"critics_score": 95,
|
310
|
+
"audience_rating": "Upright",
|
311
|
+
"audience_score": 83
|
312
|
+
},
|
313
|
+
"synopsis": "",
|
314
|
+
"posters": {
|
315
|
+
"thumbnail": "http://content8.flixster.com/movie/10/94/43/10944358_mob.jpg",
|
316
|
+
"profile": "http://content8.flixster.com/movie/10/94/43/10944358_pro.jpg",
|
317
|
+
"detailed": "http://content8.flixster.com/movie/10/94/43/10944358_det.jpg",
|
318
|
+
"original": "http://content8.flixster.com/movie/10/94/43/10944358_ori.jpg"
|
319
|
+
},
|
320
|
+
"abridged_cast": [
|
321
|
+
{
|
322
|
+
"name": "John Goodman",
|
323
|
+
"id": "162655706",
|
324
|
+
"characters": [
|
325
|
+
"James P. Sullivan \"Sully\""
|
326
|
+
]
|
327
|
+
},
|
328
|
+
{
|
329
|
+
"name": "Billy Crystal",
|
330
|
+
"id": "162655707",
|
331
|
+
"characters": [
|
332
|
+
"Mike Wazowski"
|
333
|
+
]
|
334
|
+
},
|
335
|
+
{
|
336
|
+
"name": "Mary Gibbs",
|
337
|
+
"id": "528361189",
|
338
|
+
"characters": [
|
339
|
+
"Boo"
|
340
|
+
]
|
341
|
+
},
|
342
|
+
{
|
343
|
+
"name": "Steve Buscemi",
|
344
|
+
"id": "162652875",
|
345
|
+
"characters": [
|
346
|
+
"Randall Boggs"
|
347
|
+
]
|
348
|
+
},
|
349
|
+
{
|
350
|
+
"name": "James Coburn",
|
351
|
+
"id": "162667873",
|
352
|
+
"characters": [
|
353
|
+
"Henry J. Waternoose"
|
354
|
+
]
|
355
|
+
}
|
356
|
+
],
|
357
|
+
"alternate_ids": {
|
358
|
+
"imdb": "0198781"
|
359
|
+
},
|
360
|
+
"links": {
|
361
|
+
"self": "http://api.rottentomatoes.com/api/public/v1.0/movies/9382.json",
|
362
|
+
"alternate": "http://www.rottentomatoes.com/m/monsters_inc/",
|
363
|
+
"cast": "http://api.rottentomatoes.com/api/public/v1.0/movies/9382/cast.json",
|
364
|
+
"clips": "http://api.rottentomatoes.com/api/public/v1.0/movies/9382/clips.json",
|
365
|
+
"reviews": "http://api.rottentomatoes.com/api/public/v1.0/movies/9382/reviews.json",
|
366
|
+
"similar": "http://api.rottentomatoes.com/api/public/v1.0/movies/9382/similar.json"
|
367
|
+
}
|
368
|
+
}
|
369
|
+
],
|
370
|
+
"links": {
|
371
|
+
"rel": "http://api.rottentomatoes.com/api/public/v1.0/movies/770672122.json",
|
372
|
+
"self": "http://api.rottentomatoes.com/api/public/v1.0/movies/770672122/similar?limit=5"
|
373
|
+
},
|
374
|
+
"link_template": "http://api.rottentomatoes.com/api/public/v1.0/movies/770672122/similar?limit={num_results}"
|
375
|
+
}
|
@@ -0,0 +1,65 @@
|
|
1
|
+
{
|
2
|
+
"id": 770672122,
|
3
|
+
"title": "Toy Story 3",
|
4
|
+
"year": 2010,
|
5
|
+
"genres": [
|
6
|
+
"Animation",
|
7
|
+
"Kids & Family",
|
8
|
+
"Science Fiction & Fantasy",
|
9
|
+
"Comedy"
|
10
|
+
],
|
11
|
+
"mpaa_rating": "G",
|
12
|
+
"runtime": 103,
|
13
|
+
"critics_consensus": "Deftly blending comedy, adventure, and honest emotion, Toy Story 3 is a rare second sequel that really works.",
|
14
|
+
"release_dates": {
|
15
|
+
"theater": "2010-06-18",
|
16
|
+
"dvd": "2010-11-02"
|
17
|
+
},
|
18
|
+
"ratings": {
|
19
|
+
"critics_rating": "Certified Fresh",
|
20
|
+
"critics_score": 99,
|
21
|
+
"audience_rating": "Upright",
|
22
|
+
"audience_score": 91
|
23
|
+
},
|
24
|
+
"synopsis": "Pixar returns to their first success with Toy Story 3. The movie begins with Andy leaving for college and donating his beloved toys -- including Woody (Tom Hanks) and Buzz (Tim Allen) -- to a daycare. While the crew meets new friends, including Ken (Michael Keaton), they soon grow to hate their new surroundings and plan an escape. The film was directed by Lee Unkrich from a script co-authored by Little Miss Sunshine scribe Michael Arndt. ~ Perry Seibert, Rovi",
|
25
|
+
"posters": {
|
26
|
+
"thumbnail": "http://content6.flixster.com/movie/11/13/43/11134356_mob.jpg",
|
27
|
+
"profile": "http://content6.flixster.com/movie/11/13/43/11134356_pro.jpg",
|
28
|
+
"detailed": "http://content6.flixster.com/movie/11/13/43/11134356_det.jpg",
|
29
|
+
"original": "http://content6.flixster.com/movie/11/13/43/11134356_ori.jpg"
|
30
|
+
},
|
31
|
+
"abridged_cast": [
|
32
|
+
{
|
33
|
+
"name": "Tom Hanks",
|
34
|
+
"characters": ["Woody"]
|
35
|
+
},
|
36
|
+
{
|
37
|
+
"name": "Tim Allen",
|
38
|
+
"characters": ["Buzz Lightyear"]
|
39
|
+
},
|
40
|
+
{
|
41
|
+
"name": "Joan Cusack",
|
42
|
+
"characters": ["Jessie the Cowgirl"]
|
43
|
+
},
|
44
|
+
{
|
45
|
+
"name": "Don Rickles",
|
46
|
+
"characters": ["Mr. Potato Head"]
|
47
|
+
},
|
48
|
+
{
|
49
|
+
"name": "Wallace Shawn",
|
50
|
+
"characters": ["Rex"]
|
51
|
+
}
|
52
|
+
],
|
53
|
+
"abridged_directors": [{"name": "Lee Unkrich"}],
|
54
|
+
"studio": "Walt Disney Pictures",
|
55
|
+
"alternate_ids": {"imdb": "0435761"},
|
56
|
+
"links": {
|
57
|
+
"self": "http://api.rottentomatoes.com/api/public/v1.0/movies/770672122.json",
|
58
|
+
"alternate": "http://www.rottentomatoes.com/m/toy_story_3/",
|
59
|
+
"cast": "http://api.rottentomatoes.com/api/public/v1.0/movies/770672122/cast.json",
|
60
|
+
"clips": "http://api.rottentomatoes.com/api/public/v1.0/movies/770672122/clips.json",
|
61
|
+
"reviews": "http://api.rottentomatoes.com/api/public/v1.0/movies/770672122/reviews.json",
|
62
|
+
"similar": "http://api.rottentomatoes.com/api/public/v1.0/movies/770672122/similar.json"
|
63
|
+
}
|
64
|
+
}
|
65
|
+
|