dailymotion-graph-api 0.1.4 → 0.1.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 24447a5d30a482687abd119bd9f833ba291e03f9
4
- data.tar.gz: 4662434a903385ff1c6ea5ca6e7291c70b112402
3
+ metadata.gz: 54a87d5aa9abc2781db146ee385a390db9cb79a4
4
+ data.tar.gz: 8761228b85631e3c3fa400884c45301f1d41ae96
5
5
  SHA512:
6
- metadata.gz: 04a400574947a1cfea130d106d4ca07ea8ab34924a6a0b41933f4fb7c3b0176f55b726c1c68b26238da0e336cf2ee390f5f6c1455762dcc13b82b1985d66cce2
7
- data.tar.gz: b39a4521ba2586e7de631e40fc42df48cac3eac9ccc61b9b0989bce7ac5728beb40f66271c84dcdc45b1a72325ff7685a19d9fc142e46ad0e628c9eda9cf5d7c
6
+ metadata.gz: 10aa3c8533ab021e2fe53b8e3994ff24744842e4024c2972e2fa8b7a86ded4b661fadd9532dc65c189b66e008a72f46801c3b78b2a2c58785cd5f216c79703c3
7
+ data.tar.gz: 71ad0f35f64e0190c125c0fbe98328065432a47fd09a3ec6510b84b2e5cd418cdb2f03cc1ef3d243a6ebb53061a21d55742c58c9b5a6aaf961b5ca5708819b22
@@ -11,7 +11,7 @@ Gem::Specification.new do |s|
11
11
  s.summary = "An unofficial gem for using the Dailymotion graph API : http://www.dailymotion.com/doc/api/graph-api.html"
12
12
  s.description = "An unofficial gem for using the Dailymotion graph API : http://www.dailymotion.com/doc/api/graph-api.html"
13
13
  s.licenses = ["LGPL"]
14
-
14
+
15
15
  s.rubyforge_project = "dailymotion-graph-api"
16
16
 
17
17
  s.files = `git ls-files`.split("\n")
@@ -22,7 +22,10 @@ Gem::Specification.new do |s|
22
22
 
23
23
  s.add_runtime_dependency "faraday", '~> 0.8', '>= 0.8.6'
24
24
  s.add_runtime_dependency "json", '~> 1.8', '>= 1.8.1'
25
- s.required_ruby_version = '>= 2.1.0'
25
+
26
+ s.add_development_dependency "bundler", "~> 1.7.11"
27
+ s.add_development_dependency "rake"
28
+
26
29
  s.requirements << 'faraday, >= 0.8.6'
27
30
  s.requirements << 'json'
28
31
  end
@@ -16,7 +16,7 @@ module DailymotionGraphApi
16
16
  end
17
17
 
18
18
  def connexion
19
- @connexion ||= Faraday.new(:url => 'https://api.dailymotion.com', :ssl => {:verify => false}) do |faraday|
19
+ @connexion ||= Faraday.new(:url => 'https://api.dailymotion.com', ssl: { verify: false }) do |faraday|
20
20
  faraday.request :url_encoded
21
21
  faraday.response :logger
22
22
  faraday.adapter Faraday.default_adapter
@@ -24,17 +24,18 @@ module DailymotionGraphApi
24
24
  end
25
25
 
26
26
  def refresh_token
27
- token('refresh_token')
27
+ raise 'Missing refresh token' unless @refresh_token
28
+ token('refresh_token', refresh_token: @refresh_token)
28
29
  end
29
30
 
30
31
  def get_access_token(code, callback_url)
31
- token('authorization_code', code, callback_url)
32
+ token('authorization_code', redirect_uri: callback_url, code: code)
32
33
  end
33
34
 
34
35
  def tmp_upload(video_path)
35
36
  remote_uri = URI.parse(get_upload_url['upload_url'])
36
37
 
37
- upload_connexion = Faraday.new(:url => 'http://upload-01.dailymotion.com', :ssl => {:verify => false}) do |faraday|
38
+ upload_connexion = Faraday.new(url: 'http://upload-01.dailymotion.com', ssl: { verify: false }) do |faraday|
38
39
  faraday.request :multipart
39
40
  faraday.response :logger
40
41
  faraday.adapter Faraday.default_adapter
@@ -110,14 +111,13 @@ module DailymotionGraphApi
110
111
  r
111
112
  end
112
113
 
113
- def token(grant_type, code = nil, callback_url = nil)
114
+ def token(grant_type, args = {})
114
115
  r = send_request('/oauth/token', { verb: :post, auth: false, body: {
115
- grant_type: grant_type,
116
- client_id: @client_id,
117
- client_secret: @client_secret,
118
- redirect_uri: callback_url,
119
- code: code
120
- } })
116
+ grant_type: grant_type,
117
+ client_id: @client_id,
118
+ client_secret: @client_secret
119
+ }.merge(args)
120
+ })
121
121
 
122
122
  @access_token = r['access_token']
123
123
  @refresh_token = r['refresh_token']
@@ -1,3 +1,3 @@
1
1
  module DailymotionGraphApi
2
- VERSION = '0.1.4'
2
+ VERSION = '0.1.6'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dailymotion-graph-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - jseveno
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-21 00:00:00.000000000 Z
11
+ date: 2015-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -50,6 +50,34 @@ dependencies:
50
50
  - - ">="
51
51
  - !ruby/object:Gem::Version
52
52
  version: 1.8.1
53
+ - !ruby/object:Gem::Dependency
54
+ name: bundler
55
+ requirement: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - "~>"
58
+ - !ruby/object:Gem::Version
59
+ version: 1.7.11
60
+ type: :development
61
+ prerelease: false
62
+ version_requirements: !ruby/object:Gem::Requirement
63
+ requirements:
64
+ - - "~>"
65
+ - !ruby/object:Gem::Version
66
+ version: 1.7.11
67
+ - !ruby/object:Gem::Dependency
68
+ name: rake
69
+ requirement: !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - ">="
72
+ - !ruby/object:Gem::Version
73
+ version: '0'
74
+ type: :development
75
+ prerelease: false
76
+ version_requirements: !ruby/object:Gem::Requirement
77
+ requirements:
78
+ - - ">="
79
+ - !ruby/object:Gem::Version
80
+ version: '0'
53
81
  description: 'An unofficial gem for using the Dailymotion graph API : http://www.dailymotion.com/doc/api/graph-api.html'
54
82
  email:
55
83
  - julien.seveno@idol.io
@@ -79,7 +107,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
79
107
  requirements:
80
108
  - - ">="
81
109
  - !ruby/object:Gem::Version
82
- version: 2.1.0
110
+ version: '0'
83
111
  required_rubygems_version: !ruby/object:Gem::Requirement
84
112
  requirements:
85
113
  - - ">="
@@ -89,7 +117,7 @@ requirements:
89
117
  - faraday, >= 0.8.6
90
118
  - json
91
119
  rubyforge_project: dailymotion-graph-api
92
- rubygems_version: 2.2.0
120
+ rubygems_version: 2.4.5
93
121
  signing_key:
94
122
  specification_version: 4
95
123
  summary: 'An unofficial gem for using the Dailymotion graph API : http://www.dailymotion.com/doc/api/graph-api.html'