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: f345d4819aeb729526bcb2d4dd02a9fb57d5acfd
4
- data.tar.gz: 307da86a73dcc15c0853cc2e201e01908b0769a6
3
+ metadata.gz: f4ae3f4b66f47ebf2cd6b1b0435740f4c73f273e
4
+ data.tar.gz: 918ba53db6eb0bd78de128d1755015cb5a371cea
5
5
  SHA512:
6
- metadata.gz: a996360b463e8df96ef0da028a4d4fd04b730f6e978d10f909afea59ae2d7b3fa29fd8f59cf362af68d09ac17a85bcb7bf4f050e3411e611feac18e963a2bf90
7
- data.tar.gz: 75dadff98388c11fae2387490750d02e52230af62a32a3ee83ffbeccd46a7ff20549b26ebafaba2a25ed05fd616a2d54cc7119bc6d4e8d495b55b13aed70883b
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
@@ -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 => @language] if @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
@@ -1,4 +1,4 @@
1
1
  module TheTvDbParty
2
2
  # The current version of the `thetvdb_party` gem
3
- VERSION = "0.0.5.pre"
3
+ VERSION = "0.0.8.pre"
4
4
  end
data/lib/thetvdb_party.rb CHANGED
@@ -8,5 +8,5 @@ require 'thetvdb_party/version'
8
8
  # thetvdb_party gem root namespace
9
9
  module TheTvDbParty
10
10
  # The base url for the TheTvDB API
11
- BASE_URL = 'http://thetvdb.com/api/'
11
+ BASE_URL = 'http://thetvdb.com/'
12
12
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thetvdb_party
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5.pre
4
+ version: 0.0.8.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fredrik Høisæther Rasch