tvdbjson 0.1.1 → 0.1.2

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
- SHA1:
3
- metadata.gz: c8d402112883f10ef7fde9d3f7b3b2094f511253
4
- data.tar.gz: 59bdbe4dab687f6c6fcff256d7d331dcd6d7fa3c
2
+ SHA256:
3
+ metadata.gz: 8d3a810add55201b86f09cdb6f02db50246dbe26377d909ed0363546c3a24c33
4
+ data.tar.gz: f7e5f0660fd431bcd4d8288f42bd7de826884c85eaf5f1ea82ae1a52c34dad73
5
5
  SHA512:
6
- metadata.gz: 69585683eef478df42459d47ac9cc667d88e93a52e3463e658aa1ff0b17a1b99e24eda0d193a16c2c2a50d4edda7e721554148a75efd562ca0b83e7d148d7dcc
7
- data.tar.gz: 740017e3bdd296f850a130820ed1193a974d626a05513e7806ce48b7f62624cbb15257aa58baead652b5cc6a8024bc08a4241832c7b79aee43a83714fc88b7b8
6
+ metadata.gz: e2ba478db5352577be0494da02459cbfddd8271aa6003a199e965880b988e08d0ad934699281216792491f86d3f6447b0c7bb214cbf9768b65861a6429ae1b47
7
+ data.tar.gz: 2388eedab7ab26d607d2b0886ad3d16518db8421ca49bf8b6d17807245585d33da2ddbc81c0494372778706af6795acbb4d6238b0a3d5cd095c7fa5ce4400a5f
@@ -26,7 +26,7 @@ module Tvdbjson
26
26
  options = {}
27
27
  options[:uri] = "/login"
28
28
  options[:body] = { "apikey" => TVDB_API_KEY, "userkey" => TVDB_USER_KEY, "username" => TVDB_USER_NAME }
29
- options[:header] = {}
29
+ options[:header] = { "Content-Type" => "application/json" }
30
30
 
31
31
  request = Request.new(options)
32
32
  response = request.post
@@ -6,16 +6,14 @@ module Tvdbjson
6
6
 
7
7
  def initialize(options = {})
8
8
  @url = "#{BASE_URI}#{options[:uri]}"
9
- @body = options[:body]
9
+ @body = options[:body] unless !options[:body]
10
10
  @headers = {
11
- 'Accept-Language' => 'en',
12
- 'Content-Type' => 'application/json',
13
- 'User-Agent' => "Tvdbjson Ruby Gem v#{Tvdbjson::VERSION}"
11
+ 'Accept' => 'application/json'
14
12
  }.merge(options[:header])
15
13
  end
16
14
 
17
15
  def get
18
- HTTParty.get(@url, :headers => @headers, :body => @body.to_json)
16
+ HTTParty.get(@url, :headers => @headers)
19
17
  end
20
18
 
21
19
  def post
@@ -2,10 +2,11 @@ module Tvdbjson
2
2
  module Requestable
3
3
 
4
4
  def send_authenticated_request(hash, authentication)
5
+ binding.pry
5
6
  options = {}
6
7
  options[:uri] = build_uri(hash[:uri],hash[:params])
7
8
  options[:body] = hash[:body]
8
- options[:header] = { "Accept-Language" => "en", "Authorization" => "Bearer #{authentication.token}" }
9
+ options[:header] = { "Authorization" => "Bearer #{authentication.token}" }
9
10
 
10
11
  request = Request.new(options)
11
12
 
@@ -1,3 +1,3 @@
1
1
  module Tvdbjson
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tvdbjson
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Tennant
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-29 00:00:00.000000000 Z
11
+ date: 2019-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry-byebug
@@ -104,8 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
104
104
  - !ruby/object:Gem::Version
105
105
  version: '0'
106
106
  requirements: []
107
- rubyforge_project:
108
- rubygems_version: 2.5.1
107
+ rubygems_version: 3.0.6
109
108
  signing_key:
110
109
  specification_version: 4
111
110
  summary: Unofficial Ruby Gem for thetvdb.com Swagger API (JSON API)