tmdb-api 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +17 -0
  3. data/.rspec +1 -0
  4. data/Gemfile +3 -0
  5. data/LICENSE.txt +22 -0
  6. data/README.md +148 -0
  7. data/Rakefile +1 -0
  8. data/lib/tmdb.rb +18 -0
  9. data/lib/tmdb/changes.rb +22 -0
  10. data/lib/tmdb/fetcher.rb +30 -0
  11. data/lib/tmdb/movie.rb +105 -0
  12. data/lib/tmdb/searchable.rb +33 -0
  13. data/lib/tmdb/version.rb +3 -0
  14. data/spec/fixtures/alternative_titles.json +41 -0
  15. data/spec/fixtures/alternative_titles_by_country.json +9 -0
  16. data/spec/fixtures/changes/movie_changes.json +407 -0
  17. data/spec/fixtures/changes/movie_changes_page_2.json +407 -0
  18. data/spec/fixtures/changes/movie_changes_start_date.json +407 -0
  19. data/spec/fixtures/find_movie.json +19 -0
  20. data/spec/fixtures/find_movie_by_id.json +85 -0
  21. data/spec/fixtures/find_movie_by_id_and_language.json +66 -0
  22. data/spec/fixtures/invalid_id.json +4 -0
  23. data/spec/fixtures/movie/upcoming.json +251 -0
  24. data/spec/fixtures/movie/upcoming_page_2.json +251 -0
  25. data/spec/fixtures/movie_images.json +214 -0
  26. data/spec/fixtures/movie_images_by_language.json +42 -0
  27. data/spec/fixtures/movie_keywords.json +33 -0
  28. data/spec/fixtures/movie_releases.json +35 -0
  29. data/spec/fixtures/no_results.json +6 -0
  30. data/spec/fixtures/search_movie_by_name.json +91 -0
  31. data/spec/fixtures/search_movie_by_name_and_adult_filter.json +55 -0
  32. data/spec/fixtures/search_movie_by_name_and_page.json +247 -0
  33. data/spec/fixtures/search_movie_by_name_and_year.json +19 -0
  34. data/spec/spec_helper.rb +19 -0
  35. data/spec/support/stubber.rb +33 -0
  36. data/spec/tmdb/changes_spec.rb +52 -0
  37. data/spec/tmdb/movie/upcoming_spec.rb +28 -0
  38. data/spec/tmdb/movie_spec.rb +473 -0
  39. data/spec/tmdb/searchable_spec.rb +9 -0
  40. data/spec/tmdb/tmdb_spec.rb +13 -0
  41. data/tmdb.gemspec +28 -0
  42. metadata +195 -0
