thetvdb_api 0.0.1 → 0.1.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 +4 -4
- data/README.md +61 -22
- data/lib/thetvdb_api/actor.rb +3 -2
- data/lib/thetvdb_api/banner.rb +3 -9
- data/lib/thetvdb_api/base.rb +44 -5
- data/lib/thetvdb_api/client.rb +34 -0
- data/lib/thetvdb_api/episode.rb +14 -31
- data/lib/thetvdb_api/search.rb +18 -0
- data/lib/thetvdb_api/series.rb +6 -17
- data/lib/thetvdb_api/update.rb +17 -0
- data/lib/thetvdb_api/version.rb +1 -1
- data/lib/thetvdb_api.rb +6 -17
- data/spec/integrations/actor_spec.rb +5 -5
- data/spec/integrations/banner_spec.rb +5 -5
- data/spec/integrations/client_spec.rb +109 -0
- data/spec/integrations/episode_spec.rb +14 -14
- data/spec/integrations/search_spec.rb +14 -14
- data/spec/integrations/series_spec.rb +8 -8
- data/spec/integrations/update_spec.rb +11 -11
- data/spec/thetvdb_api/actor_spec.rb +5 -12
- data/spec/thetvdb_api/banner_spec.rb +5 -57
- data/spec/thetvdb_api/base_spec.rb +92 -0
- data/spec/thetvdb_api/client_spec.rb +35 -0
- data/spec/thetvdb_api/episode_spec.rb +17 -149
- data/spec/thetvdb_api/search_spec.rb +42 -0
- data/spec/thetvdb_api/series_spec.rb +9 -97
- data/spec/thetvdb_api/update_spec.rb +38 -0
- data/thetvdb_api.gemspec +0 -1
- metadata +15 -61
- data/lib/thetvdb_api/request/actor.rb +0 -18
- data/lib/thetvdb_api/request/banner.rb +0 -18
- data/lib/thetvdb_api/request/base.rb +0 -74
- data/lib/thetvdb_api/request/episode.rb +0 -39
- data/lib/thetvdb_api/request/module/find.rb +0 -17
- data/lib/thetvdb_api/request/module/series_uri.rb +0 -17
- data/lib/thetvdb_api/request/search.rb +0 -37
- data/lib/thetvdb_api/request/series.rb +0 -48
- data/lib/thetvdb_api/request/update.rb +0 -45
- data/lib/thetvdb_api/utility/array.rb +0 -5
- data/lib/thetvdb_api/utility/date.rb +0 -9
- data/lib/thetvdb_api/utility/float.rb +0 -5
- data/lib/thetvdb_api/utility/hashie/extensions/key_replace.rb +0 -42
- data/lib/thetvdb_api/utility/integer.rb +0 -5
- data/lib/thetvdb_api/utility/string.rb +0 -11
- data/lib/thetvdb_api/utility/time.rb +0 -9
- data/lib/thetvdb_api/utility.rb +0 -7
- data/spec/thetvdb_api/request/actor_spec.rb +0 -31
- data/spec/thetvdb_api/request/banner_spec.rb +0 -31
- data/spec/thetvdb_api/request/base_spec.rb +0 -121
- data/spec/thetvdb_api/request/episode_spec.rb +0 -82
- data/spec/thetvdb_api/request/module/series_uri_spec.rb +0 -17
- data/spec/thetvdb_api/request/search_spec.rb +0 -63
- data/spec/thetvdb_api/request/series_spec.rb +0 -86
- data/spec/thetvdb_api/request/update_spec.rb +0 -76
- data/spec/thetvdb_api/utility/array_spec.rb +0 -9
- data/spec/thetvdb_api/utility/date_spec.rb +0 -13
- data/spec/thetvdb_api/utility/float_spec.rb +0 -9
- data/spec/thetvdb_api/utility/integer_spec.rb +0 -9
- data/spec/thetvdb_api/utility/string_spec.rb +0 -9
- data/spec/thetvdb_api/utility/time_spec.rb +0 -13
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3126b9fe360eb24809166f9de6477785b90d8774
|
|
4
|
+
data.tar.gz: fb816d9de43b4d28198b5921ad34753eac59198e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9d192a544f0fa46dc2d91376d3912e466e76e465082e7e21954bdde486dbcb43957aa40232d96412776e48e0e80dbb8a35637e0034925d2cf6bb98088ef54d65
|
|
7
|
+
data.tar.gz: f2e07b40ad52056bc1ab1cb9027672e275b191b49812989e97c203314a8b075f2ecdcf2c06ad61577cd1c835119bf80b63a9dce400e53738a188e55558a2739a
|
data/README.md
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
[](https://gemnasium.com/wafcio/thetvdb_api)
|
|
3
3
|
[](https://codeclimate.com/github/wafcio/thetvdb_api)
|
|
4
4
|
[](https://coveralls.io/r/wafcio/thetvdb_api)
|
|
5
|
+
[](http://badge.fury.io/rb/thetvdb_api)
|
|
5
6
|
|
|
6
7
|
# ThetvdbApi
|
|
7
8
|
|
|
@@ -14,40 +15,78 @@ You can add it to your Gemfile with:
|
|
|
14
15
|
```ruby
|
|
15
16
|
gem 'thetvdb_api'
|
|
16
17
|
```
|
|
18
|
+
|
|
17
19
|
Run the bundle command to install it.
|
|
18
20
|
|
|
19
|
-
After you install
|
|
21
|
+
After you install ThetvdbApi and add it to your Gemfile, you need to run the generator (if you use Ruby on Rails application):
|
|
20
22
|
|
|
21
23
|
```console
|
|
22
24
|
rails generate thetvdb_api:install
|
|
23
25
|
```
|
|
24
26
|
|
|
25
|
-
The generator will install an initializer where you must past your
|
|
27
|
+
The generator will install an initializer where you must past your api_key, and can past: language (2 letters abbrevation), api_url (base url).
|
|
26
28
|
|
|
27
29
|
## How to use
|
|
28
30
|
|
|
29
|
-
|
|
31
|
+
There is one entry point, in initialize you can past hash with api_key, language and api_url values, or leave empty:
|
|
30
32
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
33
|
+
```ruby
|
|
34
|
+
client = ThetvdbApi::Client.new(api_url: '...', api_key: '...', language: 'en')
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Search series by name
|
|
38
|
+
|
|
39
|
+
```ruby
|
|
40
|
+
client = ThetvdbApi::Client.new
|
|
41
|
+
client.search.get_series('buffy')
|
|
42
|
+
client.search.get_series_by_imdb_id('...')
|
|
43
|
+
client.search.get_series_by_zap2it_id('...')
|
|
44
|
+
client.search.get_episode_by_air_date('123', air_date)
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Search series by id
|
|
48
|
+
|
|
49
|
+
```ruby
|
|
50
|
+
client = ThetvdbApi::Client.new
|
|
51
|
+
client.series.find('123')
|
|
52
|
+
client.series.find_full('123')
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Return series actors
|
|
56
|
+
|
|
57
|
+
```ruby
|
|
58
|
+
client = ThetvdbApi::Client.new
|
|
59
|
+
client.actor.all(series_id)
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Return series banners
|
|
63
|
+
|
|
64
|
+
```ruby
|
|
65
|
+
client = ThetvdbApi::Client.new
|
|
66
|
+
client.banner.all(series_id)
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Return series episode
|
|
70
|
+
|
|
71
|
+
```ruby
|
|
72
|
+
client = ThetvdbApi::Client.new
|
|
73
|
+
client.episode.find_by_default_order(series_id, season, episode)
|
|
74
|
+
client.episode.find_by_dvd_order(series_id, season, episode)
|
|
75
|
+
client.episode.find_by_absolute_order(series_id, absolute)
|
|
76
|
+
client.episode.find(episode_id)
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Get updates
|
|
80
|
+
|
|
81
|
+
```ruby
|
|
82
|
+
client = ThetvdbApi::Client.new
|
|
83
|
+
client.update.day
|
|
84
|
+
client.update.week
|
|
85
|
+
client.update.month
|
|
86
|
+
client.update.all
|
|
87
|
+
```
|
|
50
88
|
|
|
89
|
+
In each response you get pure hash, without any coerce or key mapping.
|
|
51
90
|
|
|
52
91
|
## Contributing
|
|
53
92
|
|
data/lib/thetvdb_api/actor.rb
CHANGED
data/lib/thetvdb_api/banner.rb
CHANGED
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
class ThetvdbApi::Banner < ThetvdbApi::Base
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
coerce_key :rating, Float
|
|
6
|
-
coerce_key :rating_count, Integer
|
|
7
|
-
coerce_key :season, Integer
|
|
8
|
-
coerce_key :series_id, Integer
|
|
9
|
-
coerce_key :season_num, Integer
|
|
10
|
-
coerce_key :time, Time
|
|
2
|
+
def find(series_id)
|
|
3
|
+
get("#{series_uri(series_id)}banners.xml").response
|
|
4
|
+
end
|
|
11
5
|
end
|
data/lib/thetvdb_api/base.rb
CHANGED
|
@@ -1,7 +1,46 @@
|
|
|
1
|
-
require '
|
|
1
|
+
require 'httparty'
|
|
2
2
|
|
|
3
|
-
class ThetvdbApi::Base
|
|
4
|
-
include
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
class ThetvdbApi::Base
|
|
4
|
+
include HTTParty
|
|
5
|
+
|
|
6
|
+
attr_reader :client, :uri, :options
|
|
7
|
+
|
|
8
|
+
def initialize(client)
|
|
9
|
+
@client = client
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def get(uri, options = {})
|
|
13
|
+
@uri = uri
|
|
14
|
+
@options = options
|
|
15
|
+
|
|
16
|
+
self
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def response
|
|
20
|
+
response = self.class.get(uri, request_options(options))
|
|
21
|
+
response.code == 200 ? response.parsed_response : nil
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def request_options(options = {})
|
|
25
|
+
{
|
|
26
|
+
query: options,
|
|
27
|
+
base_uri: api_url
|
|
28
|
+
}
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
def series_uri(series_id)
|
|
32
|
+
"#{api_key}/series/#{series_id}/"
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def api_url
|
|
36
|
+
client.api_url
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def api_key
|
|
40
|
+
client.api_key
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def language
|
|
44
|
+
client.language
|
|
45
|
+
end
|
|
7
46
|
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
class ThetvdbApi::Client
|
|
2
|
+
attr_reader :api_key, :api_url, :language
|
|
3
|
+
|
|
4
|
+
def initialize(options = {})
|
|
5
|
+
|
|
6
|
+
@api_key = options[:api_key] ? options[:api_key] : ThetvdbApi::Configuration.api_key
|
|
7
|
+
@api_url = options[:api_url] ? options[:api_url] : ThetvdbApi::Configuration.api_url
|
|
8
|
+
@language = options[:language] ? options[:language] : ThetvdbApi::Configuration.language
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def search
|
|
12
|
+
@search ||= ThetvdbApi::Search.new(self)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def series
|
|
16
|
+
@series ||= ThetvdbApi::Series.new(self)
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def actor
|
|
20
|
+
@actor ||= ThetvdbApi::Actor.new(self)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def banner
|
|
24
|
+
@banner ||= ThetvdbApi::Banner.new(self)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def episode
|
|
28
|
+
@episode ||= ThetvdbApi::Episode.new(self)
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
def update
|
|
32
|
+
@update ||= ThetvdbApi::Update.new(self)
|
|
33
|
+
end
|
|
34
|
+
end
|
data/lib/thetvdb_api/episode.rb
CHANGED
|
@@ -1,34 +1,17 @@
|
|
|
1
1
|
class ThetvdbApi::Episode < ThetvdbApi::Base
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
replace_key :Combined_episodenumber, :combined_episode_number
|
|
6
|
-
replace_key :DVD_discid, :dvd_disc_id
|
|
7
|
-
replace_key :DVD_episodenumber, :dvd_episode_number
|
|
8
|
-
replace_key :lastupdated, :last_updated_at
|
|
9
|
-
replace_key :seasonid, :season_id
|
|
10
|
-
replace_key :series, :series_id
|
|
11
|
-
replace_key :seriesid, :series_id
|
|
12
|
-
replace_key :thumb_added, :thumb_added_at
|
|
2
|
+
def find_by_default_order(series_id, season, episode, language = self.language)
|
|
3
|
+
get("#{series_uri(series_id)}default/#{season}/#{episode}/#{language}.xml").response
|
|
4
|
+
end
|
|
13
5
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
coerce_key :rating_count, Integer
|
|
26
|
-
coerce_key :season_id, Integer
|
|
27
|
-
coerce_key :season_number, Integer
|
|
28
|
-
coerce_key :series_id, Integer
|
|
29
|
-
coerce_key :thumb_added_at, Time
|
|
30
|
-
coerce_key :thumb_height, Integer
|
|
31
|
-
coerce_key :thumb_width, Integer
|
|
32
|
-
coerce_key :time, Time
|
|
33
|
-
coerce_key :writer, Array
|
|
6
|
+
def find_by_dvd_order(series_id, season, episode, language = self.language)
|
|
7
|
+
get("#{series_uri(series_id)}dvd/#{season}/#{episode}/#{language}.xml").response
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
def find_by_absolute_order(series_id, absolute, language = self.language)
|
|
11
|
+
get("#{series_uri(series_id)}absolute/#{absolute}/#{language}.xml").response
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def find(episode_id, language = self.language)
|
|
15
|
+
get("#{api_key}/episodes/#{episode_id}/#{language}.xml").response
|
|
16
|
+
end
|
|
34
17
|
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
class ThetvdbApi::Search < ThetvdbApi::Base
|
|
2
|
+
def get_series(name, language = self.language)
|
|
3
|
+
get('GetSeries.php', seriesname: name, language: language).response
|
|
4
|
+
end
|
|
5
|
+
|
|
6
|
+
def get_series_by_imdb_id(id, language = self.language)
|
|
7
|
+
get('GetSeriesByRemoteID.php', imdbid: id, language: language).response
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
def get_series_by_zap2it_id(id, language = self.language)
|
|
11
|
+
get('GetSeriesByRemoteID.php', zap2it: id, language: language).response
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def get_episode_by_air_date(series_id, air_date, language = self.language)
|
|
15
|
+
get('GetEpisodeByAirDate.php', apikey: self.api_key, seriesid: series_id, airdate: air_date, language: language).
|
|
16
|
+
response
|
|
17
|
+
end
|
|
18
|
+
end
|
data/lib/thetvdb_api/series.rb
CHANGED
|
@@ -1,20 +1,9 @@
|
|
|
1
1
|
class ThetvdbApi::Series < ThetvdbApi::Base
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
def find(series_id, language = self.language)
|
|
3
|
+
get("#{series_uri(series_id)}#{language}.xml").response
|
|
4
|
+
end
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
coerce_key :added_by, Integer
|
|
10
|
-
coerce_key :alias_names, Array
|
|
11
|
-
coerce_key :first_aired, Date
|
|
12
|
-
coerce_key :genre, Array
|
|
13
|
-
coerce_key :last_updated_at, Time
|
|
14
|
-
coerce_key :network_id, Integer
|
|
15
|
-
coerce_key :rating, Float
|
|
16
|
-
coerce_key :rating_count, Integer
|
|
17
|
-
coerce_key :runtime, Integer
|
|
18
|
-
coerce_key :series_id, Integer
|
|
19
|
-
coerce_key :time, Time
|
|
6
|
+
def find_full(series_id, language = self.language)
|
|
7
|
+
get("#{series_uri(series_id)}all/#{language}.xml").response
|
|
8
|
+
end
|
|
20
9
|
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
class ThetvdbApi::Update < ThetvdbApi::Base
|
|
2
|
+
def day
|
|
3
|
+
get("#{api_key}/updates/updates_day.xml").response
|
|
4
|
+
end
|
|
5
|
+
|
|
6
|
+
def week
|
|
7
|
+
get("#{api_key}/updates/updates_week.xml").response
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
def month
|
|
11
|
+
get("#{api_key}/updates/updates_month.xml").response
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def all
|
|
15
|
+
get("#{api_key}/updates/updates_all.xml").response
|
|
16
|
+
end
|
|
17
|
+
end
|
data/lib/thetvdb_api/version.rb
CHANGED
data/lib/thetvdb_api.rb
CHANGED
|
@@ -1,23 +1,12 @@
|
|
|
1
|
-
module ThetvdbApi
|
|
2
|
-
module Request
|
|
3
|
-
module Module; end
|
|
4
|
-
end
|
|
5
|
-
end
|
|
1
|
+
module ThetvdbApi; end
|
|
6
2
|
|
|
7
3
|
require 'thetvdb_api/version'
|
|
8
4
|
require 'thetvdb_api/configuration'
|
|
9
|
-
require 'thetvdb_api/
|
|
5
|
+
require 'thetvdb_api/client'
|
|
10
6
|
require 'thetvdb_api/base'
|
|
7
|
+
require 'thetvdb_api/search'
|
|
8
|
+
require 'thetvdb_api/update'
|
|
9
|
+
require 'thetvdb_api/series'
|
|
10
|
+
require 'thetvdb_api/episode'
|
|
11
11
|
require 'thetvdb_api/actor'
|
|
12
12
|
require 'thetvdb_api/banner'
|
|
13
|
-
require 'thetvdb_api/episode'
|
|
14
|
-
require 'thetvdb_api/series'
|
|
15
|
-
require 'thetvdb_api/request/base'
|
|
16
|
-
require 'thetvdb_api/request/module/find'
|
|
17
|
-
require 'thetvdb_api/request/module/series_uri'
|
|
18
|
-
require 'thetvdb_api/request/search'
|
|
19
|
-
require 'thetvdb_api/request/update'
|
|
20
|
-
require 'thetvdb_api/request/series'
|
|
21
|
-
require 'thetvdb_api/request/episode'
|
|
22
|
-
require 'thetvdb_api/request/actor'
|
|
23
|
-
require 'thetvdb_api/request/banner'
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
require 'spec_helper'
|
|
2
2
|
|
|
3
|
-
describe ThetvdbApi::
|
|
4
|
-
let(:
|
|
3
|
+
describe ThetvdbApi::Actor do
|
|
4
|
+
let(:model) { ThetvdbApi::Actor.new(ThetvdbApi::Client.new) }
|
|
5
5
|
|
|
6
6
|
describe 'real request' do
|
|
7
|
-
describe '
|
|
8
|
-
it 'should return
|
|
9
|
-
|
|
7
|
+
describe '.find' do
|
|
8
|
+
it 'should return hash' do
|
|
9
|
+
model.find('70327').class.should == Hash
|
|
10
10
|
end
|
|
11
11
|
end
|
|
12
12
|
end
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
require 'spec_helper'
|
|
2
2
|
|
|
3
|
-
describe ThetvdbApi::
|
|
4
|
-
let(:
|
|
3
|
+
describe ThetvdbApi::Banner do
|
|
4
|
+
let(:model) { ThetvdbApi::Banner.new(ThetvdbApi::Client.new) }
|
|
5
5
|
|
|
6
6
|
describe 'real request' do
|
|
7
|
-
describe '
|
|
8
|
-
it 'should return
|
|
9
|
-
|
|
7
|
+
describe '.find' do
|
|
8
|
+
it 'should return hash' do
|
|
9
|
+
model.find('72449').class.should == Hash
|
|
10
10
|
end
|
|
11
11
|
end
|
|
12
12
|
end
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
describe ThetvdbApi::Client do
|
|
4
|
+
let(:client) { ThetvdbApi::Client.new }
|
|
5
|
+
|
|
6
|
+
describe 'real request' do
|
|
7
|
+
describe '.search' do
|
|
8
|
+
describe '.get_series' do
|
|
9
|
+
it 'should return hash' do
|
|
10
|
+
client.search.get_series('buffy').class.should == Hash
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
describe '.get_series_by_imdb_id' do
|
|
15
|
+
it 'should return hash' do
|
|
16
|
+
client.search.get_series_by_imdb_id('tt0118276').class.should == Hash
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
describe '.get_series_by_zap2it_id' do
|
|
21
|
+
it 'should return hash' do
|
|
22
|
+
client.search.get_series_by_zap2it_id('EP00213110').class.should == Hash
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
describe '.get_episode_by_air_date' do
|
|
27
|
+
it 'should return hash' do
|
|
28
|
+
client.search.get_episode_by_air_date('70327','1997-03-10').class.should == Hash
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
describe '.series' do
|
|
34
|
+
describe '.find' do
|
|
35
|
+
it 'should return hash' do
|
|
36
|
+
client.series.find('70327').class.should == Hash
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
describe '.find_full' do
|
|
41
|
+
it 'should return hash' do
|
|
42
|
+
client.series.find_full('70327').class.should == Hash
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
describe '.actor' do
|
|
48
|
+
describe '.find' do
|
|
49
|
+
it 'should return hash' do
|
|
50
|
+
client.actor.find('70327').class.should == Hash
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
describe '.banner' do
|
|
56
|
+
describe '.find' do
|
|
57
|
+
it 'should return hash' do
|
|
58
|
+
client.banner.find('70327').class.should == Hash
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
describe '.episode' do
|
|
64
|
+
describe '.find_by_default_order' do
|
|
65
|
+
it 'should return hash' do
|
|
66
|
+
client.episode.find_by_default_order('70327', '1', '1').class.should == Hash
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
describe '.find_by_dvd_order' do
|
|
71
|
+
it 'should return hash' do
|
|
72
|
+
client.episode.find_by_dvd_order('70327', '1', '1').class.should == Hash
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
describe '.find_by_absolute_order' do
|
|
77
|
+
it 'should return hash' do
|
|
78
|
+
client.episode.find_by_absolute_order('70327', '1').class.should == Hash
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
describe '.find' do
|
|
83
|
+
it 'should return hash' do
|
|
84
|
+
client.episode.find('533011').class.should == Hash
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
describe '.update' do
|
|
90
|
+
describe '.day' do
|
|
91
|
+
it 'should return hash' do
|
|
92
|
+
client.update.day.class.should == Hash
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
describe '.week' do
|
|
97
|
+
it 'should return hash' do
|
|
98
|
+
client.update.week.class.should == Hash
|
|
99
|
+
end
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
describe '.month' do
|
|
103
|
+
it 'should return hash' do
|
|
104
|
+
client.update.month.class.should == Hash
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
end
|