tmdb_rexx 0.3.0 → 0.4.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 619d2a6621720c0066a6426cbb3fba5c19a73d0c
4
- data.tar.gz: 35c8cad72c301475fe237d2013e2395c319353dd
3
+ metadata.gz: 54b38fe1c487845a60e81c848d8598c6e3eb739e
4
+ data.tar.gz: f05209aa604706fea77a3f8d6ba821b3caef181d
5
5
  SHA512:
6
- metadata.gz: 2fd505943d45eeb297855ba0eaba3da0388198196302438ef22a383e7da90341c613148a7d13ad92b05bec7b032059edabef3d286a0702729f0ded8bdf4156da
7
- data.tar.gz: ace8ae840d15b1df5d3c016b27fc792379d796c41e772945efaa0e538b42f58d103050f8894828d4c2419f1a05d5af3d6a1c07dc9008896ee2540aced36a7e35
6
+ metadata.gz: 12b917c3d1555f31e39197e60d7f0b1a93b54355f9c99f6878eb6df3893971f6a56c5f86db9f74f005572dbdfe091c1b6ca46933ad13e4a7d17bee0b07c35d8a
7
+ data.tar.gz: 31f34dcfe3bcfabae5d39e040c0ca254f33ad13ae7528a380a81c2548c4497e1ab4bc2f6ddcba83841560af7b2ecea8f8ce2bd74b616a0866a0753fa26b47e4a
@@ -20,6 +20,7 @@ require 'tmdb_rexx/client/review'
20
20
  require 'tmdb_rexx/client/timezone'
21
21
  require 'tmdb_rexx/client/person'
22
22
  require 'tmdb_rexx/client/search'
23
+ require 'tmdb_rexx/client/tv'
23
24
 
24
25
  module TmdbRexx
25
26
  class Client
@@ -44,6 +45,7 @@ module TmdbRexx
44
45
  include TmdbRexx::Client::Timezone
45
46
  include TmdbRexx::Client::Person
46
47
  include TmdbRexx::Client::Search
48
+ include TmdbRexx::Client::Tv
47
49
 
48
50
  def initialize(options = {})
49
51
  TmdbRexx::Configuration.keys.each do |key|
