linkedin2 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rspec +3 -0
- data/.travis.yml +4 -0
- data/README.md +3 -1
- data/Rakefile +6 -0
- data/lib/linkedin/api.rb +2 -0
- data/lib/linkedin/api/companies.rb +8 -2
- data/lib/linkedin/api/industries.rb +147 -147
- data/lib/linkedin/api/network_updates.rb +17 -0
- data/lib/linkedin/api/profiles.rb +4 -0
- data/lib/linkedin/base.rb +6 -3
- data/lib/linkedin/client.rb +5 -3
- data/lib/linkedin/configuration.rb +2 -2
- data/lib/linkedin/profile.rb +5 -6
- data/lib/linkedin/version.rb +1 -1
- data/linkedin.gemspec +2 -1
- data/spec/api/companies_spec.rb +20 -11
- data/spec/api/groups_spec.rb +3 -0
- data/spec/api/jobs_spec.rb +3 -0
- data/spec/api/network_updates_spec.rb +32 -0
- data/spec/api/profiles_spec.rb +36 -26
- data/spec/faraday_middleware/linkedin_error_response_spec.rb +10 -4
- data/spec/fixtures/requests/access_token.yml +55 -22
- data/spec/fixtures/requests/companies.yml +258 -0
- data/spec/fixtures/requests/invalid.yml +51 -0
- data/spec/fixtures/requests/network_updates.yml +743 -0
- data/spec/fixtures/requests/profiles.yml +201 -0
- data/spec/spec_helper.rb +15 -5
- data/spec/test_app.yml +3 -0
- metadata +55 -30
- data/spec/fixtures/requests/company.yml +0 -81
@@ -22,7 +22,7 @@ module LinkedIn
|
|
22
22
|
|
23
23
|
module BaseConfiguration
|
24
24
|
def configure(config={}, &block)
|
25
|
-
self.config.marshal_load self.config.
|
25
|
+
self.config.marshal_load self.config.marshal_dump.merge(config)
|
26
26
|
|
27
27
|
yield self.config if block_given?
|
28
28
|
|
@@ -35,7 +35,7 @@ module LinkedIn
|
|
35
35
|
end
|
36
36
|
|
37
37
|
def defaults(*keys)
|
38
|
-
config.
|
38
|
+
config.marshal_dump.slice *keys
|
39
39
|
end
|
40
40
|
end
|
41
41
|
|
data/lib/linkedin/profile.rb
CHANGED
@@ -1,20 +1,19 @@
|
|
1
1
|
module LinkedIn
|
2
2
|
class Profile < Base
|
3
3
|
def connections
|
4
|
-
@connections ||= client.connections(
|
4
|
+
@connections ||= client.connections(id: self.id)['values'].map { |c| Profile.new c }
|
5
5
|
end
|
6
6
|
|
7
7
|
def self.current(*fields)
|
8
|
-
find_by
|
8
|
+
find_by fields: Array[*fields]
|
9
9
|
end
|
10
10
|
|
11
11
|
def self.find(id, *fields)
|
12
|
-
find_by
|
12
|
+
find_by id: id, fields: Array[*fields]
|
13
13
|
end
|
14
14
|
|
15
|
-
def self.find_by(
|
16
|
-
|
17
|
-
Profile.new client.profile( selector: selector, fields: fields )
|
15
|
+
def self.find_by(options)
|
16
|
+
Profile.new client.profile( { fields: LinkedIn.r_basicprofile }.merge options)
|
18
17
|
end
|
19
18
|
end
|
20
19
|
end
|
data/lib/linkedin/version.rb
CHANGED
data/linkedin.gemspec
CHANGED
@@ -25,8 +25,9 @@ Gem::Specification.new do |spec|
|
|
25
25
|
|
26
26
|
spec.add_development_dependency 'bundler', '~> 1.3'
|
27
27
|
spec.add_development_dependency 'rake'
|
28
|
-
spec.add_development_dependency 'byebug'
|
29
28
|
spec.add_development_dependency 'pry'
|
29
|
+
spec.add_development_dependency 'simplecov'
|
30
30
|
spec.add_development_dependency 'rspec', '~> 2.14'
|
31
31
|
spec.add_development_dependency 'vcr', '~> 2.5'
|
32
|
+
spec.add_development_dependency 'yard'
|
32
33
|
end
|
data/spec/api/companies_spec.rb
CHANGED
@@ -1,24 +1,33 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
describe LinkedIn::API::Companies do
|
4
|
-
subject { LinkedIn::Client }
|
3
|
+
describe LinkedIn::API::Companies, vcr: { cassette_name: 'companies' } do
|
4
|
+
subject { LinkedIn::Client.new }
|
5
5
|
|
6
6
|
describe '#company' do
|
7
|
-
it
|
8
|
-
|
9
|
-
subject.company(:id => 1586)
|
7
|
+
it 'fetches a company profile by id' do
|
8
|
+
subject.company(selector: 162479)['name'].should eq 'Apple'
|
10
9
|
end
|
11
10
|
|
12
|
-
it
|
13
|
-
|
14
|
-
subject.company(:name => 'acme')
|
11
|
+
it 'fetches a company profile by universal name' do
|
12
|
+
subject.company(selector: 'universal-name=linkedin')['name'].should eq 'LinkedIn'
|
15
13
|
end
|
16
14
|
|
17
|
-
it
|
18
|
-
|
19
|
-
|
15
|
+
it 'fetches a company profile by e-mail domain' do
|
16
|
+
companies = subject.company(filter: 'email-domain=apple.com')
|
17
|
+
companies['values'].first['name'].should eq 'Apple'
|
20
18
|
end
|
21
19
|
|
20
|
+
it 'fetches companies in bulk using their respective selectors' do
|
21
|
+
companies = subject.company(selector: [162479, 'universal-name=linkedin'])
|
22
|
+
companies['values'].collect { |c| c['name'] }.should eq ['Apple', 'LinkedIn']
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'fetches companies that the current user is an adminstrator of' do
|
26
|
+
subject.company(filter: 'is-company-admin=true')['_total'].should eq 0
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
context 'todo' do
|
22
31
|
it "should load correct company data" do
|
23
32
|
pending
|
24
33
|
data = subject.company(:id => 1586, :fields => %w{ id name industry locations:(address:(city state country-code) is-headquarters) employee-count-range })
|
data/spec/api/groups_spec.rb
CHANGED
@@ -2,6 +2,9 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe LinkedIn::API::Groups do
|
4
4
|
describe '#jobs' do
|
5
|
+
end
|
6
|
+
|
7
|
+
context 'todo' do
|
5
8
|
it "should be able to list group memberships for a profile" do
|
6
9
|
pending "https://api.linkedin.com/v1/people/~/group-memberships"
|
7
10
|
subject.group_memberships
|
data/spec/api/jobs_spec.rb
CHANGED
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe LinkedIn::API::Profiles, vcr: { cassette_name: 'network_updates' } do
|
4
|
+
subject { LinkedIn::Client.new }
|
5
|
+
|
6
|
+
describe '#network_updates' do
|
7
|
+
it 'fetches network updates for the current user' do
|
8
|
+
network_updates = subject.network_updates
|
9
|
+
network_updates['_total'].should eq 13
|
10
|
+
network_updates['values'].should have(10).things
|
11
|
+
end
|
12
|
+
|
13
|
+
it 'fetches network updates by key' do
|
14
|
+
network_updates = subject.network_updates(selector: 'key=PROF-18939563-5794095336964247552-*1')
|
15
|
+
network_updates['updatedFields']['values'].should have(1).thing
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
describe '#network_update_comments' do
|
20
|
+
it 'fetches comments for network updates' do
|
21
|
+
comments = subject.network_update_comments(selector: 'key=PROF-18939563-5794095336964247552-*1')
|
22
|
+
comments['values'].first['comment'].should eq 'Whaaaat'
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
describe '#network_update_likes' do
|
27
|
+
it 'fetches "likes" for network updates' do
|
28
|
+
likes = subject.network_update_likes(selector: 'key=PROF-18939563-5794095336964247552-*1')
|
29
|
+
likes['values'].first['person']['id'].should eq 'cDmdM9cb0H'
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
data/spec/api/profiles_spec.rb
CHANGED
@@ -1,39 +1,31 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
describe LinkedIn::API::Profiles do
|
4
|
-
subject { LinkedIn::Client }
|
3
|
+
describe LinkedIn::API::Profiles, vcr: { cassette_name: 'profiles' } do
|
4
|
+
subject { LinkedIn::Client.new }
|
5
5
|
|
6
6
|
describe '#profile' do
|
7
|
-
it
|
8
|
-
|
9
|
-
subject.profile
|
10
|
-
end
|
11
|
-
|
12
|
-
it "should be able to view public profiles" do
|
13
|
-
pending "https://api.linkedin.com/v1/people/id=123"
|
14
|
-
subject.profile(:id => 123)
|
15
|
-
end
|
7
|
+
it 'fetches the profile of the current user' do
|
8
|
+
profile = subject.profile
|
16
9
|
|
17
|
-
|
18
|
-
|
19
|
-
subject.connections
|
10
|
+
profile['firstName'].should eq 'Josh'
|
11
|
+
profile['lastName'].should eq 'Testjordan'
|
20
12
|
end
|
21
13
|
|
22
|
-
it
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
it "should be able to view network_update's comments" do
|
28
|
-
pending "https://api.linkedin.com/v1/people/~/network/updates/key=network_update_key/update-comments"
|
29
|
-
subject.share_comments("network_update_key")
|
14
|
+
it 'fetches publicly available profiles' do
|
15
|
+
profile = subject.profile(selector: 'id=Fy5e5a4mqr')
|
16
|
+
|
17
|
+
profile['firstName'].should eq 'Sir Richard'
|
18
|
+
profile['lastName'].should eq 'B.'
|
30
19
|
end
|
20
|
+
end
|
31
21
|
|
32
|
-
|
33
|
-
|
34
|
-
subject.
|
22
|
+
describe '#connections' do
|
23
|
+
it 'fetches the connections of the current user' do
|
24
|
+
subject.connections['values'].should have(2).things
|
35
25
|
end
|
26
|
+
end
|
36
27
|
|
28
|
+
context 'todo' do
|
37
29
|
it "should be able to search with a keyword if given a String" do
|
38
30
|
pending "https://api.linkedin.com/v1/people-search?keywords=business"
|
39
31
|
subject.search("business")
|
@@ -106,4 +98,22 @@ describe LinkedIn::API::Profiles do
|
|
106
98
|
expect{ subject.search(:first_name => "Javan") }.to raise_error(LinkedIn::Forbidden)
|
107
99
|
end
|
108
100
|
end
|
109
|
-
|
101
|
+
|
102
|
+
describe '#connections' do
|
103
|
+
it 'finds all connections for the current user' do
|
104
|
+
linkedin_keys = %w(id headline firstName lastName industry location pictureUrl siteStandardProfileRequest)
|
105
|
+
connections = subject.connections
|
106
|
+
|
107
|
+
connections['values'].should_not be_nil
|
108
|
+
connections['values'].first.keys.should include(*linkedin_keys)
|
109
|
+
end
|
110
|
+
|
111
|
+
it 'finds all connections for a user' do
|
112
|
+
linkedin_keys = %w(id headline firstName lastName industry location pictureUrl siteStandardProfileRequest)
|
113
|
+
connections = subject.connections
|
114
|
+
|
115
|
+
connections['values'].should_not be_nil
|
116
|
+
connections['values'].first.keys.should include(*linkedin_keys)
|
117
|
+
end
|
118
|
+
end
|
119
|
+
end
|
@@ -1,10 +1,13 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe LinkedIn::FaradayMiddleware::LinkedinErrorResponse, vcr: { cassette_name: 'invalid' } do
|
4
|
+
subject { LinkedIn::Client.new(access_token: nil) }
|
5
|
+
|
4
6
|
describe '#on_error' do
|
5
7
|
it 'raises an error with the status and body reported by Rack included' do
|
6
8
|
begin
|
7
|
-
|
9
|
+
subject.profile
|
10
|
+
raise 'Should have encountered an exception'
|
8
11
|
rescue LinkedIn::Error => error
|
9
12
|
error.status.should eq 401
|
10
13
|
error.body.should eq({
|
@@ -19,7 +22,8 @@ describe LinkedIn::FaradayMiddleware::LinkedinErrorResponse, vcr: { cassette_nam
|
|
19
22
|
|
20
23
|
it 'uses the message returned by LinkedIn' do
|
21
24
|
begin
|
22
|
-
|
25
|
+
subject.profile
|
26
|
+
raise 'Should have encountered an exception'
|
23
27
|
rescue LinkedIn::Error => err
|
24
28
|
err.message.should eq 'Empty oauth2_access_token'
|
25
29
|
end
|
@@ -27,7 +31,8 @@ describe LinkedIn::FaradayMiddleware::LinkedinErrorResponse, vcr: { cassette_nam
|
|
27
31
|
|
28
32
|
it 'includes the Faraday request/response object for further introspection by the consumer' do
|
29
33
|
begin
|
30
|
-
|
34
|
+
subject.profile
|
35
|
+
raise 'Should have encountered an exception'
|
31
36
|
rescue LinkedIn::Error => err
|
32
37
|
err.request.headers['User-Agent'].should eq 'Faraday v0.8.8'
|
33
38
|
err.response.headers['Server'].should eq 'Apache-Coyote/1.1'
|
@@ -37,7 +42,8 @@ describe LinkedIn::FaradayMiddleware::LinkedinErrorResponse, vcr: { cassette_nam
|
|
37
42
|
it 'includes the LinkedIn error code' do
|
38
43
|
pending 'These appear to be broken, so fuck \'em. http://developer.linkedin.com/forum/error-codes-are-not-set'
|
39
44
|
begin
|
40
|
-
|
45
|
+
subject.profile
|
46
|
+
raise 'Should have encountered an exception'
|
41
47
|
rescue LinkedIn::Error => err
|
42
48
|
pending 'we need to discuss camelCase vs snake_case. LinkedIn returns "errorCode"'
|
43
49
|
err.error_code.should eq
|
@@ -2,36 +2,69 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: post
|
5
|
-
uri: https://
|
5
|
+
uri: https://www.linkedin.com/uas/oauth2/accessToken?format=json
|
6
6
|
body:
|
7
|
-
encoding:
|
8
|
-
string:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: grant_type=authorization_code&code=AQRRBkP22yUFufYkxyFDgxg59jTJTMy4jCsp_2tz5W6CcEZ11gRysjPxbelKAXcXrcfDXKAyDZCctqzWsn-sYDB-galvVu192PkDGXI-lQh2-xq5AbM&client_id=f7cq90292zdf&client_secret=h97K0YuF0KCnx4kW&state=QrAOpIcMEEkqkFhPNPBpxBjoalApSrTdroLGGDWaCkqrdGKziH&redirect_uri=http%3A%2F%2Flocalhost.com
|
9
9
|
headers:
|
10
10
|
User-Agent:
|
11
|
-
-
|
12
|
-
|
13
|
-
-
|
14
|
-
oauth_nonce="ztYyddIoKJ8flDjBJyveOSqm96CLaEM4QpOC0CSW0E", oauth_signature="NSp3ZDtycelP7wsDM7dsuDTZGys%3D",
|
15
|
-
oauth_signature_method="HMAC-SHA1", oauth_timestamp="1297095033", oauth_token="2f5b42dd-1e0e-4f8f-a03c-1e510bde5935",
|
16
|
-
oauth_verifier="25038", oauth_version="1.0"
|
17
|
-
Content-Length:
|
18
|
-
- '0'
|
11
|
+
- Faraday v0.8.8
|
12
|
+
Content-Type:
|
13
|
+
- application/x-www-form-urlencoded
|
19
14
|
response:
|
20
15
|
status:
|
21
16
|
code: 200
|
22
|
-
message:
|
17
|
+
message:
|
23
18
|
headers:
|
24
|
-
|
25
|
-
- text/plain
|
26
|
-
Server:
|
19
|
+
server:
|
27
20
|
- Apache-Coyote/1.1
|
28
|
-
|
29
|
-
-
|
30
|
-
|
31
|
-
-
|
21
|
+
p3p:
|
22
|
+
- CP="CAO DSP COR CUR ADMi DEVi TAIi PSAi PSDi IVAi IVDi CONi OUR DELi SAMi
|
23
|
+
UNRi PUBi OTRi IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT POL PRE"
|
24
|
+
x-li-uuid:
|
25
|
+
- R9Fiq98P6oKapbEme8kcTw==
|
26
|
+
vary:
|
27
|
+
- Accept-Encoding
|
28
|
+
content-type:
|
29
|
+
- application/json;charset=UTF-8
|
30
|
+
content-language:
|
31
|
+
- en-US
|
32
|
+
content-length:
|
33
|
+
- '219'
|
34
|
+
date:
|
35
|
+
- Sun, 13 Oct 2013 19:58:00 GMT
|
36
|
+
x-li-fabric:
|
37
|
+
- PROD-ELA4
|
38
|
+
access-control-allow-origin:
|
39
|
+
- https://www.linkedin.com
|
40
|
+
set-cookie:
|
41
|
+
- _lipt=deleteMe; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/, leo_auth_token="GST:8zAnyikKuhU_QXD8caLFg5R6Shfg4nvQwTAFyUkoWhfoCnP0vYCB2T:1381694281:027f4c0540de42a5015b97b34d6fdb35a3f6cde1";
|
42
|
+
Version=1; Max-Age=1799; Expires=Sun, 13-Oct-2013 20:28:00 GMT; Path=/, sl="delete
|
43
|
+
me"; Version=1; Max-Age=0; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/,
|
44
|
+
sl="delete me"; Version=1; Domain=.www.linkedin.com; Max-Age=0; Expires=Thu,
|
45
|
+
01-Jan-1970 00:00:10 GMT; Path=/, s_leo_auth_token="delete me"; Version=1;
|
46
|
+
Max-Age=0; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/, JSESSIONID="ajax:7115608698667287816";
|
47
|
+
Version=1; Path=/, visit="v=1&G"; Version=1; Max-Age=63072000; Expires=Tue,
|
48
|
+
13-Oct-2015 19:58:01 GMT; Path=/, lang="v=2&lang=en-us"; Version=1; Domain=linkedin.com;
|
49
|
+
Path=/, bcookie="v=2&2ae0fd35-d407-46fe-8106-8f393d734de0"; domain=.linkedin.com;
|
50
|
+
Path=/; Expires=Wed, 14-Oct-2015 07:35:33 GMT, bscookie="v=1&20131013195801a1d173a8-de6e-4c88-8566-07e358e74e94AQGbJ5HTwrq6Oj8iv3TepmjPiLZ_KHDn";
|
51
|
+
domain=.www.linkedin.com; Path=/; Secure; Expires=Wed, 14-Oct-2015 07:35:33
|
52
|
+
GMT; HttpOnly, X-LI-IDC=C1
|
53
|
+
pragma:
|
54
|
+
- no-cache
|
55
|
+
expires:
|
56
|
+
- Thu, 01 Jan 1970 00:00:00 GMT
|
57
|
+
cache-control:
|
58
|
+
- no-cache, no-store
|
59
|
+
age:
|
60
|
+
- '1'
|
61
|
+
connection:
|
62
|
+
- keep-alive
|
63
|
+
x-li-pop:
|
64
|
+
- PROD-ELA4
|
32
65
|
body:
|
33
66
|
encoding: UTF-8
|
34
|
-
string:
|
35
|
-
http_version:
|
36
|
-
recorded_at:
|
67
|
+
string: '{"expires_in":5183999,"access_token":"AQUJwEF40pJUbVxsW_mujQ3QCiXvlTnMFk55SlfVPYRcAPdsn1oE1Hm8Ldlc61o57k96i04ufG81KFdPJIOSJswXsGyZ0tk9IMZea8sfNXMGMnZgikQJUQPkmRVYVw9BP1qH9tp7hJF32DQtzkBB_NE8xPASPVgXVWbbntChGyYqqDvF1p8"}'
|
68
|
+
http_version:
|
69
|
+
recorded_at: Sun, 13 Oct 2013 19:58:08 GMT
|
37
70
|
recorded_with: VCR 2.5.0
|
@@ -0,0 +1,258 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.linkedin.com/v1/companies/162479?oauth2_access_token=AQUJwEF40pJUbVxsW_mujQ3QCiXvlTnMFk55SlfVPYRcAPdsn1oE1Hm8Ldlc61o57k96i04ufG81KFdPJIOSJswXsGyZ0tk9IMZea8sfNXMGMnZgikQJUQPkmRVYVw9BP1qH9tp7hJF32DQtzkBB_NE8xPASPVgXVWbbntChGyYqqDvF1p8&format=json
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.8.8
|
12
|
+
response:
|
13
|
+
status:
|
14
|
+
code: 200
|
15
|
+
message:
|
16
|
+
headers:
|
17
|
+
server:
|
18
|
+
- Apache-Coyote/1.1
|
19
|
+
x-li-request-id:
|
20
|
+
- N1V0MZE9K9
|
21
|
+
vary:
|
22
|
+
- '*'
|
23
|
+
x-li-format:
|
24
|
+
- json
|
25
|
+
content-type:
|
26
|
+
- application/json;charset=UTF-8
|
27
|
+
date:
|
28
|
+
- Tue, 15 Oct 2013 03:40:31 GMT
|
29
|
+
x-li-fabric:
|
30
|
+
- PROD-ELA4
|
31
|
+
access-control-allow-origin:
|
32
|
+
- https://www.linkedin.com
|
33
|
+
age:
|
34
|
+
- '1'
|
35
|
+
transfer-encoding:
|
36
|
+
- chunked
|
37
|
+
connection:
|
38
|
+
- keep-alive
|
39
|
+
x-li-pop:
|
40
|
+
- PROD-ELA4
|
41
|
+
x-li-uuid:
|
42
|
+
- +NPyvHIrLRMQGxdMPysAAA==
|
43
|
+
body:
|
44
|
+
encoding: UTF-8
|
45
|
+
string: |-
|
46
|
+
{
|
47
|
+
"id": 162479,
|
48
|
+
"name": "Apple"
|
49
|
+
}
|
50
|
+
http_version:
|
51
|
+
recorded_at: Tue, 15 Oct 2013 03:40:32 GMT
|
52
|
+
- request:
|
53
|
+
method: get
|
54
|
+
uri: https://api.linkedin.com/v1/companies/universal-name=linkedin?oauth2_access_token=AQUJwEF40pJUbVxsW_mujQ3QCiXvlTnMFk55SlfVPYRcAPdsn1oE1Hm8Ldlc61o57k96i04ufG81KFdPJIOSJswXsGyZ0tk9IMZea8sfNXMGMnZgikQJUQPkmRVYVw9BP1qH9tp7hJF32DQtzkBB_NE8xPASPVgXVWbbntChGyYqqDvF1p8&format=json
|
55
|
+
body:
|
56
|
+
encoding: US-ASCII
|
57
|
+
string: ''
|
58
|
+
headers:
|
59
|
+
User-Agent:
|
60
|
+
- Faraday v0.8.8
|
61
|
+
response:
|
62
|
+
status:
|
63
|
+
code: 200
|
64
|
+
message:
|
65
|
+
headers:
|
66
|
+
server:
|
67
|
+
- Apache-Coyote/1.1
|
68
|
+
x-li-request-id:
|
69
|
+
- DESJS1FXJO
|
70
|
+
vary:
|
71
|
+
- '*'
|
72
|
+
x-li-format:
|
73
|
+
- json
|
74
|
+
content-type:
|
75
|
+
- application/json;charset=UTF-8
|
76
|
+
date:
|
77
|
+
- Tue, 15 Oct 2013 03:40:32 GMT
|
78
|
+
x-li-fabric:
|
79
|
+
- PROD-ELA4
|
80
|
+
access-control-allow-origin:
|
81
|
+
- https://www.linkedin.com
|
82
|
+
age:
|
83
|
+
- '0'
|
84
|
+
transfer-encoding:
|
85
|
+
- chunked
|
86
|
+
connection:
|
87
|
+
- keep-alive
|
88
|
+
x-li-pop:
|
89
|
+
- PROD-ELA4
|
90
|
+
x-li-uuid:
|
91
|
+
- SGFU2HIrLRMQ+MRPbCsAAA==
|
92
|
+
body:
|
93
|
+
encoding: UTF-8
|
94
|
+
string: |-
|
95
|
+
{
|
96
|
+
"id": 1337,
|
97
|
+
"name": "LinkedIn"
|
98
|
+
}
|
99
|
+
http_version:
|
100
|
+
recorded_at: Tue, 15 Oct 2013 03:40:33 GMT
|
101
|
+
- request:
|
102
|
+
method: get
|
103
|
+
uri: https://api.linkedin.com/v1/companies/?email-domain=apple.com&oauth2_access_token=AQUJwEF40pJUbVxsW_mujQ3QCiXvlTnMFk55SlfVPYRcAPdsn1oE1Hm8Ldlc61o57k96i04ufG81KFdPJIOSJswXsGyZ0tk9IMZea8sfNXMGMnZgikQJUQPkmRVYVw9BP1qH9tp7hJF32DQtzkBB_NE8xPASPVgXVWbbntChGyYqqDvF1p8&format=json
|
104
|
+
body:
|
105
|
+
encoding: US-ASCII
|
106
|
+
string: ''
|
107
|
+
headers:
|
108
|
+
User-Agent:
|
109
|
+
- Faraday v0.8.8
|
110
|
+
response:
|
111
|
+
status:
|
112
|
+
code: 200
|
113
|
+
message:
|
114
|
+
headers:
|
115
|
+
server:
|
116
|
+
- Apache-Coyote/1.1
|
117
|
+
x-li-request-id:
|
118
|
+
- UJJKFZAATN
|
119
|
+
vary:
|
120
|
+
- '*'
|
121
|
+
x-li-format:
|
122
|
+
- json
|
123
|
+
content-type:
|
124
|
+
- application/json;charset=UTF-8
|
125
|
+
date:
|
126
|
+
- Tue, 15 Oct 2013 03:40:33 GMT
|
127
|
+
x-li-fabric:
|
128
|
+
- PROD-ELA4
|
129
|
+
access-control-allow-origin:
|
130
|
+
- https://www.linkedin.com
|
131
|
+
age:
|
132
|
+
- '0'
|
133
|
+
transfer-encoding:
|
134
|
+
- chunked
|
135
|
+
connection:
|
136
|
+
- keep-alive
|
137
|
+
x-li-pop:
|
138
|
+
- PROD-ELA4
|
139
|
+
x-li-uuid:
|
140
|
+
- QEui83IrLRPQPik+aCsAAA==
|
141
|
+
body:
|
142
|
+
encoding: UTF-8
|
143
|
+
string: |-
|
144
|
+
{
|
145
|
+
"_total": 1,
|
146
|
+
"values": [{
|
147
|
+
"id": 162479,
|
148
|
+
"name": "Apple"
|
149
|
+
}]
|
150
|
+
}
|
151
|
+
http_version:
|
152
|
+
recorded_at: Tue, 15 Oct 2013 03:40:33 GMT
|
153
|
+
- request:
|
154
|
+
method: get
|
155
|
+
uri: https://api.linkedin.com/v1/companies::(162479,universal-name=linkedin)?oauth2_access_token=AQUJwEF40pJUbVxsW_mujQ3QCiXvlTnMFk55SlfVPYRcAPdsn1oE1Hm8Ldlc61o57k96i04ufG81KFdPJIOSJswXsGyZ0tk9IMZea8sfNXMGMnZgikQJUQPkmRVYVw9BP1qH9tp7hJF32DQtzkBB_NE8xPASPVgXVWbbntChGyYqqDvF1p8&format=json
|
156
|
+
body:
|
157
|
+
encoding: US-ASCII
|
158
|
+
string: ''
|
159
|
+
headers:
|
160
|
+
User-Agent:
|
161
|
+
- Faraday v0.8.8
|
162
|
+
response:
|
163
|
+
status:
|
164
|
+
code: 200
|
165
|
+
message:
|
166
|
+
headers:
|
167
|
+
server:
|
168
|
+
- Apache-Coyote/1.1
|
169
|
+
x-li-request-id:
|
170
|
+
- DWXJHGBALM
|
171
|
+
vary:
|
172
|
+
- '*'
|
173
|
+
x-li-format:
|
174
|
+
- json
|
175
|
+
content-type:
|
176
|
+
- application/json;charset=UTF-8
|
177
|
+
date:
|
178
|
+
- Tue, 15 Oct 2013 03:40:33 GMT
|
179
|
+
x-li-fabric:
|
180
|
+
- PROD-ELA4
|
181
|
+
access-control-allow-origin:
|
182
|
+
- https://www.linkedin.com
|
183
|
+
age:
|
184
|
+
- '0'
|
185
|
+
transfer-encoding:
|
186
|
+
- chunked
|
187
|
+
connection:
|
188
|
+
- keep-alive
|
189
|
+
x-li-pop:
|
190
|
+
- PROD-ELA4
|
191
|
+
x-li-uuid:
|
192
|
+
- IAccEHMrLROQZ6WF5SoAAA==
|
193
|
+
body:
|
194
|
+
encoding: UTF-8
|
195
|
+
string: |-
|
196
|
+
{
|
197
|
+
"_total": 2,
|
198
|
+
"values": [
|
199
|
+
{
|
200
|
+
"_key": "162479",
|
201
|
+
"id": 162479,
|
202
|
+
"name": "Apple"
|
203
|
+
},
|
204
|
+
{
|
205
|
+
"_key": "universal-name=linkedin",
|
206
|
+
"id": 1337,
|
207
|
+
"name": "LinkedIn"
|
208
|
+
}
|
209
|
+
]
|
210
|
+
}
|
211
|
+
http_version:
|
212
|
+
recorded_at: Tue, 15 Oct 2013 03:40:33 GMT
|
213
|
+
- request:
|
214
|
+
method: get
|
215
|
+
uri: https://api.linkedin.com/v1/companies/?is-company-admin=true&oauth2_access_token=AQUJwEF40pJUbVxsW_mujQ3QCiXvlTnMFk55SlfVPYRcAPdsn1oE1Hm8Ldlc61o57k96i04ufG81KFdPJIOSJswXsGyZ0tk9IMZea8sfNXMGMnZgikQJUQPkmRVYVw9BP1qH9tp7hJF32DQtzkBB_NE8xPASPVgXVWbbntChGyYqqDvF1p8&format=json
|
216
|
+
body:
|
217
|
+
encoding: US-ASCII
|
218
|
+
string: ''
|
219
|
+
headers:
|
220
|
+
User-Agent:
|
221
|
+
- Faraday v0.8.8
|
222
|
+
response:
|
223
|
+
status:
|
224
|
+
code: 200
|
225
|
+
message:
|
226
|
+
headers:
|
227
|
+
server:
|
228
|
+
- Apache-Coyote/1.1
|
229
|
+
x-li-request-id:
|
230
|
+
- 3ETOCDSKOJ
|
231
|
+
vary:
|
232
|
+
- '*'
|
233
|
+
x-li-format:
|
234
|
+
- json
|
235
|
+
content-type:
|
236
|
+
- application/json;charset=UTF-8
|
237
|
+
date:
|
238
|
+
- Tue, 15 Oct 2013 03:40:33 GMT
|
239
|
+
x-li-fabric:
|
240
|
+
- PROD-ELA4
|
241
|
+
access-control-allow-origin:
|
242
|
+
- https://www.linkedin.com
|
243
|
+
age:
|
244
|
+
- '1'
|
245
|
+
transfer-encoding:
|
246
|
+
- chunked
|
247
|
+
connection:
|
248
|
+
- keep-alive
|
249
|
+
x-li-pop:
|
250
|
+
- PROD-ELA4
|
251
|
+
x-li-uuid:
|
252
|
+
- SPkTK3MrLROwwBi8gSsAAA==
|
253
|
+
body:
|
254
|
+
encoding: UTF-8
|
255
|
+
string: '{"_total": 0}'
|
256
|
+
http_version:
|
257
|
+
recorded_at: Tue, 15 Oct 2013 03:40:34 GMT
|
258
|
+
recorded_with: VCR 2.5.0
|