thetvdb_api 0.3.0 → 0.3.1

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: 4a80e13185840b4ed5e40060728b17b84ff3c645
4
- data.tar.gz: bebfb5dc9fd816cddf862621474217e426bb7984
3
+ metadata.gz: 82c9a99fb9fa13974c7f00e23f00c164433b0022
4
+ data.tar.gz: 8409f71bc88aea05716703d69449d90e290e8fab
5
5
  SHA512:
6
- metadata.gz: 51adfb641d58aaaded7106912338cd815f9c506eec77bbbca190b71d1320396b00d066b946aaa4f7e804ba9b1dbb9e38dc527c1b5e6aa1666a29f7e420802f51
7
- data.tar.gz: 2d5f32df776673a941eb72eb22fb4dc94dba7dc5cf69099a7d7cba2ed9b2c5305320735a8bf3a481f19098b94877abb53fbd2634224c8ecdb5f8b22f2110dde0
6
+ metadata.gz: 4cecac72881ed8dfb87e3da1a1f04caae7e9ef30e21833a0264080a67debac86fff469aa59017129c05169b402a27877f9ecec4aa323557d59aa7f74ba0deefb
7
+ data.tar.gz: e458d7169560328f73889af865d7731bd9c4d75308c01d6a61e09a1190fdd0c222823c53aab35881bceeca6c5b51324a96d9d0cabbfc5248178ef85e5ee87d18
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --format documentation
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.3.0 (September 5, 2014)
2
+
3
+ - two way to pass attributes: hash attributes or simple multi attributes (in correct order)
4
+
1
5
  ## 0.2.5 (August 31, 2014)
2
6
 
3
7
  - two way access to api (by client class and by each api class)
@@ -16,7 +20,7 @@
16
20
  ## 0.2.3 (January 4, 2014)
17
21
 
18
22
  - unit tests refactor
19
- - addded functional tests
23
+ - added functional tests
20
24
 
21
25
  ## 0.2.2 (December 26, 2013)