@@ -0,0 +1,273 @@
1
+ module TmdbRexx
2
+ class Client
3
+ module Tv
4
+ RESOURCE = "tv".freeze
5
+
6
+ # Get the primary information about a TV series by id.
7
+ #
8
+ # @see http://docs.themoviedb.apiary.io/#reference/tvs/tvid
9
+ #
10
+ # @param [String] id the tv id
11
+ #
12
+ # @return [Hashie::Mash] build response
13
+ #
14
+ # @example Get the tv api response
15
+ # TmdbRexx::Client.tv("tv-id")
16
+ def tv(tv_id, options = {})
17
+ get([RESOURCE, tv_id].join("/"), options)
18
+ end
19
+
20
+ # Get the alternative titles for a specific show ID.
21
+ #
22
+ # @see http://docs.themoviedb.apiary.io/#reference/tv/tvidalternativetitles
23
+ #
24
+ # @param [String] id the tv id
25
+ #
26
+ # @return [Hashie::Mash] build response
27
+ #
28
+ # @example Get the tv alternative titles api response
29
+ # TmdbRexx::Client.tv_alternative_titles("tv-id")
30
+ def tv_alternative_titles(tv_id, options = {})
31
+ get([RESOURCE, tv_id, "alternative_titles"].join("/"), options)
32
+ end
33
+
34
+ # Get the changes for a specific TV show id.Changes are grouped by key,
35
+ # and ordered by date in descending order. By default, only the last 24
36
+ # hours of changes are returned. The maximum number of days that can be
37
+ # returned in a single request is 14. The language is present on fields
38
+ # that are translatable.TV changes are different than movie changes in
39
+ # that there are some edits on seasons and episodes that will create a
40
+ # change entry at the show level. They can be found under the season and
41
+ # episode keys. These keys will contain a series_id and episode_id. You
42
+ # can use the /tv/season/{id}/changes and /tv/episode/{id}/changes
43
+ # methods to look up these specific changes.
44
+ #
45
+ # @see http://docs.themoviedb.apiary.io/#reference/tv/tvidchanges
46
+ #
47
+ # @param [String] id the tv id
48
+ #
49
+ # @return [Hashie::Mash] build response
50
+ #
51
+ # @example Get the tv changes
52
+ # TmdbRexx::Client.tv_changes("tv-id")
53
+ def tv_changes(tv_id, options = {})
54
+ get([RESOURCE, tv_id, "changes"].join("/"), options)
55
+ end
56
+
57
+ # Get the content ratings for a specific TV show id.
58
+ #
59
+ # @see http://docs.themoviedb.apiary.io/#reference/tv/tvidcontentratings
60
+ #
61
+ # @param [String] id the tv id
62
+ #
63
+ # @return [Hashie::Mash] build response
64
+ #
65
+ # @example Get the tv content_ratings
66
+ # TmdbRexx::Client.tv_content_ratings("tv-id")
67
+ def tv_content_ratings(tv_id, options = {})
68
+ get([RESOURCE, tv_id, "content_ratings"].join("/"), options)
69
+ end
70
+
71
+ # Get the cast & crew information about a TV series. Just like the
72
+ # website, we pull this information from the last season of the series.
73
+ #
74
+ # @see http://docs.themoviedb.apiary.io/#reference/tv/tvidcredits
75
+ #
76
+ # @param [String] id the tv id
77
+ #
78
+ # @return [Hashie::Mash] build response
79
+ #
80
+ # @example Get the tv credits api response
81
+ # TmdbRexx::Client.tv_credits("tv-id")
82
+ def tv_credits(tv_id, options = {})
83
+ get([RESOURCE, tv_id, "credits"].join("/"), options)
84
+ end
85
+
86
+ # Get the external ids that we have stored for a TV series.
87
+ #
88
+ # @see http://docs.themoviedb.apiary.io/#reference/tv/tvidexternalids
89
+ #
90
+ # @param [String] id the tv id
91
+ #
92
+ # @return [Hashie::Mash] build response
93
+ #
94
+ # @example Get the tv external_ids api response
95
+ # TmdbRexx::Client.tv_external_ids("tv-id")
96
+ def tv_external_ids(tv_id, options = {})
97
+ get([RESOURCE, tv_id, "external_ids"].join("/"), options)
98
+ end
99
+
100
+ # Get the images (posters and backdrops) for a specific tv id.
101
+ #
102
+ # @see http://docs.themoviedb.apiary.io/#reference/tv/tvimages
103
+ #
104
+ # @param [String] id the tv id
105
+ #
106
+ # @return [Hashie::Mash] build response
107
+ #
108
+ # @example Get the tv images api response
109
+ # TmdbRexx::Client.tv_images("tv-id")
110
+ def tv_images(tv_id, options = {})
111
+ get([RESOURCE, tv_id, "images"].join("/"), options)
112
+ end
113
+
114
+ # Get the backdrops for a specific tv id.
115
+ # This is a convenience method base on .tv_images
116
+ #
117
+ # @param [String] id the tv id
118
+ #
119
+ # @return [Hashie::Mash] build response
120
+ #
121
+ # @example Get the tv backdrops
122
+ # TmdbRexx::Client.tv_backdrops("tv-id")
123
+ def tv_backdrops(tv_id, options = {})
124
+ get([RESOURCE, tv_id, "images"].join("/"), options).backdrops
125
+ end
126
+
127
+ # Get the posters for a specific tv id.
128
+ # This is a convenience method base on .tv_images
129
+ #
130
+ # @param [String] id the tv id
131
+ #
132
+ # @return [Hashie::Mash] build response
133
+ #
134
+ # @example Get the tv posters
135
+ # TmdbRexx::Client.tv_posters("tv-id")
136
+ def tv_posters(tv_id, options = {})
137
+ get([RESOURCE, tv_id, "images"].join("/"), options).posters
138
+ end
139
+
140
+ # Get the plot keywords for a specific tv id.
141
+ #
142
+ # @see http://docs.themoviedb.apiary.io/#reference/tv/tvidkeywords
143
+ #
144
+ # @param [String] id the tv id
145
+ #
146
+ # @return [Hashie::Mash] build response
147
+ #
148
+ # @example Get the tv keywords
149
+ # TmdbRexx::Client.tv_keywords("tv-id")
150
+ def tv_keywords(tv_id, options = {})
151
+ get([RESOURCE, tv_id, "keywords"].join("/"), options)
152
+ end
153
+
154
+ # Get the translations for a specific tv id.
155
+ #
156
+ # @see http://docs.themoviedb.apiary.io/#reference/tv/tvidtranslations
157
+ #
158
+ # @param [String] id the tv id
159
+ #
160
+ # @return [Hashie::Mash] build response
161
+ #
162
+ # @example Get the tv translations
163
+ # TmdbRexx::Client.tv_translations("tv-id")
164
+ def tv_translations(tv_id, options = {})
165
+ get([RESOURCE, tv_id, "translations"].join("/"), options)
166
+ end
167
+
168
+ # Get the similar shows for a specific tv id.
169
+ #
170
+ # @see http://docs.themoviedb.apiary.io/#reference/tv/tvidsimilar
171
+ #
172
+ # @param [String] id the tv id
173
+ #
174
+ # @return [Hashie::Mash] build response
175
+ #
176
+ # @example Get the similar tvs
177
+ # TmdbRexx::Client.similar_tvs("tv-id")
178
+ def similar_tvs(tv_id, options = {})
179
+ get([RESOURCE, tv_id, "similar"].join("/"), options)
180
+ end
181
+
182
+ # Get the videos (trailers, teasers, clips, etc...) for a specific tv id.
183
+ #
184
+ # @see http://docs.themoviedb.apiary.io/#reference/tv/tvidvideos
185
+ #
186
+ # @param [String] id the tv id
187
+ #
188
+ # @return [Hashie::Mash] build response
189
+ #
190
+ # @example Get the tv videos
191
+ # TmdbRexx::Client.tv_videos("tv-id")
192
+ def tv_videos(tv_id, options = {})
193
+ get([RESOURCE, tv_id, "videos"].join("/"), options)
194
+ end
195
+
196
+ # Get the list of TV shows that are currently on the air. This query
197
+ # looks for any TV show that has an episode with an air date in the next
198
+ # 7 days.
199
+ #
200
+ # @see http://docs.themoviedb.apiary.io/#reference/tvs/tvidon_the_air
201
+ #
202
+ # @param [String] id the tv id
203
+ #
204
+ # @return [Hashie::Mash] build response
205
+ #
206
+ # @example Get the tv on_the_air
207
+ # TmdbRexx::Client.on_the_air_tv("tv-id")
208
+ def on_the_air_tv(tv_id, options = {})
209
+ get([RESOURCE, "on_the_air"].join("/"), options)
210
+ end
211
+
212
+ # Get the list of TV shows that air today. Without a specified timezone,
213
+ # this query defaults to EST (Eastern Time UTC-05:00).
214
+ #
215
+ # @see http://docs.themoviedb.apiary.io/#reference/tvs/tvidairing_today
216
+ #
217
+ # @param [String] id the tv id
218
+ #
219
+ # @return [Hashie::Mash] build response
220
+ #
221
+ # @example Get the tv airing_today
222
+ # TmdbRexx::Client.airing_today_tv("tv-id")
223
+ def airing_today_tv(tv_id, options = {})
224
+ get([RESOURCE, "airing_today"].join("/"), options)
225
+ end
226
+
227
+ # Get the latest tv id.
228
+ #
229
+ # @see http://docs.themoviedb.apiary.io/#reference/tvs/tvidlatest
230
+ #
231
+ # @param [String] id the tv id
232
+ #
233
+ # @return [Hashie::Mash] build response
234
+ #
235
+ # @example Get the tv latest
236
+ # TmdbRexx::Client.latest_tv("tv-id")
237
+ def latest_tv(tv_id, options = {})
238
+ get([RESOURCE, "latest"].join("/"), options)
239
+ end
240
+
241
+ # Get the list of top rated TV shows. By default, this list will only
242
+ # include TV shows that have 2 or more votes. This list refreshes every
243
+ # day.
244
+ #
245
+ # @see http://docs.themoviedb.apiary.io/#reference/tvs/tvidtoprated
246
+ #
247
+ # @param [String] id the tv id
248
+ #
249
+ # @return [Hashie::Mash] build response
250
+ #
251
+ # @example Get the tvs top rated
252
+ # TmdbRexx::Client.top_rated_tvs("tv-id")
253
+ def top_rated_tv(tv_id, options = {})
254
+ get([RESOURCE, "top_rated"].join("/"), options)
255
+ end
256
+
257
+ # Get the list of popular tvs on The Movie Database. This list refreshes
258
+ # every day.
259
+ #
260
+ # @see http://docs.themoviedb.apiary.io/#reference/tvs/tvidpopular
261
+ #
262
+ # @param [String] id the tv id
263
+ #
264
+ # @return [Hashie::Mash] build response
265
+ #
266
+ # @example Get the tvs popular_tvs
267
+ # TmdbRexx::Client.popular_tvs("tv-id")
268
+ def popular_tv(tv_id, options = {})
269
+ get([RESOURCE, "popular"].join("/"), options)
270
+ end
271
+ end
272
+ end
273
+ end
@@ -1,3 +1,3 @@
1
1
  module TmdbRexx
2
- VERSION = "0.3.0"
2
+ VERSION = "0.4.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tmdb_rexx
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Truluck
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-30 00:00:00.000000000 Z
11
+ date: 2015-09-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -215,6 +215,7 @@ files:
215
215
  - lib/tmdb_rexx/client/review.rb
216
216
  - lib/tmdb_rexx/client/search.rb
217
217
  - lib/tmdb_rexx/client/timezone.rb
218
+ - lib/tmdb_rexx/client/tv.rb
218
219
  - lib/tmdb_rexx/configuration.rb
219
220
  - lib/tmdb_rexx/connection.rb
220
221
  - lib/tmdb_rexx/default.rb