linkedin 0.2.2 → 0.3.1
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.
- data/{spec/fixtures/blank.xml → .gemtest} +0 -0
- data/.gitignore +36 -21
- data/.rspec +3 -0
- data/.travis.yml +6 -0
- data/Gemfile +6 -2
- data/Rakefile +9 -31
- data/changelog.markdown +1 -1
- data/lib/linked_in/api/query_methods.rb +49 -0
- data/lib/linked_in/api/update_methods.rb +54 -0
- data/lib/linked_in/client.rb +44 -147
- data/lib/linked_in/errors.rb +20 -0
- data/lib/linked_in/helpers/authorization.rb +67 -0
- data/lib/linked_in/helpers/request.rb +77 -0
- data/lib/linked_in/mash.rb +68 -0
- data/lib/linked_in/search.rb +34 -0
- data/lib/linked_in/version.rb +11 -0
- data/lib/linkedin.rb +4 -55
- data/linkedin.gemspec +26 -47
- data/spec/cases/client_spec.rb +260 -276
- data/spec/cases/linkedin_spec.rb +6 -6
- data/spec/cases/mash_spec.rb +85 -0
- data/spec/cases/oauth_spec.rb +146 -92
- data/spec/fixtures/cassette_library/LinkedIn_Client/_authorize_from_request.yml +28 -0
- data/spec/fixtures/cassette_library/LinkedIn_Client/_request_token.yml +28 -0
- data/spec/fixtures/cassette_library/LinkedIn_Client/_request_token/with_a_callback_url.yml +28 -0
- data/spec/fixtures/cassette_library/LinkedIn_Client/_request_token/with_default_options.yml +28 -0
- data/spec/helper.rb +30 -0
- metadata +139 -169
- data/VERSION +0 -1
- data/lib/linked_in/api_standard_profile_request.rb +0 -17
- data/lib/linked_in/authorization_helpers.rb +0 -48
- data/lib/linked_in/base.rb +0 -13
- data/lib/linked_in/birthdate.rb +0 -21
- data/lib/linked_in/company.rb +0 -11
- data/lib/linked_in/connections.rb +0 -16
- data/lib/linked_in/country.rb +0 -9
- data/lib/linked_in/current_share.rb +0 -56
- data/lib/linked_in/education.rb +0 -41
- data/lib/linked_in/error.rb +0 -21
- data/lib/linked_in/group.rb +0 -32
- data/lib/linked_in/languages.rb +0 -28
- data/lib/linked_in/likes.rb +0 -23
- data/lib/linked_in/location.rb +0 -13
- data/lib/linked_in/message.rb +0 -20
- data/lib/linked_in/network.rb +0 -12
- data/lib/linked_in/patents.rb +0 -42
- data/lib/linked_in/people.rb +0 -18
- data/lib/linked_in/person.rb +0 -7
- data/lib/linked_in/phone_number.rb +0 -29
- data/lib/linked_in/position.rb +0 -46
- data/lib/linked_in/profile.rb +0 -85
- data/lib/linked_in/publications.rb +0 -40
- data/lib/linked_in/recipient.rb +0 -7
- data/lib/linked_in/recipients.rb +0 -18
- data/lib/linked_in/recommendations.rb +0 -30
- data/lib/linked_in/short_profile.rb +0 -13
- data/lib/linked_in/skill.rb +0 -33
- data/lib/linked_in/to_xml_helpers.rb +0 -53
- data/lib/linked_in/update.rb +0 -23
- data/lib/linked_in/url_resource.rb +0 -26
- data/spec/fixtures/connections.xml +0 -3733
- data/spec/fixtures/error.xml +0 -7
- data/spec/fixtures/likes.xml +0 -18
- data/spec/fixtures/mailbox_items.xml +0 -16
- data/spec/fixtures/network_status_with_group.xml +0 -44
- data/spec/fixtures/network_statuses.xml +0 -317
- data/spec/fixtures/picture_updates.xml +0 -117
- data/spec/fixtures/profile.xml +0 -9
- data/spec/fixtures/profile_full.xml +0 -3906
- data/spec/fixtures/profile_with_positions.xml +0 -79
- data/spec/fixtures/search.xml +0 -538
- data/spec/fixtures/shares.xml +0 -12
- data/spec/fixtures/status.xml +0 -2
- data/spec/spec_helper.rb +0 -49
data/spec/cases/linkedin_spec.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require '
|
1
|
+
require 'helper'
|
2
2
|
|
3
3
|
describe LinkedIn do
|
4
4
|
|
@@ -9,10 +9,10 @@ describe LinkedIn do
|
|
9
9
|
end
|
10
10
|
|
11
11
|
it "should be able to set the consumer token and consumer secret" do
|
12
|
-
LinkedIn.token
|
12
|
+
LinkedIn.token = 'consumer_token'
|
13
13
|
LinkedIn.secret = 'consumer_secret'
|
14
14
|
|
15
|
-
LinkedIn.token.should
|
15
|
+
LinkedIn.token.should == 'consumer_token'
|
16
16
|
LinkedIn.secret.should == 'consumer_secret'
|
17
17
|
end
|
18
18
|
|
@@ -24,14 +24,14 @@ describe LinkedIn do
|
|
24
24
|
|
25
25
|
it "should be able to set the consumer token and consumer secret via a configure block" do
|
26
26
|
LinkedIn.configure do |config|
|
27
|
-
config.token
|
27
|
+
config.token = 'consumer_token'
|
28
28
|
config.secret = 'consumer_secret'
|
29
29
|
config.default_profile_fields = ['education', 'positions']
|
30
30
|
end
|
31
31
|
|
32
|
-
LinkedIn.token.should
|
32
|
+
LinkedIn.token.should == 'consumer_token'
|
33
33
|
LinkedIn.secret.should == 'consumer_secret'
|
34
34
|
LinkedIn.default_profile_fields.should == ['education', 'positions']
|
35
35
|
end
|
36
36
|
|
37
|
-
end
|
37
|
+
end
|
@@ -0,0 +1,85 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
describe LinkedIn::Mash do
|
4
|
+
|
5
|
+
describe ".from_json" do
|
6
|
+
it "should convert a json string to a Mash" do
|
7
|
+
json_string = "{\"name\":\"Josh Kalderimis\"}"
|
8
|
+
mash = LinkedIn::Mash.from_json(json_string)
|
9
|
+
|
10
|
+
mash.should have_key('name')
|
11
|
+
mash.name.should == 'Josh Kalderimis'
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
describe "#convert_keys" do
|
16
|
+
let(:mash) do
|
17
|
+
LinkedIn::Mash.new({
|
18
|
+
'firstName' => 'Josh',
|
19
|
+
'LastName' => 'Kalderimis',
|
20
|
+
'_key' => 1234,
|
21
|
+
'_total' => 1234,
|
22
|
+
'values' => {},
|
23
|
+
'numResults' => 'total_results'
|
24
|
+
})
|
25
|
+
end
|
26
|
+
|
27
|
+
it "should convert camal cased hash keys to underscores" do
|
28
|
+
mash.should have_key('first_name')
|
29
|
+
mash.should have_key('last_name')
|
30
|
+
end
|
31
|
+
|
32
|
+
it "should convert the key _key to id" do
|
33
|
+
mash.should have_key('id')
|
34
|
+
end
|
35
|
+
|
36
|
+
it "should convert the key _total to total" do
|
37
|
+
mash.should have_key('total')
|
38
|
+
end
|
39
|
+
|
40
|
+
it "should convert the key values to all" do
|
41
|
+
mash.should have_key('all')
|
42
|
+
end
|
43
|
+
|
44
|
+
it "should convert the key numResults to total_results" do
|
45
|
+
mash.should have_key('total_results')
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
describe '#timestamp' do
|
50
|
+
it "should return a valid Time if a key of timestamp exists and the value is an int" do
|
51
|
+
time_mash = LinkedIn::Mash.new({ 'timestamp' => 1297083249 })
|
52
|
+
|
53
|
+
time_mash.timestamp.should be_a_kind_of(Time)
|
54
|
+
time_mash.timestamp.to_i.should == 1297083249
|
55
|
+
end
|
56
|
+
|
57
|
+
it "should return a valid Time if a key of timestamp exists and the value is an int which is greater than 9999999999" do
|
58
|
+
time_mash = LinkedIn::Mash.new({ 'timestamp' => 1297083249 * 1000 })
|
59
|
+
|
60
|
+
time_mash.timestamp.should be_a_kind_of(Time)
|
61
|
+
time_mash.timestamp.to_i.should == 1297083249
|
62
|
+
end
|
63
|
+
|
64
|
+
it "should not try to convert to a Time object if the value isn't an Integer" do
|
65
|
+
time_mash = LinkedIn::Mash.new({ 'timestamp' => 'Foo' })
|
66
|
+
|
67
|
+
time_mash.timestamp.class.should be String
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
describe "#to_date" do
|
72
|
+
let(:date_mash) do
|
73
|
+
LinkedIn::Mash.new({
|
74
|
+
'year' => 2010,
|
75
|
+
'month' => 06,
|
76
|
+
'day' => 23
|
77
|
+
})
|
78
|
+
end
|
79
|
+
|
80
|
+
it "should return a valid Date if the keys year, month, day all exist" do
|
81
|
+
date_mash.to_date.should == Date.civil(2010, 06, 23)
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
end
|
data/spec/cases/oauth_spec.rb
CHANGED
@@ -1,109 +1,163 @@
|
|
1
|
-
require '
|
2
|
-
|
3
|
-
describe "LinkedIn::Client OAuth" do
|
4
|
-
let(:client) { LinkedIn::Client.new('token', 'secret') }
|
5
|
-
|
6
|
-
it "should initialize with consumer token and secret" do
|
7
|
-
client.ctoken.should == 'token'
|
8
|
-
client.csecret.should == 'secret'
|
9
|
-
end
|
1
|
+
require 'helper'
|
10
2
|
|
11
|
-
|
12
|
-
client.consumer.options[:authorize_path].should == '/uas/oauth/authorize'
|
13
|
-
end
|
3
|
+
describe "LinkedIn::Client" do
|
14
4
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
:access_token_path => "/uas/oauth/accessToken",
|
20
|
-
:authorize_path => "/uas/oauth/authorize",
|
21
|
-
:site => 'https://api.linkedin.com'
|
22
|
-
}
|
23
|
-
OAuth::Consumer.should_receive(:new).with('token', 'secret', options).and_return(consumer)
|
24
|
-
|
25
|
-
client.consumer.should == consumer
|
5
|
+
let(:client) do
|
6
|
+
key = ENV['LINKED_IN_CONSUMER_KEY'] || '1234'
|
7
|
+
secret = ENV['LINKED_IN_CONSUMER_SECRET'] || '1234'
|
8
|
+
LinkedIn::Client.new(key, secret)
|
26
9
|
end
|
27
10
|
|
28
|
-
|
29
|
-
options
|
30
|
-
:
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
11
|
+
describe "#consumer" do
|
12
|
+
describe "default oauth options" do
|
13
|
+
let(:consumer) { client.consumer }
|
14
|
+
|
15
|
+
it "should return a configured OAuth consumer" do
|
16
|
+
consumer.site.should == ''
|
17
|
+
consumer.request_token_url.should == 'https://api.linkedin.com/uas/oauth/requestToken'
|
18
|
+
consumer.access_token_url.should == 'https://api.linkedin.com/uas/oauth/accessToken'
|
19
|
+
consumer.authorize_url.should == 'https://www.linkedin.com/uas/oauth/authorize'
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
describe "different api and auth hosts options" do
|
24
|
+
let(:consumer) do
|
25
|
+
LinkedIn::Client.new('1234', '1234', {
|
26
|
+
:api_host => 'https://api.josh.com',
|
27
|
+
:auth_host => 'https://www.josh.com'
|
28
|
+
}).consumer
|
29
|
+
end
|
30
|
+
|
31
|
+
it "should return a configured OAuth consumer" do
|
32
|
+
consumer.request_token_url.should == 'https://api.josh.com/uas/oauth/requestToken'
|
33
|
+
consumer.access_token_url.should == 'https://api.josh.com/uas/oauth/accessToken'
|
34
|
+
consumer.authorize_url.should == 'https://www.josh.com/uas/oauth/authorize'
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
describe "different oauth paths" do
|
39
|
+
let(:consumer) do
|
40
|
+
LinkedIn::Client.new('1234', '1234', {
|
41
|
+
:request_token_path => "/secure/oauth/requestToken",
|
42
|
+
:access_token_path => "/secure/oauth/accessToken",
|
43
|
+
:authorize_path => "/secure/oauth/authorize",
|
44
|
+
}).consumer
|
45
|
+
end
|
46
|
+
|
47
|
+
it "should return a configured OAuth consumer" do
|
48
|
+
consumer.request_token_url.should == 'https://api.linkedin.com/secure/oauth/requestToken'
|
49
|
+
consumer.access_token_url.should == 'https://api.linkedin.com/secure/oauth/accessToken'
|
50
|
+
consumer.authorize_url.should == 'https://www.linkedin.com/secure/oauth/authorize'
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
describe "specify oauth urls" do
|
55
|
+
let(:consumer) do
|
56
|
+
LinkedIn::Client.new('1234', '1234', {
|
57
|
+
:request_token_url => "https://api.josh.com/secure/oauth/requestToken",
|
58
|
+
:access_token_url => "https://api.josh.com/secure/oauth/accessToken",
|
59
|
+
:authorize_url => "https://www.josh.com/secure/oauth/authorize",
|
60
|
+
}).consumer
|
61
|
+
end
|
62
|
+
|
63
|
+
it "should return a configured OAuth consumer" do
|
64
|
+
consumer.request_token_url.should == 'https://api.josh.com/secure/oauth/requestToken'
|
65
|
+
consumer.access_token_url.should == 'https://api.josh.com/secure/oauth/accessToken'
|
66
|
+
consumer.authorize_url.should == 'https://www.josh.com/secure/oauth/authorize'
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
describe "use the :site option to specify the host of all oauth urls" do
|
71
|
+
let(:consumer) do
|
72
|
+
LinkedIn::Client.new('1234', '1234', {
|
73
|
+
:site => "https://api.josh.com"
|
74
|
+
}).consumer
|
75
|
+
end
|
76
|
+
|
77
|
+
it "should return a configured OAuth consumer" do
|
78
|
+
consumer.request_token_url.should == 'https://api.josh.com/uas/oauth/requestToken'
|
79
|
+
consumer.access_token_url.should == 'https://api.josh.com/uas/oauth/accessToken'
|
80
|
+
consumer.authorize_url.should == 'https://api.josh.com/uas/oauth/authorize'
|
81
|
+
end
|
82
|
+
end
|
41
83
|
end
|
42
84
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
85
|
+
describe "#request_token" do
|
86
|
+
describe "with default options" do
|
87
|
+
use_vcr_cassette :record => :new_episodes
|
88
|
+
|
89
|
+
it "should return a valid request token" do
|
90
|
+
request_token = client.request_token
|
91
|
+
|
92
|
+
request_token.should be_a_kind_of OAuth::RequestToken
|
93
|
+
request_token.authorize_url.should include("https://www.linkedin.com/uas/oauth/authorize?oauth_token=")
|
94
|
+
|
95
|
+
a_request(:post, "https://api.linkedin.com/uas/oauth/requestToken").should have_been_made.once
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
describe "with a callback url" do
|
100
|
+
use_vcr_cassette :record => :new_episodes
|
101
|
+
|
102
|
+
it "should return a valid access token" do
|
103
|
+
request_token = client.request_token(:oauth_callback => 'http://www.josh.com')
|
104
|
+
|
105
|
+
request_token.should be_a_kind_of OAuth::RequestToken
|
106
|
+
request_token.authorize_url.should include("https://www.linkedin.com/uas/oauth/authorize?oauth_token=")
|
107
|
+
request_token.callback_confirmed?.should == true
|
108
|
+
|
109
|
+
a_request(:post, "https://api.linkedin.com/uas/oauth/requestToken").should have_been_made.once
|
110
|
+
end
|
111
|
+
end
|
64
112
|
end
|
65
113
|
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
request_token.
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
114
|
+
describe "#authorize_from_request" do
|
115
|
+
let(:access_token) do
|
116
|
+
# if you remove the related casssette you will need to do the following
|
117
|
+
# authorize_from_request request manually
|
118
|
+
#
|
119
|
+
# request_token = client.request_token
|
120
|
+
# puts "token : #{request_token.token} - secret #{request_token.secret}"
|
121
|
+
# puts "auth url : #{request_token.authorize_url}"
|
122
|
+
# raise 'keep note of the token and secret'
|
123
|
+
#
|
124
|
+
client.authorize_from_request('dummy-token', 'dummy-secret', 'dummy-pin')
|
125
|
+
end
|
126
|
+
|
127
|
+
use_vcr_cassette :record => :new_episodes, :match_requests_on => [:uri, :method]
|
128
|
+
|
129
|
+
it "should return a valid access token" do
|
130
|
+
access_token.should be_a_kind_of Array
|
131
|
+
access_token[0].should be_a_kind_of String
|
132
|
+
access_token[1].should be_a_kind_of String
|
133
|
+
|
134
|
+
a_request(:post, "https://api.linkedin.com/uas/oauth/accessToken").should have_been_made.once
|
135
|
+
end
|
86
136
|
end
|
87
137
|
|
88
|
-
|
89
|
-
|
90
|
-
|
138
|
+
describe "#access_token" do
|
139
|
+
let(:access_token) do
|
140
|
+
client.authorize_from_access('dummy-token', 'dummy-secret')
|
141
|
+
client.access_token
|
142
|
+
end
|
91
143
|
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
144
|
+
it "should return a valid auth token" do
|
145
|
+
access_token.should be_a_kind_of OAuth::AccessToken
|
146
|
+
access_token.token.should be_a_kind_of String
|
147
|
+
access_token.token.should be_a_kind_of String
|
148
|
+
end
|
96
149
|
end
|
97
150
|
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
config.secret = 'consumer_secret'
|
151
|
+
describe "#authorize_from_access" do
|
152
|
+
let(:auth_token) do
|
153
|
+
client.authorize_from_access('dummy-token', 'dummy-secret')
|
102
154
|
end
|
103
155
|
|
104
|
-
|
105
|
-
|
106
|
-
|
156
|
+
it "should return a valid auth token" do
|
157
|
+
auth_token.should be_a_kind_of Array
|
158
|
+
auth_token[0].should be_a_kind_of String
|
159
|
+
auth_token[1].should be_a_kind_of String
|
160
|
+
end
|
107
161
|
end
|
108
162
|
|
109
|
-
end
|
163
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
---
|
2
|
+
- !ruby/struct:VCR::HTTPInteraction
|
3
|
+
request: !ruby/struct:VCR::Request
|
4
|
+
method: :post
|
5
|
+
uri: https://api.linkedin.com:443/uas/oauth/accessToken
|
6
|
+
body:
|
7
|
+
headers:
|
8
|
+
user-agent:
|
9
|
+
- OAuth gem v0.4.4
|
10
|
+
authorization:
|
11
|
+
- OAuth oauth_body_hash="2jmj7l5rSw0yVb%2FvlWAYkK%2FYBwk%3D", oauth_consumer_key="eAI15DqRUTTd7OuQJBG3Mo0aw2Ekx5yoLX3x3NaLnbTnZbaU46OEii7uNTKijII4", oauth_nonce="ztYyddIoKJ8flDjBJyveOSqm96CLaEM4QpOC0CSW0E", oauth_signature="NSp3ZDtycelP7wsDM7dsuDTZGys%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1297095033", oauth_token="2f5b42dd-1e0e-4f8f-a03c-1e510bde5935", oauth_verifier="25038", oauth_version="1.0"
|
12
|
+
content-length:
|
13
|
+
- "0"
|
14
|
+
response: !ruby/struct:VCR::Response
|
15
|
+
status: !ruby/struct:VCR::ResponseStatus
|
16
|
+
code: 200
|
17
|
+
message: OK
|
18
|
+
headers:
|
19
|
+
content-type:
|
20
|
+
- text/plain
|
21
|
+
server:
|
22
|
+
- Apache-Coyote/1.1
|
23
|
+
date:
|
24
|
+
- Mon, 07 Feb 2011 16:10:34 GMT
|
25
|
+
content-length:
|
26
|
+
- "156"
|
27
|
+
body: oauth_token=28774cd4-fbe1-4e6e-a05e-1243f6471933&oauth_token_secret=2fafe259-976e-41ad-a6f5-d26bbba42923&oauth_expires_in=0&oauth_authorization_expires_in=0
|
28
|
+
http_version: "1.1"
|
@@ -0,0 +1,28 @@
|
|
1
|
+
---
|
2
|
+
- !ruby/struct:VCR::HTTPInteraction
|
3
|
+
request: !ruby/struct:VCR::Request
|
4
|
+
method: :post
|
5
|
+
uri: https://api.linkedin.com:443/uas/oauth/requestToken
|
6
|
+
body:
|
7
|
+
headers:
|
8
|
+
user-agent:
|
9
|
+
- OAuth gem v0.4.4
|
10
|
+
authorization:
|
11
|
+
- OAuth oauth_body_hash="2jmj7l5rSw0yVb%2FvlWAYkK%2FYBwk%3D", oauth_callback="oob", oauth_consumer_key="eAI15DqRUTTd7OuQJBG3Mo0aw2Ekx5yoLX3x3NaLnbTnZbaU46OEii7uNTKijII4", oauth_nonce="jSQpxoXaoTl2e0dALgc7VKzRJE993wqzRWuXuF0H0", oauth_signature="wn%2Bw0Jvyb9TQ4DC8sq3CxWMDM7Y%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1297093507", oauth_version="1.0"
|
12
|
+
content-length:
|
13
|
+
- "0"
|
14
|
+
response: !ruby/struct:VCR::Response
|
15
|
+
status: !ruby/struct:VCR::ResponseStatus
|
16
|
+
code: 200
|
17
|
+
message: OK
|
18
|
+
headers:
|
19
|
+
content-type:
|
20
|
+
- text/plain
|
21
|
+
server:
|
22
|
+
- Apache-Coyote/1.1
|
23
|
+
date:
|
24
|
+
- Mon, 07 Feb 2011 15:45:08 GMT
|
25
|
+
content-length:
|
26
|
+
- "236"
|
27
|
+
body: oauth_token=95f8619b-7069-433b-ac9e-35dfba02b0f7&oauth_token_secret=dffd7996-6943-48ce-be6b-771e86b10f92&oauth_callback_confirmed=true&xoauth_request_auth_url=https%3A%2F%2Fapi.linkedin.com%2Fuas%2Foauth%2Fauthorize&oauth_expires_in=599
|
28
|
+
http_version: "1.1"
|
@@ -0,0 +1,28 @@
|
|
1
|
+
---
|
2
|
+
- !ruby/struct:VCR::HTTPInteraction
|
3
|
+
request: !ruby/struct:VCR::Request
|
4
|
+
method: :post
|
5
|
+
uri: https://api.linkedin.com:443/uas/oauth/requestToken
|
6
|
+
body:
|
7
|
+
headers:
|
8
|
+
user-agent:
|
9
|
+
- OAuth gem v0.4.4
|
10
|
+
authorization:
|
11
|
+
- OAuth oauth_body_hash="2jmj7l5rSw0yVb%2FvlWAYkK%2FYBwk%3D", oauth_callback="http%3A%2F%2Fwww.josh.com", oauth_consumer_key="eAI15DqRUTTd7OuQJBG3Mo0aw2Ekx5yoLX3x3NaLnbTnZbaU46OEii7uNTKijII4", oauth_nonce="OYVkd4yi5oe16NGQMbANhBB8cabeynkTX28fOEjG1rs", oauth_signature="%2BwgZ8nb2CM5oWRpJEC5U0554uGk%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1297103790", oauth_version="1.0"
|
12
|
+
content-length:
|
13
|
+
- "0"
|
14
|
+
response: !ruby/struct:VCR::Response
|
15
|
+
status: !ruby/struct:VCR::ResponseStatus
|
16
|
+
code: 200
|
17
|
+
message: OK
|
18
|
+
headers:
|
19
|
+
content-type:
|
20
|
+
- text/plain
|
21
|
+
server:
|
22
|
+
- Apache-Coyote/1.1
|
23
|
+
date:
|
24
|
+
- Mon, 07 Feb 2011 18:36:30 GMT
|
25
|
+
content-length:
|
26
|
+
- "236"
|
27
|
+
body: oauth_token=f8af7ca2-ca1a-48f2-be6a-bd7b721e2868&oauth_token_secret=c5ec7928-7740-4813-a202-2be8800a0b32&oauth_callback_confirmed=true&xoauth_request_auth_url=https%3A%2F%2Fapi.linkedin.com%2Fuas%2Foauth%2Fauthorize&oauth_expires_in=599
|
28
|
+
http_version: "1.1"
|