upwork-api 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -1
- data/example/myapp.rb +2 -0
- data/lib/upwork/api/client.rb +2 -2
- data/lib/upwork/api/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aecc1625eafef46e28c0847afdd0ac818930b27b
|
4
|
+
data.tar.gz: 789e5666f2b68fe09dfddaabb360d8cc0f2d0b98
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 493b1f34958730e964bae8d940d5abb524f10058608b93c586c437cdcbc671abda96c6cdb3c823fcf4ba852f7609d77280b3d1f62466e8c37181013681030360
|
7
|
+
data.tar.gz: 586f35e52e29055f4f36777dbc15d99fd4226716830f417255d96ade8e2d8215f5eff21131ab8b9a832c00ab0ffb74db76726361474c5999e0e1a1641a3cfd7c
|
data/.travis.yml
CHANGED
data/example/myapp.rb
CHANGED
@@ -26,6 +26,8 @@ client = Upwork::Api::Client.new(config)
|
|
26
26
|
# and do not have an access token-secret pair
|
27
27
|
if !config.access_token and !config.access_secret
|
28
28
|
authz_url = client.get_authorization_url
|
29
|
+
# for web-based applications you need to specify the exact oauth_callback explicitly
|
30
|
+
# authz_url = client.get_authorization_url "https://my-callback-url-here.com"
|
29
31
|
|
30
32
|
puts "Visit the authorization url and provide oauth_verifier for further authorization"
|
31
33
|
puts authz_url
|
data/lib/upwork/api/client.rb
CHANGED
@@ -41,7 +41,7 @@ module Upwork
|
|
41
41
|
end
|
42
42
|
|
43
43
|
# Start auth process and get authorization token
|
44
|
-
def get_authorization_url
|
44
|
+
def get_authorization_url(oauth_callback = "oob")
|
45
45
|
$LOG.i "requesting autorization token"
|
46
46
|
@consumer=OAuth::Consumer.new @config.consumer_key,
|
47
47
|
@config.consumer_secret,
|
@@ -51,7 +51,7 @@ module Upwork
|
|
51
51
|
:authorize_path => URI_AUTH,
|
52
52
|
:signature_method => @config.signature_method}
|
53
53
|
|
54
|
-
@request_token = @consumer.get_request_token
|
54
|
+
@request_token = @consumer.get_request_token({:oauth_callback => oauth_callback})
|
55
55
|
$LOG.i "got request token pair", @request_token
|
56
56
|
|
57
57
|
$LOG.i "building authorization url, which is", @request_token.authorize_url
|
data/lib/upwork/api/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: upwork-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maksym Novozhylov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-10-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oauth
|