@@ -0,0 +1,214 @@
1
+ {
2
+ "id": 598,
3
+ "backdrops": [
4
+ {
5
+ "file_path": "/hSaH9tt67bozo9K50sbH0s4YjEc.jpg",
6
+ "width": 1532,
7
+ "height": 862,
8
+ "iso_639_1": null,
9
+ "aspect_ratio": 1.78,
10
+ "vote_average": 5.4421768707483,
11
+ "vote_count": 7
12
+ },
13
+ {
14
+ "file_path": "/k4BAPrE5WkNLvpsPsiMfu8W4Zyi.jpg",
15
+ "width": 1920,
16
+ "height": 1080,
17
+ "iso_639_1": null,
18
+ "aspect_ratio": 1.78,
19
+ "vote_average": 5.399159663865546,
20
+ "vote_count": 5
21
+ },
22
+ {
23
+ "file_path": "/wBTfzp1x4TmnDh4P55ioXNYtNTa.jpg",
24
+ "width": 1280,
25
+ "height": 720,
26
+ "iso_639_1": null,
27
+ "aspect_ratio": 1.78,
28
+ "vote_average": 5.353741496598639,
29
+ "vote_count": 7
30
+ },
31
+ {
32
+ "file_path": "/uAJkCmS0Rg7vwTKUKbR80Q2tyIC.jpg",
33
+ "width": 1920,
34
+ "height": 1080,
35
+ "iso_639_1": null,
36
+ "aspect_ratio": 1.78,
37
+ "vote_average": 5.311871227364184,
38
+ "vote_count": 8
39
+ },
40
+ {
41
+ "file_path": "/jeRxSxEqliXdP0dXHXSLEgA6ZPp.jpg",
42
+ "width": 1280,
43
+ "height": 720,
44
+ "iso_639_1": null,
45
+ "aspect_ratio": 1.78,
46
+ "vote_average": 5.196078431372549,
47
+ "vote_count": 5
48
+ },
49
+ {
50
+ "file_path": "/7ykBZ8IJohJsDSdASQsmLCB2jgX.jpg",
51
+ "width": 1920,
52
+ "height": 1080,
53
+ "iso_639_1": null,
54
+ "aspect_ratio": 1.78,
55
+ "vote_average": 5.106227106227106,
56
+ "vote_count": 2
57
+ },
58
+ {
59
+ "file_path": "/iEXK18sjk6FMWqEqMEg49UHKEz1.jpg",
60
+ "width": 1280,
61
+ "height": 720,
62
+ "iso_639_1": null,
63
+ "aspect_ratio": 1.78,
64
+ "vote_average": 0,
65
+ "vote_count": 0
66
+ }
67
+ ],
68
+ "posters": [
69
+ {
70
+ "file_path": "/mwDnSQR1CkxuDjSKfgiNT0sIOjM.jpg",
71
+ "width": 1000,
72
+ "height": 1500,
73
+ "iso_639_1": "en",
74
+ "aspect_ratio": 0.67,
75
+ "vote_average": 5.384615384615385,
76
+ "vote_count": 2
77
+ },
78
+ {
79
+ "file_path": "/sxmY85UrSYN4y8sZSzO9LKpPgSA.jpg",
80
+ "width": 2000,
81
+ "height": 2950,
82
+ "iso_639_1": "en",
83
+ "aspect_ratio": 0.68,
84
+ "vote_average": 5.299145299145299,
85
+ "vote_count": 15
86
+ },
87
+ {
88
+ "file_path": "/gCqnQaq8T4CfioP9uETLx9iMJF4.jpg",
89
+ "width": 1000,
90
+ "height": 1500,
91
+ "iso_639_1": "en",
92
+ "aspect_ratio": 0.67,
93
+ "vote_average": 5.291005291005291,
94
+ "vote_count": 9
95
+ },
96
+ {
97
+ "file_path": "/c9qkycW5DFsycCmuPDPnWvpmCJ5.jpg",
98
+ "width": 748,
99
+ "height": 1102,
100
+ "iso_639_1": "pt",
101
+ "aspect_ratio": 0.68,
102
+ "vote_average": 5.27891156462585,
103
+ "vote_count": 7
104
+ },
105
+ {
106
+ "file_path": "/3qJKUKh80c9334Vthaga3IKrlsw.jpg",
107
+ "width": 1000,
108
+ "height": 1500,
109
+ "iso_639_1": "en",
110
+ "aspect_ratio": 0.67,
111
+ "vote_average": 5.273109243697479,
112
+ "vote_count": 5
113
+ },
114
+ {
115
+ "file_path": "/iB1MiKFvCJI6AOcE7eCsD4Vrodo.jpg",
116
+ "width": 1017,
117
+ "height": 1500,
118
+ "iso_639_1": "en",
119
+ "aspect_ratio": 0.68,
120
+ "vote_average": 5.264922870556673,
121
+ "vote_count": 8
122
+ },
123
+ {
124
+ "file_path": "/nKtDvx5DvwGnftrmiAijK9Rb0DD.jpg",
125
+ "width": 1000,
126
+ "height": 1500,
127
+ "iso_639_1": "pt",
128
+ "aspect_ratio": 0.67,
129
+ "vote_average": 5.259417199715708,
130
+ "vote_count": 4
131
+ },
132
+ {
133
+ "file_path": "/doVs54x1NGPGS3fOXL9rVsO0Bzm.jpg",
134
+ "width": 1000,
135
+ "height": 1500,
136
+ "iso_639_1": "pt",
137
+ "aspect_ratio": 0.67,
138
+ "vote_average": 5.259417199715708,
139
+ "vote_count": 4
140
+ },
141
+ {
142
+ "file_path": "/qQ05XhFstOCcxI7PJkbCXX4MpFM.jpg",
143
+ "width": 1000,
144
+ "height": 1500,
145
+ "iso_639_1": "en",
146
+ "aspect_ratio": 0.67,
147
+ "vote_average": 5.2523098791755505,
148
+ "vote_count": 4
149
+ },
150
+ {
151
+ "file_path": "/dLAwMgwiEniNR8wSfPp1zlzr7DC.jpg",
152
+ "width": 713,
153
+ "height": 1002,
154
+ "iso_639_1": "hu",
155
+ "aspect_ratio": 0.71,
156
+ "vote_average": 5.245421245421245,
157
+ "vote_count": 2
158
+ },
159
+ {
160
+ "file_path": "/zWKC19pOuyvNdMwCCYb6iWTk5Di.jpg",
161
+ "width": 708,
162
+ "height": 1052,
163
+ "iso_639_1": "uk",
164
+ "aspect_ratio": 0.67,
165
+ "vote_average": 5.187590187590187,
166
+ "vote_count": 3
167
+ },
168
+ {
169
+ "file_path": "/y1mWAPMwO0KR86vrMpx1IwGWtXZ.jpg",
170
+ "width": 600,
171
+ "height": 800,
172
+ "iso_639_1": "fr",
173
+ "aspect_ratio": 0.75,
174
+ "vote_average": 5.173160173160173,
175
+ "vote_count": 3
176
+ },
177
+ {
178
+ "file_path": "/zMMUsFX3ZeIr5NZyXqZQdfQU1fT.jpg",
179
+ "width": 1000,
180
+ "height": 1473,
181
+ "iso_639_1": "pt",
182
+ "aspect_ratio": 0.68,
183
+ "vote_average": 0,
184
+ "vote_count": 0
185
+ },
186
+ {
187
+ "file_path": "/qeGhDvouSnhllFUfOO0BA2ttXud.jpg",
188
+ "width": 668,
189
+ "height": 945,
190
+ "iso_639_1": "es",
191
+ "aspect_ratio": 0.71,
192
+ "vote_average": 0,
193
+ "vote_count": 0
194
+ },
195
+ {
196
+ "file_path": "/qiMvMdmsmDQP8hCzJs3PX7NNZkv.jpg",
197
+ "width": 800,
198
+ "height": 1140,
199
+ "iso_639_1": "ru",
200
+ "aspect_ratio": 0.7,
201
+ "vote_average": 0,
202
+ "vote_count": 0
203
+ },
204
+ {
205
+ "file_path": "/mjTPNpNTlJyTxyNtLnaY2iqz51R.jpg",
206
+ "width": 400,
207
+ "height": 566,
208
+ "iso_639_1": "hu",
209
+ "aspect_ratio": 0.71,
210
+ "vote_average": 0,
211
+ "vote_count": 0
212
+ }
213
+ ]
214
+ }
@@ -0,0 +1,42 @@
1
+ {
2
+ "id": 598,
3
+ "backdrops": [],
4
+ "posters": [
5
+ {
6
+ "file_path": "/c9qkycW5DFsycCmuPDPnWvpmCJ5.jpg",
7
+ "width": 748,
8
+ "height": 1102,
9
+ "iso_639_1": "pt",
10
+ "aspect_ratio": 0.68,
11
+ "vote_average": 5.27891156462585,
12
+ "vote_count": 7
13
+ },
14
+ {
15
+ "file_path": "/nKtDvx5DvwGnftrmiAijK9Rb0DD.jpg",
16
+ "width": 1000,
17
+ "height": 1500,
18
+ "iso_639_1": "pt",
19
+ "aspect_ratio": 0.67,
20
+ "vote_average": 5.259417199715708,
21
+ "vote_count": 4
22
+ },
23
+ {
24
+ "file_path": "/doVs54x1NGPGS3fOXL9rVsO0Bzm.jpg",
25
+ "width": 1000,
26
+ "height": 1500,
27
+ "iso_639_1": "pt",
28
+ "aspect_ratio": 0.67,
29
+ "vote_average": 5.259417199715708,
30
+ "vote_count": 4
31
+ },
32
+ {
33
+ "file_path": "/zMMUsFX3ZeIr5NZyXqZQdfQU1fT.jpg",
34
+ "width": 1000,
35
+ "height": 1473,
36
+ "iso_639_1": "pt",
37
+ "aspect_ratio": 0.68,
38
+ "vote_average": 0,
39
+ "vote_count": 0
40
+ }
41
+ ]
42
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "id": 598,
3
+ "keywords": [
4
+ {
5
+ "id": 542,
6
+ "name": "street gang"
7
+ },
8
+ {
9
+ "id": 983,
10
+ "name": "brazilian"
11
+ },
12
+ {
13
+ "id": 1228,
14
+ "name": "seventies"
15
+ },
16
+ {
17
+ "id": 1525,
18
+ "name": "puberty"
19
+ },
20
+ {
21
+ "id": 1687,
22
+ "name": "80s"
23
+ },
24
+ {
25
+ "id": 2394,
26
+ "name": "ghetto"
27
+ },
28
+ {
29
+ "id": 2987,
30
+ "name": "gang war"
31
+ }
32
+ ]
33
+ }
@@ -0,0 +1,35 @@
1
+ {
2
+ "id": 598,
3
+ "countries": [
4
+ {
5
+ "iso_3166_1": "RU",
6
+ "certification": "",
7
+ "release_date": "2002-02-05"
8
+ },
9
+ {
10
+ "iso_3166_1": "US",
11
+ "certification": "R",
12
+ "release_date": "2002-08-31"
13
+ },
14
+ {
15
+ "iso_3166_1": "BR",
16
+ "certification": "",
17
+ "release_date": "2002-08-30"
18
+ },
19
+ {
20
+ "iso_3166_1": "CA",
21
+ "certification": "",
22
+ "release_date": "2002-09-06"
23
+ },
24
+ {
25
+ "iso_3166_1": "GB",
26
+ "certification": "18",
27
+ "release_date": "2002-11-08"
28
+ },
29
+ {
30
+ "iso_3166_1": "DE",
31
+ "certification": "16",
32
+ "release_date": "2003-05-08"
33
+ }
34
+ ]
35
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "page": 1,
3
+ "results": [],
4
+ "total_pages": 0,
5
+ "total_results": 0
6
+ }
@@ -0,0 +1,91 @@
1
+ {
2
+ "page": 1,
3
+ "results": [
4
+ {
5
+ "adult": false,
6
+ "backdrop_path": "/pIUvQ9Ed35wlWhY2oU6OmwEsmzG.jpg",
7
+ "id": 120,
8
+ "original_title": "The Lord of the Rings: The Fellowship of the Ring",
9
+ "release_date": "2001-12-19",
10
+ "poster_path": "/9HG6pINW1KoFTAKY3LdybkoOKAm.jpg",
11
+ "popularity": 10.895025450078979,
12
+ "title": "The Lord of the Rings: The Fellowship of the Ring",
13
+ "vote_average": 8.3,
14
+ "vote_count": 187
15
+ },
16
+ {
17
+ "adult": false,
18
+ "backdrop_path": "/8BPZO0Bf8TeAy8znF43z8soK3ys.jpg",
19
+ "id": 122,
20
+ "original_title": "The Lord of the Rings: The Return of the King",
21
+ "release_date": "2003-12-17",
22
+ "poster_path": "/j6NCjU6Zh7SkfIeN5zDaoTmBn4m.jpg",
23
+ "popularity": 8.403090140296683,
24
+ "title": "The Lord of the Rings: The Return of the King",
25
+ "vote_average": 8.5,
26
+ "vote_count": 214
27
+ },
28
+ {
29
+ "adult": false,
30
+ "backdrop_path": "/dG4BmM32XJmKiwopLDQmvXEhuHB.jpg",
31
+ "id": 121,
32
+ "original_title": "The Lord of the Rings: The Two Towers",
33
+ "release_date": "2002-12-18",
34
+ "poster_path": "/9mBjBuUmBBgnGjV1JZ2uCIYbaph.jpg",
35
+ "popularity": 6.195790484527006,
36
+ "title": "The Lord of the Rings: The Two Towers",
37
+ "vote_average": 8.5,
38
+ "vote_count": 160
39
+ },
40
+ {
41
+ "adult": false,
42
+ "backdrop_path": "/waZyrTHpdufOXfR7feXdYHSFke8.jpg",
43
+ "id": 123,
44
+ "original_title": "The Lord of the Rings",
45
+ "release_date": "1978-11-15",
46
+ "poster_path": "/3DsGYPcvKQ9MAfgi70MVEorB8kN.jpg",
47
+ "popularity": 0.8274961462741193,
48
+ "title": "The Lord of the Rings",
49
+ "vote_average": 6,
50
+ "vote_count": 7
51
+ },
52
+ {
53
+ "adult": false,
54
+ "backdrop_path": "/FeMrIxUO2G2tB6JXY6kjgTbXho.jpg",
55
+ "id": 17632,
56
+ "original_title": "The Hunt for Gollum",
57
+ "release_date": "2009-05-04",
58
+ "poster_path": "/t1oWnjAm80QW0YFeSk5BbFlgkuS.jpg",
59
+ "popularity": 0.6196126421351771,
60
+ "title": "The Hunt for Gollum",
61
+ "vote_average": 7.2,
62
+ "vote_count": 5
63
+ },
64
+ {
65
+ "adult": false,
66
+ "backdrop_path": null,
67
+ "id": 71506,
68
+ "original_title": "Ringers - Lord of the Fans",
69
+ "release_date": "2005-01-21",
70
+ "poster_path": "/nZ1uvAMiX5Hxiq0ZxRzc2NhFOQY.jpg",
71
+ "popularity": 0.4222676000000001,
72
+ "title": "Ringers - Lord of the Fans",
73
+ "vote_average": 3,
74
+ "vote_count": 1
75
+ },
76
+ {
77
+ "adult": false,
78
+ "backdrop_path": "/9kw9LqyNmgru8qFEoTZE9towoiU.jpg",
79
+ "id": 155586,
80
+ "original_title": "Creating the Lord of the Rings Symphony: A Composer's Journey Through Middle-Earth",
81
+ "release_date": null,
82
+ "poster_path": "/uIXyk22hfxrwXrOX8RdhovvNJHn.jpg",
83
+ "popularity": 0.2,
84
+ "title": "Creating the Lord of the Rings Symphony: A Composer's Journey Through Middle-Earth",
85
+ "vote_average": 0,
86
+ "vote_count": 0
87
+ }
88
+ ],
89
+ "total_pages": 1,
90
+ "total_results": 7
91
+ }
@@ -0,0 +1,55 @@
1
+ {
2
+ "page": 1,
3
+ "results": [
4
+ {
5
+ "adult": true,
6
+ "backdrop_path": null,
7
+ "id": 68025,
8
+ "original_title": "Gang Bang 5",
9
+ "release_date": null,
10
+ "poster_path": "/j2rfswcwXNSzYKORb5tJQO7u4UY.jpg",
11
+ "popularity": 0.4,
12
+ "title": "Gang Bang 5",
13
+ "vote_average": 0,
14
+ "vote_count": 0
15
+ },
16
+ {
17
+ "adult": true,
18
+ "backdrop_path": null,
19
+ "id": 188910,
20
+ "original_title": "Vivi Ronaldinha Gang Bang",
21
+ "release_date": "2009-02-18",
22
+ "poster_path": "/yFa1JO9j9ylKuZc9Nmlh0UCz2QI.jpg",
23
+ "popularity": 0.26,
24
+ "title": "Vivi Ronaldinha Gang Bang",
25
+ "vote_average": 0,
26
+ "vote_count": 0
27
+ },
28
+ {
29
+ "adult": true,
30
+ "backdrop_path": null,
31
+ "id": 83948,
32
+ "original_title": "My 1st Gang Bang 5",
33
+ "release_date": "1900-01-01",
34
+ "poster_path": "/hrzfNh6UjIaCu1zlrIpSw5q0jMj.jpg",
35
+ "popularity": 0.2,
36
+ "title": "My 1st Gang Bang 5",
37
+ "vote_average": 0,
38
+ "vote_count": 0
39
+ },
40
+ {
41
+ "adult": true,
42
+ "backdrop_path": null,
43
+ "id": 61479,
44
+ "original_title": "My First Gang Bang #5",
45
+ "release_date": "1901-01-01",
46
+ "poster_path": "/5hJCJLtNlsbwcnViDD1krNRXw3u.jpg",
47
+ "popularity": 0.47800000000000004,
48
+ "title": "My First Gang Bang #5",
49
+ "vote_average": 0,
50
+ "vote_count": 0
51
+ }
52
+ ],
53
+ "total_pages": 1,
54
+ "total_results": 4
55
+ }