22
26
 
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
- [![Build Status](https://travis-ci.org/wafcio/thetvdb_api.png?branch=master)](https://travis-ci.org/wafcio/thetvdb_api)
2
- [![Dependency Status](https://gemnasium.com/wafcio/thetvdb_api.png)](https://gemnasium.com/wafcio/thetvdb_api)
3
- [![Code Climate](https://codeclimate.com/github/wafcio/thetvdb_api.png)](https://codeclimate.com/github/wafcio/thetvdb_api)
4
- [![Coverage Status](https://coveralls.io/repos/wafcio/thetvdb_api/badge.png)](https://coveralls.io/r/wafcio/thetvdb_api)
1
+ [![Build Status](https://travis-ci.org/tvapi/thetvdb_api.png?branch=master)](https://travis-ci.org/tvapi/thetvdb_api)
2
+ [![Dependency Status](https://gemnasium.com/tvapi/thetvdb_api.png)](https://gemnasium.com/tvapi/thetvdb_api)
3
+ [![Code Climate](https://codeclimate.com/github/tvapi/thetvdb_api.png)](https://codeclimate.com/github/tvapi/thetvdb_api)
4
+ [![Coverage Status](https://coveralls.io/repos/tvapi/thetvdb_api/badge.png)](https://coveralls.io/r/tvapi/thetvdb_api)
5
5
  [![Gem Version](https://badge.fury.io/rb/thetvdb_api.png)](http://badge.fury.io/rb/thetvdb_api)
6
6
 
7
7
  # ThetvdbApi
@@ -42,6 +42,7 @@ client.episode # => #<ThetvdbApi::Episode>
42
42
  client.search # => #<ThetvdbApi::Search>
43
43
  client.series # => #<ThetvdbApi::Series>
44
44
  client.update # => #<ThetvdbApi::Update>
45
+ client.server # => #<ThetvdbApi::Server>
45
46
  ```
46
47
 
47
48
  * II case (direct access to api class, many entry points)
@@ -55,6 +56,7 @@ ThetvdbApi::Episode.new(api_key: '...', language: 'en')
55
56
  ThetvdbApi::Search.new(api_key: '...', language: 'en')
56
57
  ThetvdbApi::Series.new(api_key: '...', language: 'en')
57
58
  ThetvdbApi::Update.new(api_key: '...', language: 'en')
59
+ ThetvdbApi::Server.new(api_key: '...', language: 'en')
58
60
  ```
59
61
 
60
62
  ## Methods
@@ -112,8 +114,17 @@ For method attributes read https://github.com/wafcio/thetvdb_api/blob/master/lib
112
114
  * find_full
113
115
  * find_full_url
114
116
 
117
+
118
+ ### Server Time method
119
+
120
+ For method attributes read https://github.com/wafcio/thetvdb_api/blob/master/lib/thetvdb_api/server.rb
121
+
122
+ * time
123
+
115
124
  ### Update methods
116
125
 
126
+ For method attributes read https://github.com/wafcio/thetvdb_api/blob/master/lib/thetvdb_api/update.rb
127
+
117
128
  * day
118
129
  * day_url
119
130
  * week
@@ -1,35 +1,52 @@
1
1
  class ThetvdbApi::Actor < ThetvdbApi::Base
2
+ include Ov
3
+
2
4
  # Return all of the series actors.
3
5
  #
4
6
  # access: FREE
5
- # param (flat params):
6
- # find(series_id)
7
+ # param:
7
8
  # find(1234)
8
- # param (hash params):
9
+ # output: Faraday::Response instance with parsed XML string
10
+ # example: http://thetvdb.com/wiki/index.php/API:actors.xml
11
+ let :find, Any do |series_id|
12
+ find(series_id: series_id)
13
+ end
14
+
15
+ # Return all of the series actors.
16
+ #
17
+ # access: FREE
18
+ # param:
9
19
  # find(series_id: 1234)
10
20
  # output: Faraday::Response instance with parsed XML string
11
21
  # example: http://thetvdb.com/wiki/index.php/API:actors.xml
12
- def find(*options)
13
- find_path_with_params(*options).get
22
+ let :find, Hash do |options|
23
+ find_path_with_params(options).get
14
24
  end
15
25
 
16
26
  # Return all of the series actors - return only url.
17
27
  #
18
28
  # access: FREE
19
- # param (flat params):
20
- # find_url(series_id)
29
+ # param:
21
30
  # find_url(1234)
22
- # param (hash params):
31
+ # output: url string
32
+ let :find_url, Any do |series_id|
33
+ find_url(series_id: series_id)
34
+ end
35
+
36
+ # Return all of the series actors - return only url.
37
+ #
38
+ # access: FREE
39
+ # param:
23
40
  # find_url(series_id: 1234)
24
41
  # output: url string
25
- def find_url(*options)
26
- find_path_with_params(*options).url
42
+ let :find_url, Hash do |options|
43
+ find_path_with_params(options).url
27
44
  end
28
45
 
29
46
  private
30
47
 
31
- def find_path_with_params(*options)
32
- path(find_path).params(api_key_options.merge(normalize_series_id_options(*options)))
48
+ def find_path_with_params(options)
49
+ path(find_path).params(api_key_options.merge(options))
33
50
  end
34
51
 
35
52
  def find_path
@@ -0,0 +1,6 @@
1
+ require 'hashie'
2
+
3
+ class ThetvdbApi::AttributesMapping::Search::GetEpisode < Hashie::Trash
4
+ property :seriesid, from: :series_id
5
+ property :airdate, from: :air_date
6
+ end
@@ -0,0 +1,6 @@
1
+ require 'hashie'
2
+
3
+ class ThetvdbApi::AttributesMapping::Search::GetSeries < Hashie::Trash
4
+ property :seriesname, from: :name
5
+ property :language
6
+ end
@@ -0,0 +1,7 @@
1
+ require 'hashie'
2
+
3
+ class ThetvdbApi::AttributesMapping::Search::GetSeriesByRemoteId < Hashie::Trash
4
+ property :imdbid, from: :imdb_id
5
+ property :zap2it, from: :zap2it_id
6
+ property :language
7
+ end
@@ -1,35 +1,52 @@
1
1
  class ThetvdbApi::Banner < ThetvdbApi::Base
2
+ include Ov
3
+
2
4
  # Return all of the series banners.
3
5
  #
4
6
  # access: FREE
5
- # param (flat params):
6
- # find(series_id)
7
+ # param:
7
8
  # find(1234)
8
- # param (hash params):
9
+ # output: Faraday::Response instance with parsed XML string
10
+ # example: http://thetvdb.com/wiki/index.php/API:banners.xml
11
+ let :find, Any do |series_id|
12
+ find(series_id: series_id)
13
+ end
14
+
15
+ # Return all of the series banners.
16
+ #
17
+ # access: FREE
18
+ # param:
9
19
  # find(series_id: 1234)
10
20
  # output: Faraday::Response instance with parsed XML string
11
21
  # example: http://thetvdb.com/wiki/index.php/API:banners.xml
12
- def find(*options)
13
- find_path_with_params(*options).get
22
+ let :find, Hash do |options|
23
+ find_path_with_params(options).get
14
24
  end
15
25
 
16
26
  # Return all of the series banners - return only url.
17
27
  #
18
28
  # access: FREE
19
- # param (flat params):
20
- # find_url(series_id)
29
+ # param:
21
30
  # find_url(1234)
22
- # param (hash params):
31
+ # output: url string
32
+ let :find_url, Any do |series_id|
33
+ find_url(series_id: series_id)
34
+ end
35
+
36
+ # Return all of the series banners - return only url.
37
+ #
38
+ # access: FREE
39
+ # param:
23
40
  # find_url(series_id: 1234)
24
41
  # output: url string
25
- def find_url(*options)
26
- find_path_with_params(*options).url
42
+ let :find_url, Hash do |options|
43
+ find_path_with_params(options).url
27
44
  end
28
45
 
29
46
  private
30
47
 
31
- def find_path_with_params(*options)
32
- path(find_path).params(api_key_options.merge(normalize_series_id_options(*options)))
48
+ def find_path_with_params(options)
49
+ path(find_path).params(api_key_options.merge(options))
33
50
  end
34
51
 
35
52
  def find_path
@@ -15,30 +15,6 @@ class ThetvdbApi::Base
15
15
  api_key_options.merge(language_options)
16
16
  end
17
17
 
18
- def normalize_series_id_options(*options)
19
- normalize_options([:series_id], *options)
20
- end
21
-
22
- def normalize_series_id_absolute_options(*options)
23
- normalize_options([:series_id, :absolute], *options)
24
- end
25
-
26
- def normalize_series_id_episode_options(*options)
27
- normalize_options([:series_id, :season, :episode], *options)
28
- end
29
-
30
- def normalize_episode_id_options(*options)
31
- normalize_options([:episode_id], *options)
32
- end
33
-
34
- def normalize_series_name_options(*options)
35
- normalize_options({ name: :seriesname }, *options)
36
- end
37
-
38
- def normalize_series_id_air_date_options(*options)
39
- normalize_options({ series_id: :seriesid, air_date: :airdate }, *options)
40
- end
41
-
42
18
  private
43
19
 
44
20
  def uri_kind
@@ -19,6 +19,10 @@ class ThetvdbApi::Client
19
19
  def actor
20
20
  @actor ||= ThetvdbApi::Actor.new(config)
21
21
  end
22
+
23
+ def server
24
+ @server ||= ThetvdbApi::Server.new(config)
25
+ end
22
26
 
23
27
  def banner
24
28
  @banner ||= ThetvdbApi::Banner.new(config)
@@ -1,116 +1,268 @@
1
1
  class ThetvdbApi::Episode < ThetvdbApi::Base
2
+ include Ov
3
+
2
4
  # Find the episode data, sorts using the default ordering method.
3
5
  #
4
6
  # access: FREE
5
- # param (flat params):
6
- # find_by_default_order(series_id, season, episode)
7
+ # param:
7
8
  # find_by_default_order(1234, 1, 2)
8
- # param (hash params):
9
+ # output: Faraday::Response instance with parsed XML string
10
+ # example: http://thetvdb.com/wiki/index.php/API:Base_Episode_Record
11
+ let :find_by_default_order, Any, Any, Any do |series_id, season, episode|
12
+ find_by_default_order(map_attrs(series_id, season, episode))
13
+ end
14
+
15
+ # Find the episode data, sorts using the default ordering method.
16
+ #
17
+ # access: FREE
18
+ # param:
19
+ # find_by_default_order(1234, 1, 2, 'de')
20
+ # output: Faraday::Response instance with parsed XML string
21
+ # example: http://thetvdb.com/wiki/index.php/API:Base_Episode_Record
22
+ let :find_by_default_order, Any, Any, Any, String do |series_id, season, episode, language|
23
+ find_by_default_order(map_attrs_with_lang(series_id, season, episode, language))
24
+ end
25
+
26
+ # Find the episode data, sorts using the default ordering method.
27
+ #
28
+ # access: FREE
29
+ # param:
9
30
  # find_by_default_order(series_id: 1234, season: 1, episode: 1)
10
31
  # output: Faraday::Response instance with parsed XML string
11
32
  # example: http://thetvdb.com/wiki/index.php/API:Base_Episode_Record
12
- def find_by_default_order(*options)
13
- find_by_order(normalize_series_id_episode_options(*options).merge(order: 'default'))
33
+ let :find_by_default_order, Hash do |options|
34
+ find_by_order(options.merge(order: 'default'))
14
35
  end
15
36
 
16
37
  # Find the episode data, sorts using the default ordering method - return only url.
17
38
  #
18
39
  # access: FREE
19
- # param (flat params):
20
- # find_by_default_order_url(series_id, season, episode)
40
+ # param:
21
41
  # find_by_default_order_url(1234, 1, 2)
22
- # param (hash params):
23
- # find_by_default_order_url(series_id: 1234, season: 1, episode: 1)
24
42
  # output: url string
25
- def find_by_default_order_url(*options)
26
- find_by_order_url(normalize_series_id_episode_options(*options).merge(order: 'default'))
43
+ let :find_by_default_order_url, Any, Any, Any do |series_id, season, episode|
44
+ find_by_default_order_url(map_attrs(series_id, season, episode))
45
+ end
46
+
47
+ # Find the episode data, sorts using the default ordering method - return only url.
48
+ #
49
+ # access: FREE
50
+ # param:
51
+ # find_by_default_order_url(1234, 1, 2, 'de')
52
+ # output: url string
53
+ let :find_by_default_order_url, Any, Any, Any, String do |series_id, season, episode, language|
54
+ find_by_default_order_url(map_attrs_with_lang(series_id, season, episode, language))
27
55
  end
28
56
 
57
+ # Find the episode data, sorts using the default ordering method - return only url.
58
+ #
59
+ # access: FREE
60
+ # param:
61
+ # find_by_default_order_url(series_id: 1234, season: 1, episode: 1)
62
+ # output: url string
63
+ let :find_by_default_order_url, Hash do |options|
64
+ find_by_order_url(options.merge(order: 'default'))
65
+ end
66
+
29
67
  # Find the episode data, sorts using the dvd ordering method.
30
68
  #
31
69
  # access: FREE
32
- # param (flat params):
33
- # find_by_dvd_order(series_id, season, episode)
70
+ # param:
34
71
  # find_by_dvd_order(1234, 1, 2)
35
- # param (hash params):
72
+ # output: Faraday::Response instance with parsed XML string
73
+ # example: http://thetvdb.com/wiki/index.php/API:Base_Episode_Record
74
+ let :find_by_dvd_order, Any, Any, Any do |series_id, season, episode|
75
+ find_by_dvd_order(map_attrs(series_id, season, episode))
76
+ end
77
+
78
+ # Find the episode data, sorts using the dvd ordering method.
79
+ #
80
+ # access: FREE
81
+ # param:
82
+ # find_by_dvd_order(1234, 1, 2, 'de')
83
+ # output: Faraday::Response instance with parsed XML string
84
+ # example: http://thetvdb.com/wiki/index.php/API:Base_Episode_Record
85
+ let :find_by_dvd_order, Any, Any, Any, String do |series_id, season, episode, language|
86
+ find_by_dvd_order(map_attrs_with_lang(series_id, season, episode, language))
87
+ end
88
+
89
+ # Find the episode data, sorts using the dvd ordering method.
90
+ #
91
+ # access: FREE
92
+ # param:
36
93
  # find_by_dvd_order(series_id: 1234, season: 1, episode: 1)
37
94
  # output: Faraday::Response instance with parsed XML string
38
95
  # example: http://thetvdb.com/wiki/index.php/API:Base_Episode_Record
39
- def find_by_dvd_order(*options)
40
- find_by_order(normalize_series_id_episode_options(*options).merge(order: 'dvd'))
96
+ let :find_by_dvd_order, Hash do |options|
97
+ find_by_order(options.merge(order: 'dvd'))
41
98
  end
42
99
 
43
100
  # Find the episode data, sorts using the dvd ordering method - return only url.
44
101
  #
45
102
  # access: FREE
46
- # param: options hash
47
- # param (flat params):
48
- # find_by_dvd_order_url(series_id, season, episode)
103
+ # param:
49
104
  # find_by_dvd_order_url(1234, 1, 2)
50
- # param (hash params):
105
+ # output: url string
106
+ let :find_by_dvd_order_url, Any, Any, Any do |series_id, season, episode|
107
+ find_by_dvd_order_url(map_attrs(series_id, season, episode))
108
+ end
109
+
110
+ # Find the episode data, sorts using the dvd ordering method - return only url.
111
+ #
112
+ # access: FREE
113
+ # param:
114
+ # find_by_dvd_order_url(1234, 1, 2, 'de')
115
+ # output: url string
116
+ let :find_by_dvd_order_url, Any, Any, Any, String do |series_id, season, episode, language|
117
+ find_by_dvd_order_url(map_attrs_with_lang(series_id, season, episode, language))
118
+ end
119
+
120
+ # Find the episode data, sorts using the dvd ordering method - return only url.
121
+ #
122
+ # access: FREE
123
+ # param:
51
124
  # find_by_dvd_order_url(series_id: 1234, season: 1, episode: 1)
52
125
  # output: url string
53
- def find_by_dvd_order_url(*options)
54
- find_by_order_url(normalize_series_id_episode_options(*options).merge(order: 'dvd'))
126
+ let :find_by_dvd_order_url, Hash do |options|
127
+ find_by_order_url(options.merge(order: 'dvd'))
55
128
  end
56
129
 
57
130
  # Find the episode data, sorts using the absolute ordering method.
58
131
  #
59
132
  # access: FREE
60
- # param (flat params):
61
- # find_by_absolute_order(series_id, absolute)
133
+ # param:
62
134
  # find_by_absolute_order(1234, 1)
63
- # param (hash params):
135
+ # output: Faraday::Response instance with parsed XML string
136
+ # example: http://thetvdb.com/wiki/index.php/API:Base_Episode_Record
137
+ let :find_by_absolute_order, Any, Any do |series_id, absolute|
138
+ find_by_absolute_order(series_id: series_id, absolute: absolute)
139
+ end
140
+
141
+ # Find the episode data, sorts using the absolute ordering method.
142
+ #
143
+ # access: FREE
144
+ # param:
145
+ # find_by_absolute_order(1234, 1, 'de')
146
+ # output: Faraday::Response instance with parsed XML string
147
+ # example: http://thetvdb.com/wiki/index.php/API:Base_Episode_Record
148
+ let :find_by_absolute_order, Any, Any, String do |series_id, absolute, language|
149
+ find_by_absolute_order(series_id: series_id, absolute: absolute, language: language)
150
+ end
151
+
152
+ # Find the episode data, sorts using the absolute ordering method.
153
+ #
154
+ # access: FREE
155
+ # param:
64
156
  # find_by_absolute_order(series_id: 1234, absolute: 1)
65
157
  # output: Faraday::Response instance with parsed XML string
66
158
  # example: http://thetvdb.com/wiki/index.php/API:Base_Episode_Record
67
- def find_by_absolute_order(*options)
68
- find_by_absolute_order_path_with_params(*options).get
159
+ let :find_by_absolute_order, Hash do |options|
160
+ find_by_absolute_order_path_with_params(options).get
69
161
  end
70
162
 
71
163
  # Find the episode data, sorts using the absolute ordering method - return only url.
72
164
  #
73
165
  # access: FREE
74
- # param: options hash
75
- # param (flat params):
76
- # find_by_absolute_order_url(series_id, absolute)
166
+ # param:
77
167
  # find_by_absolute_order_url(1234, 1)
78
- # param (hash params):
79
- # find_by_absolute_order_url(series_id: 1234, absolute: 1)
80
168
  # output: url string
81
- def find_by_absolute_order_url(*options)
82
- find_by_absolute_order_path_with_params(*options).url
169
+ let :find_by_absolute_order_url, Any, Any do |series_id, absolute|
170
+ find_by_absolute_order_url(series_id: series_id, absolute: absolute)
171
+ end
172
+
173
+ # Find the episode data, sorts using the absolute ordering method - return only url.
174
+ #
175
+ # access: FREE
176
+ # param:
177
+ # find_by_absolute_order_url(1234, 1, 'de')
178
+ # output: url string
179
+ let :find_by_absolute_order_url, Any, Any, String do |series_id, absolute, language|
180
+ find_by_absolute_order_url(series_id: series_id, absolute: absolute, language: language)
83
181
  end
84
182
 
85
- # Find the episode data by episode id.
183
+ # Find the episode data, sorts using the dvd absolute method - return only url.
184
+ #
185
+ # access: FREE
186
+ # param:
187
+ # find_by_absolute_order_url(series_id: 1234, absolute: 1)
188
+ # output: url string
189
+ let :find_by_absolute_order_url, Hash do |options|
190
+ find_by_absolute_order_path_with_params(options).url
191
+ end
192
+
193
+ # Find the episode data, sorts using the absolute ordering method.
86
194
  #
87
195
  # access: FREE
88
- # param (flat params):
89
- # find(episode_id)
196
+ # param:
90
197
  # find(1234)
91
- # param (hash params):
92
- # find(episode_id: 1234)
93
198
  # output: Faraday::Response instance with parsed XML string
94
199
  # example: http://thetvdb.com/wiki/index.php/API:Base_Episode_Record
95
- def find(*options)
96
- find_path_with_params(*options).get
200
+ let :find, Any do |id|
201
+ find(id: id)
97
202
  end
98
203
 
99
- # Find the episode data by episode id - return only url.
204
+ # Find the episode data, sorts using the absolute ordering method.
100
205
  #
101
206
  # access: FREE
102
- # param (flat params):
103
- # find_url(episode_id)
207
+ # param:
208
+ # find(1234, 'de')
209
+ # output: Faraday::Response instance with parsed XML string
210
+ # example: http://thetvdb.com/wiki/index.php/API:Base_Episode_Record
211
+ let :find, Any, String do |id, language|
212
+ find(id: id, language: language)
213
+ end
214
+
215
+ # Find the episode data, sorts using the absolute ordering method.
216
+ #
217
+ # access: FREE
218
+ # param:
219
+ # find(id: 1234)
220
+ # output: Faraday::Response instance with parsed XML string
221
+ # example: http://thetvdb.com/wiki/index.php/API:Base_Episode_Record
222
+ let :find, Hash do |options|
223
+ find_path_with_params(options).get
224
+ end
225
+
226
+ # Find the episode data, sorts using the absolute ordering method - return only url.
227
+ #
228
+ # access: FREE
229
+ # param:
104
230
  # find_url(1234)
105
- # param (hash params):
106
- # find_url(episode_id: 1234)
107
231
  # output: url string
108
- def find_url(*options)
109
- find_path_with_params(*options).url
232
+ let :find_url, Any do |id|
233
+ find_url(id: id)
234
+ end
235
+
236
+ # Find the episode data, sorts using the absolute ordering method - return only url.
237
+ #
238
+ # access: FREE
239
+ # param:
240
+ # find_url(1234, 'de')
241
+ # output: url string
242
+ let :find_url, Any, String do |id, language|
243
+ find_url(id: id, language: language)
244
+ end
245
+
246
+ # Find the episode data, sorts using the dvd absolute method - return only url.
247
+ #
248
+ # access: FREE
249
+ # param:
250
+ # find_url(id: 1234)
251
+ # output: url string
252
+ let :find_url, Hash do |options|
253
+ find_path_with_params(options).url
110
254
  end
111
255
 
112
256
  private
113
257
 
258
+ def map_attrs(series_id, season, episode)
259
+ { series_id: series_id, season: season, episode: episode }
260
+ end
261
+
262
+ def map_attrs_with_lang(series_id, season, episode, language)
263
+ { series_id: series_id, season: season, episode: episode, language: language }
264
+ end
265
+
114
266
  def find_by_order(options)
115
267
  find_by_order_path_with_params(options).get
116
268
  end
@@ -127,19 +279,19 @@ class ThetvdbApi::Episode < ThetvdbApi::Base
127
279
  ':apikey/series/:series_id/:order/:season/:episode/:language.xml'
128
280
  end
129
281
 
130
- def find_by_absolute_order_path_with_params(*options)
131
- path(find_by_absolute_order_path).params(api_key_with_language_options.merge(normalize_series_id_absolute_options(*options)))
282
+ def find_by_absolute_order_path_with_params(options)
283
+ path(find_by_absolute_order_path).params(api_key_with_language_options.merge(options))
132
284
  end
133
285
 
134
286
  def find_by_absolute_order_path
135
287
  ':apikey/series/:series_id/absolute/:absolute/:language.xml'
136
288
  end
137
289
 
138
- def find_path_with_params(*options)
139
- path(find_path).params(api_key_with_language_options.merge(normalize_episode_id_options(*options)))
290
+ def find_path_with_params(options)
291
+ path(find_path).params(api_key_with_language_options.merge(options))
140
292
  end
141
293
 
142
294
  def find_path
143
- ':apikey/episodes/:episode_id/:language.xml'
295
+ ':apikey/episodes/:id/:language.xml'
144
296
  end
145
297
  end