thetvdb_party 0.0.5.pre → 0.0.8.pre
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f4ae3f4b66f47ebf2cd6b1b0435740f4c73f273e
|
4
|
+
data.tar.gz: 918ba53db6eb0bd78de128d1755015cb5a371cea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b889b14be540b6b40d1df6b4dcf801ccfe3a397136ab80ef5c5b9a211a19d42e5c87e71e02612f439a91ece357c3d4dfc3b65c7ffbf097120a0d1008776910e
|
7
|
+
data.tar.gz: 0c6d13857aa2a5ae02c0c95b01884ae65a013c05e36659412e75a3766ac3626a4a7eb89dd4d804ecf0bfb8e85ce10cab8a19bcc0fd145f67e5d291ffde7c80dd
|
@@ -119,14 +119,14 @@ module TheTvDbParty
|
|
119
119
|
|
120
120
|
# The full path to the banner for the series.
|
121
121
|
# @return [URI] The full path for the highest rated banner for the series, returned as a URI instance.
|
122
|
-
def bannerpath_full; URI::join(BASE_URL, "banners/", bannerpath_relative) end
|
122
|
+
def bannerpath_full; bannerpath_relative ? URI::join(BASE_URL, "banners/", bannerpath_relative) : nil end
|
123
123
|
|
124
124
|
# The full path to the banner for the series.
|
125
125
|
# @return [URI] The full path for the highest rated fanart for the series, returned as a URI instance.
|
126
|
-
def fanartpath_full; URI::join(BASE_URL, "banners/", fanartpath_relative) end
|
126
|
+
def fanartpath_full; fanartpath_relative ? URI::join(BASE_URL, "banners/", fanartpath_relative) : nil end
|
127
127
|
|
128
128
|
# The full path to the banner for the series.
|
129
129
|
# @return [URI] The full path for the highest rated poster for the series, returned as a URI instance.
|
130
|
-
def posterpath_full; URI::join(BASE_URL, "banners/", posterpath_relative) end
|
130
|
+
def posterpath_full; posterpath_relative ? URI::join(BASE_URL, "banners/", posterpath_relative) : nil end
|
131
131
|
end
|
132
132
|
end
|
data/lib/thetvdb_party/client.rb
CHANGED
@@ -45,8 +45,8 @@ module TheTvDbParty
|
|
45
45
|
# @note The method call with the account identifier is currently not supported.
|
46
46
|
def search(seriesname)
|
47
47
|
http_query = { :seriesname => seriesname }
|
48
|
-
http_query[:language
|
49
|
-
response = self.class.get(URI::join(BASE_URL, 'GetSeries.php'), { :query => http_query }).parsed_response
|
48
|
+
http_query[:language] = @language if @language
|
49
|
+
response = self.class.get(URI::join(BASE_URL, 'api/', 'GetSeries.php'), { :query => http_query }).parsed_response
|
50
50
|
return [] unless response["Data"]
|
51
51
|
case response["Data"]["Series"]
|
52
52
|
when Array
|
@@ -67,7 +67,7 @@ module TheTvDbParty
|
|
67
67
|
else
|
68
68
|
request_url = "#{@apikey}/series/#{seriesid}/#{@language}.xml"
|
69
69
|
end
|
70
|
-
request_url = URI.join(BASE_URL, request_url)
|
70
|
+
request_url = URI.join(BASE_URL, 'api/', request_url)
|
71
71
|
resp = self.class.get(request_url).parsed_response
|
72
72
|
return nil unless resp["Data"]["Series"]
|
73
73
|
BaseSeriesRecord.new(self, resp["Data"]["Series"])
|
@@ -70,7 +70,7 @@ module TheTvDbParty
|
|
70
70
|
|
71
71
|
# The full path to the banner for the series.
|
72
72
|
# @return [URI] The full path for the highest rated banner for the series, returned as a URI instance.
|
73
|
-
def bannerpath_full; URI::join(BASE_URL, "banners/", bannerpath_relative) end
|
73
|
+
def bannerpath_full; bannerpath_relative ? URI::join(BASE_URL, "banners/", bannerpath_relative) : nil end
|
74
74
|
|
75
75
|
# Retrieves the Base Series Record for the series
|
76
76
|
# @return [TheTvDbParty::BaseSeriesRecord] The Base Series Record for the series
|
data/lib/thetvdb_party.rb
CHANGED