tvdb_party 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/lib/tvdb_party/search.rb +8 -7
- data/tvdb_party.gemspec +7 -7
- metadata +36 -14
data/Rakefile
CHANGED
@@ -11,7 +11,7 @@ begin
|
|
11
11
|
gem.homepage = "http://github.com/maddox/tvdb_party"
|
12
12
|
gem.authors = ["Jon Maddox"]
|
13
13
|
gem.add_development_dependency "thoughtbot-shoulda"
|
14
|
-
gem.add_dependency('httparty', '>= 0.
|
14
|
+
gem.add_dependency('httparty', '>= 0.6.1')
|
15
15
|
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
16
16
|
end
|
17
17
|
rescue LoadError
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.5.0
|
data/lib/tvdb_party/search.rb
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
module TvdbParty
|
2
2
|
class Search
|
3
3
|
include HTTParty
|
4
|
-
include HTTParty::Icebox
|
4
|
+
# include HTTParty::Icebox
|
5
5
|
attr_accessor :language
|
6
6
|
format :xml
|
7
|
-
cache :store => 'file', :timeout => 120, :location => Dir.tmpdir
|
7
|
+
# cache :store => 'file', :timeout => 120, :location => Dir.tmpdir
|
8
8
|
|
9
9
|
base_uri 'www.thetvdb.com/api'
|
10
10
|
|
@@ -14,7 +14,7 @@ module TvdbParty
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def search(series_name)
|
17
|
-
response = self.class.get("/GetSeries.php", {:query => {:seriesname => series_name, :language => @language}})
|
17
|
+
response = self.class.get("/GetSeries.php", {:query => {:seriesname => series_name, :language => @language}}).parsed_response
|
18
18
|
return [] unless response["Data"]
|
19
19
|
|
20
20
|
case response["Data"]["Series"]
|
@@ -28,7 +28,7 @@ module TvdbParty
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def get_series_by_id(series_id, language = self.language)
|
31
|
-
response = self.class.get("/#{@api_key}/series/#{series_id}/#{language}.xml")
|
31
|
+
response = self.class.get("/#{@api_key}/series/#{series_id}/#{language}.xml").parsed_response
|
32
32
|
if response["Data"] && response["Data"]["Series"]
|
33
33
|
Series.new(self, response["Data"]["Series"])
|
34
34
|
else
|
@@ -37,7 +37,8 @@ module TvdbParty
|
|
37
37
|
end
|
38
38
|
|
39
39
|
def get_episode(series, season_number, episode_number, language = self.language)
|
40
|
-
response = self.class.get("/#{@api_key}/series/#{series.id}/default/#{season_number}/#{episode_number}/#{language}.xml")
|
40
|
+
response = self.class.get("/#{@api_key}/series/#{series.id}/default/#{season_number}/#{episode_number}/#{language}.xml").parsed_response
|
41
|
+
puts response.inspect
|
41
42
|
if response["Data"] && response["Data"]["Episode"]
|
42
43
|
Episode.new(response["Data"]["Episode"])
|
43
44
|
else
|
@@ -46,7 +47,7 @@ module TvdbParty
|
|
46
47
|
end
|
47
48
|
|
48
49
|
def get_actors(series)
|
49
|
-
response = self.class.get("/#{@api_key}/series/#{series.id}/actors.xml")
|
50
|
+
response = self.class.get("/#{@api_key}/series/#{series.id}/actors.xml").parsed_response
|
50
51
|
if response["Actors"] && response["Actors"]["Actor"]
|
51
52
|
response["Actors"]["Actor"].collect {|a| Actor.new(a)}
|
52
53
|
else
|
@@ -55,7 +56,7 @@ module TvdbParty
|
|
55
56
|
end
|
56
57
|
|
57
58
|
def get_banners(series)
|
58
|
-
response = self.class.get("/#{@api_key}/series/#{series.id}/banners.xml")
|
59
|
+
response = self.class.get("/#{@api_key}/series/#{series.id}/banners.xml").parsed_response
|
59
60
|
return [] unless response["Banners"] && response["Banners"]["Banner"]
|
60
61
|
case response["Banners"]["Banner"]
|
61
62
|
when Array
|
data/tvdb_party.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{tvdb_party}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.5.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Jon Maddox"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-09-22}
|
13
13
|
s.description = %q{Simple Ruby library to talk to thetvdb.com's api}
|
14
14
|
s.email = %q{jon@mustacheinc.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -37,7 +37,7 @@ Gem::Specification.new do |s|
|
|
37
37
|
s.homepage = %q{http://github.com/maddox/tvdb_party}
|
38
38
|
s.rdoc_options = ["--charset=UTF-8"]
|
39
39
|
s.require_paths = ["lib"]
|
40
|
-
s.rubygems_version = %q{1.3.
|
40
|
+
s.rubygems_version = %q{1.3.7}
|
41
41
|
s.summary = %q{Simple Ruby library to talk to thetvdb.com's api}
|
42
42
|
s.test_files = [
|
43
43
|
"test/test_helper.rb",
|
@@ -48,15 +48,15 @@ Gem::Specification.new do |s|
|
|
48
48
|
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
49
49
|
s.specification_version = 3
|
50
50
|
|
51
|
-
if Gem::Version.new(Gem::
|
51
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
52
52
|
s.add_development_dependency(%q<thoughtbot-shoulda>, [">= 0"])
|
53
|
-
s.add_runtime_dependency(%q<httparty>, [">= 0.
|
53
|
+
s.add_runtime_dependency(%q<httparty>, [">= 0.6.1"])
|
54
54
|
else
|
55
55
|
s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
|
56
|
-
s.add_dependency(%q<httparty>, [">= 0.
|
56
|
+
s.add_dependency(%q<httparty>, [">= 0.6.1"])
|
57
57
|
end
|
58
58
|
else
|
59
59
|
s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
|
60
|
-
s.add_dependency(%q<httparty>, [">= 0.
|
60
|
+
s.add_dependency(%q<httparty>, [">= 0.6.1"])
|
61
61
|
end
|
62
62
|
end
|
metadata
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tvdb_party
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 11
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 5
|
9
|
+
- 0
|
10
|
+
version: 0.5.0
|
5
11
|
platform: ruby
|
6
12
|
authors:
|
7
13
|
- Jon Maddox
|
@@ -9,29 +15,39 @@ autorequire:
|
|
9
15
|
bindir: bin
|
10
16
|
cert_chain: []
|
11
17
|
|
12
|
-
date: 2010-
|
18
|
+
date: 2010-09-22 00:00:00 -04:00
|
13
19
|
default_executable:
|
14
20
|
dependencies:
|
15
21
|
- !ruby/object:Gem::Dependency
|
16
22
|
name: thoughtbot-shoulda
|
17
|
-
|
18
|
-
|
19
|
-
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
20
26
|
requirements:
|
21
27
|
- - ">="
|
22
28
|
- !ruby/object:Gem::Version
|
29
|
+
hash: 3
|
30
|
+
segments:
|
31
|
+
- 0
|
23
32
|
version: "0"
|
24
|
-
|
33
|
+
type: :development
|
34
|
+
version_requirements: *id001
|
25
35
|
- !ruby/object:Gem::Dependency
|
26
36
|
name: httparty
|
27
|
-
|
28
|
-
|
29
|
-
|
37
|
+
prerelease: false
|
38
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
30
40
|
requirements:
|
31
41
|
- - ">="
|
32
42
|
- !ruby/object:Gem::Version
|
33
|
-
|
34
|
-
|
43
|
+
hash: 5
|
44
|
+
segments:
|
45
|
+
- 0
|
46
|
+
- 6
|
47
|
+
- 1
|
48
|
+
version: 0.6.1
|
49
|
+
type: :runtime
|
50
|
+
version_requirements: *id002
|
35
51
|
description: Simple Ruby library to talk to thetvdb.com's api
|
36
52
|
email: jon@mustacheinc.com
|
37
53
|
executables: []
|
@@ -68,21 +84,27 @@ rdoc_options:
|
|
68
84
|
require_paths:
|
69
85
|
- lib
|
70
86
|
required_ruby_version: !ruby/object:Gem::Requirement
|
87
|
+
none: false
|
71
88
|
requirements:
|
72
89
|
- - ">="
|
73
90
|
- !ruby/object:Gem::Version
|
91
|
+
hash: 3
|
92
|
+
segments:
|
93
|
+
- 0
|
74
94
|
version: "0"
|
75
|
-
version:
|
76
95
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
96
|
+
none: false
|
77
97
|
requirements:
|
78
98
|
- - ">="
|
79
99
|
- !ruby/object:Gem::Version
|
100
|
+
hash: 3
|
101
|
+
segments:
|
102
|
+
- 0
|
80
103
|
version: "0"
|
81
|
-
version:
|
82
104
|
requirements: []
|
83
105
|
|
84
106
|
rubyforge_project:
|
85
|
-
rubygems_version: 1.3.
|
107
|
+
rubygems_version: 1.3.7
|
86
108
|
signing_key:
|
87
109
|
specification_version: 3
|
88
110
|
summary: Simple Ruby library to talk to thetvdb.com's api
|