linkedin 0.3.7 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +1 -1
- data/changelog.markdown +15 -0
- data/lib/linked_in/api/query_methods.rb +15 -0
- data/lib/linked_in/api/update_methods.rb +16 -4
- data/lib/linked_in/helpers/authorization.rb +4 -3
- data/lib/linked_in/version.rb +2 -2
- data/linkedin.gemspec +2 -2
- data/spec/cases/api_spec.rb +49 -4
- data/spec/cases/oauth_spec.rb +13 -0
- data/spec/cases/search_spec.rb +35 -37
- data/spec/fixtures/cassette_library/LinkedIn_Search/_search/by_company_name_option.yml +98 -124
- data/spec/fixtures/cassette_library/LinkedIn_Search/_search/by_first_name_and_last_name_options.yml +120 -111
- data/spec/fixtures/cassette_library/LinkedIn_Search/_search/by_first_name_and_last_name_options_with_fields.yml +137 -62
- data/spec/fixtures/cassette_library/LinkedIn_Search/_search/by_keywords_string_parameter.yml +64 -128
- data/spec/fixtures/cassette_library/LinkedIn_Search/_search/by_single_keywords_option.yml +64 -128
- data/spec/fixtures/cassette_library/LinkedIn_Search/_search/by_single_keywords_option_with_pagination.yml +39 -120
- data/spec/fixtures/cassette_library/LinkedIn_Search/_search_company/by_keywords_options_with_fields.yml +26 -243
- data/spec/fixtures/cassette_library/LinkedIn_Search/_search_company/by_keywords_string_parameter.yml +147 -64
- data/spec/fixtures/cassette_library/LinkedIn_Search/_search_company/by_single_keywords_option.yml +147 -62
- data/spec/fixtures/cassette_library/LinkedIn_Search/_search_company/by_single_keywords_option_with_facets_to_return.yml +147 -62
- data/spec/fixtures/cassette_library/LinkedIn_Search/_search_company/by_single_keywords_option_with_pagination.yml +127 -57
- metadata +81 -28
- data/spec/fixtures/cassette_library/LinkedIn_Search/_search_company/by_single_keywords_option_with_a_facet.yml +0 -111
data/spec/fixtures/cassette_library/LinkedIn_Search/_search/by_first_name_and_last_name_options.yml
CHANGED
@@ -1,122 +1,131 @@
|
|
1
|
-
---
|
2
|
-
- !ruby/struct:VCR::HTTPInteraction
|
3
|
-
request: !ruby/struct:VCR::Request
|
1
|
+
---
|
2
|
+
- !ruby/struct:VCR::HTTPInteraction
|
3
|
+
request: !ruby/struct:VCR::Request
|
4
4
|
method: :get
|
5
5
|
uri: https://api.linkedin.com:443/v1/people-search?first-name=Giliardi&last-name=Pires
|
6
6
|
body:
|
7
|
-
headers:
|
8
|
-
|
9
|
-
- OAuth gem v0.4.4
|
10
|
-
authorization:
|
11
|
-
- OAuth oauth_consumer_key="C2UfeHxZrij1PyppziDLbdUQti6f4TLaL-N0dyiV_us4Pj18_vsHcjKIX0i69fSn",
|
12
|
-
oauth_nonce="IVMcA0gCXgVmgwAn56FRIpQUdQmyFcoP2RRN6ZzPv4", oauth_signature="8aXd44yIB6fsVy%2BYZJNvR01yp2w%3D",
|
13
|
-
oauth_signature_method="HMAC-SHA1", oauth_timestamp="1305061364", oauth_token="afb39322-be32-4b83-83a0-7e35e18d3082",
|
14
|
-
oauth_version="1.0"
|
15
|
-
x-li-format:
|
7
|
+
headers:
|
8
|
+
x-li-format:
|
16
9
|
- json
|
17
|
-
|
18
|
-
|
10
|
+
user-agent:
|
11
|
+
- OAuth gem v0.4.7
|
12
|
+
authorization:
|
13
|
+
- OAuth oauth_consumer_key="mpibxdpwbwry", oauth_nonce="eq8g0jFLe2FsDxO255PW6UqoZ8lwJAqiIJCm3qEKF8", oauth_signature="D1xMNnx7aOxDotnPt1mtEdbJPlU%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1365631656", oauth_token="d9f69cd6-f3f3-4c26-9f2c-12cd8e228089", oauth_version="1.0"
|
14
|
+
response: !ruby/struct:VCR::Response
|
15
|
+
status: !ruby/struct:VCR::ResponseStatus
|
19
16
|
code: 200
|
20
17
|
message: OK
|
21
|
-
headers:
|
22
|
-
|
23
|
-
-
|
24
|
-
|
25
|
-
- Apache-Coyote/1.1
|
26
|
-
date:
|
27
|
-
- Tue, 10 May 2011 21:02:45 GMT
|
28
|
-
x-li-format:
|
29
|
-
- json
|
30
|
-
vary:
|
31
|
-
- x-li-format,Accept-Encoding
|
32
|
-
transfer-encoding:
|
18
|
+
headers:
|
19
|
+
vary:
|
20
|
+
- "*"
|
21
|
+
transfer-encoding:
|
33
22
|
- chunked
|
34
|
-
|
35
|
-
\"YkdnFl04s_\",\n \"lastName\": \"Pires\",\n \"firstName\": \"Giliardi\"\n
|
36
|
-
\ }],\n \"_total\": 1\n }\n}"
|
37
|
-
http_version: '1.1'
|
38
|
-
- !ruby/struct:VCR::HTTPInteraction
|
39
|
-
request: !ruby/struct:VCR::Request
|
40
|
-
method: :post
|
41
|
-
uri: https://api.linkedin.com:443/uas/oauth/requestToken
|
42
|
-
body:
|
43
|
-
headers:
|
44
|
-
user-agent:
|
45
|
-
- OAuth gem v0.4.5
|
46
|
-
content-length:
|
47
|
-
- '0'
|
48
|
-
authorization:
|
49
|
-
- OAuth oauth_body_hash="2jmj7l5rSw0yVb%2FvlWAYkK%2FYBwk%3D", oauth_callback="oob",
|
50
|
-
oauth_consumer_key="a39e395e-bc38-4d5b-ae3b-52f840f821e9", oauth_nonce="rXssYvyrlgkdK7ZpsjurbqOPKK3vQ0FUM9pRP37NMc",
|
51
|
-
oauth_signature="b%2B3nVjLTwMGwAANmULOD8YSdjZU%3D", oauth_signature_method="HMAC-SHA1",
|
52
|
-
oauth_timestamp="1329922226", oauth_version="1.0"
|
53
|
-
response: !ruby/struct:VCR::Response
|
54
|
-
status: !ruby/struct:VCR::ResponseStatus
|
55
|
-
code: 401
|
56
|
-
message: Unauthorized
|
57
|
-
headers:
|
58
|
-
server:
|
23
|
+
server:
|
59
24
|
- Apache-Coyote/1.1
|
60
|
-
|
61
|
-
-
|
62
|
-
|
63
|
-
-
|
64
|
-
|
65
|
-
-
|
66
|
-
|
67
|
-
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
25
|
+
x-li-format:
|
26
|
+
- json
|
27
|
+
x-li-request-id:
|
28
|
+
- CH30LTU9DW
|
29
|
+
date:
|
30
|
+
- Wed, 10 Apr 2013 22:07:36 GMT
|
31
|
+
content-type:
|
32
|
+
- application/json;charset=UTF-8
|
33
|
+
body: |-
|
34
|
+
{
|
35
|
+
"numResults": 0,
|
36
|
+
"people": {"_total": 0}
|
37
|
+
}
|
38
|
+
http_version: "1.1"
|
39
|
+
- !ruby/struct:VCR::HTTPInteraction
|
40
|
+
request: !ruby/struct:VCR::Request
|
74
41
|
method: :get
|
75
|
-
uri: https://api.linkedin.com:443/
|
42
|
+
uri: https://api.linkedin.com:443/v1/people-search?first-name=Charles&last-name=Garcia
|
76
43
|
body:
|
77
|
-
headers:
|
78
|
-
x-li-format:
|
44
|
+
headers:
|
45
|
+
x-li-format:
|
79
46
|
- json
|
80
|
-
user-agent:
|
81
|
-
- OAuth gem v0.4.
|
82
|
-
authorization:
|
83
|
-
- OAuth oauth_consumer_key="
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
-
|
96
|
-
|
97
|
-
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
charset=UTF-8
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
47
|
+
user-agent:
|
48
|
+
- OAuth gem v0.4.7
|
49
|
+
authorization:
|
50
|
+
- OAuth oauth_consumer_key="mpibxdpwbwry", oauth_nonce="lTIll68hM4A1tc0I56h92w5znsrjFfJ4nDvKpSqDfg", oauth_signature="AhGLaPTVAJvv8pncUjz2j8C6%2B%2FA%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1365632102", oauth_token="d9f69cd6-f3f3-4c26-9f2c-12cd8e228089", oauth_version="1.0"
|
51
|
+
response: !ruby/struct:VCR::Response
|
52
|
+
status: !ruby/struct:VCR::ResponseStatus
|
53
|
+
code: 200
|
54
|
+
message: OK
|
55
|
+
headers:
|
56
|
+
vary:
|
57
|
+
- "*"
|
58
|
+
transfer-encoding:
|
59
|
+
- chunked
|
60
|
+
server:
|
61
|
+
- Apache-Coyote/1.1
|
62
|
+
x-li-request-id:
|
63
|
+
- 6AXWFPE8I6
|
64
|
+
x-li-format:
|
65
|
+
- json
|
66
|
+
date:
|
67
|
+
- Wed, 10 Apr 2013 22:15:03 GMT
|
68
|
+
content-type:
|
69
|
+
- application/json;charset=UTF-8
|
70
|
+
body: |-
|
71
|
+
{
|
72
|
+
"numResults": 308,
|
73
|
+
"people": {
|
74
|
+
"_count": 10,
|
75
|
+
"_start": 0,
|
76
|
+
"_total": 110,
|
77
|
+
"values": [
|
78
|
+
{
|
79
|
+
"firstName": "Charles",
|
80
|
+
"id": "2zk34r8TvA",
|
81
|
+
"lastName": "Garcia, CFA"
|
82
|
+
},
|
83
|
+
{
|
84
|
+
"firstName": "Charles R.",
|
85
|
+
"id": "NjwO1vU6P6",
|
86
|
+
"lastName": "Garcia Jr."
|
87
|
+
},
|
88
|
+
{
|
89
|
+
"firstName": "Charles",
|
90
|
+
"id": "j8ZczJo44W",
|
91
|
+
"lastName": "Garcia-Tobin"
|
92
|
+
},
|
93
|
+
{
|
94
|
+
"firstName": "Charles",
|
95
|
+
"id": "jYfrk5GM29",
|
96
|
+
"lastName": "Garcia"
|
97
|
+
},
|
98
|
+
{
|
99
|
+
"firstName": "Charles",
|
100
|
+
"id": "C-2ASm3SQ1",
|
101
|
+
"lastName": "Garcia"
|
102
|
+
},
|
103
|
+
{
|
104
|
+
"firstName": "Charles",
|
105
|
+
"id": "LG__MFCUTJ",
|
106
|
+
"lastName": "Garcia"
|
107
|
+
},
|
108
|
+
{
|
109
|
+
"firstName": "Charles",
|
110
|
+
"id": "wjopxKqYYM",
|
111
|
+
"lastName": "Garcia"
|
112
|
+
},
|
113
|
+
{
|
114
|
+
"firstName": "Charles",
|
115
|
+
"id": "AtFQt5Lf1V",
|
116
|
+
"lastName": "Garcia"
|
117
|
+
},
|
118
|
+
{
|
119
|
+
"firstName": "Charles",
|
120
|
+
"id": "MUXIZwfehE",
|
121
|
+
"lastName": "Garcia"
|
122
|
+
},
|
123
|
+
{
|
124
|
+
"firstName": "Charles",
|
125
|
+
"id": "koTmAyWE8J",
|
126
|
+
"lastName": "Schwalbe Garcia-Lago"
|
127
|
+
}
|
128
|
+
]
|
129
|
+
}
|
130
|
+
}
|
131
|
+
http_version: "1.1"
|
@@ -1,72 +1,147 @@
|
|
1
|
-
---
|
2
|
-
- !ruby/struct:VCR::HTTPInteraction
|
3
|
-
request: !ruby/struct:VCR::Request
|
1
|
+
---
|
2
|
+
- !ruby/struct:VCR::HTTPInteraction
|
3
|
+
request: !ruby/struct:VCR::Request
|
4
4
|
method: :get
|
5
5
|
uri: https://api.linkedin.com:443/v1/people-search:(people:(id,first-name,last-name,public-profile-url,picture-url),num-results)?first-name=Giliardi&last-name=Pires
|
6
6
|
body:
|
7
|
-
headers:
|
8
|
-
user-agent:
|
9
|
-
- OAuth gem v0.4.
|
10
|
-
authorization:
|
11
|
-
- OAuth oauth_consumer_key="
|
12
|
-
|
13
|
-
oauth_signature_method="HMAC-SHA1", oauth_timestamp="1305061366", oauth_token="afb39322-be32-4b83-83a0-7e35e18d3082",
|
14
|
-
oauth_version="1.0"
|
15
|
-
x-li-format:
|
7
|
+
headers:
|
8
|
+
user-agent:
|
9
|
+
- OAuth gem v0.4.7
|
10
|
+
authorization:
|
11
|
+
- OAuth oauth_consumer_key="mpibxdpwbwry", oauth_nonce="XxYZ3yqoTFr792YTu6TmJPFCrrkZejwXkORldtyZGI", oauth_signature="cBkWRwhVxBDozgn5sCXBwGIoer4%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1365631657", oauth_token="d9f69cd6-f3f3-4c26-9f2c-12cd8e228089", oauth_version="1.0"
|
12
|
+
x-li-format:
|
16
13
|
- json
|
17
|
-
response: !ruby/struct:VCR::Response
|
18
|
-
status: !ruby/struct:VCR::ResponseStatus
|
14
|
+
response: !ruby/struct:VCR::Response
|
15
|
+
status: !ruby/struct:VCR::ResponseStatus
|
19
16
|
code: 200
|
20
17
|
message: OK
|
21
|
-
headers:
|
22
|
-
|
23
|
-
- application/json;charset=UTF-8
|
24
|
-
server:
|
18
|
+
headers:
|
19
|
+
server:
|
25
20
|
- Apache-Coyote/1.1
|
26
|
-
|
27
|
-
- Tue, 10 May 2011 21:02:47 GMT
|
28
|
-
x-li-format:
|
29
|
-
- json
|
30
|
-
vary:
|
31
|
-
- x-li-format,Accept-Encoding
|
32
|
-
transfer-encoding:
|
21
|
+
transfer-encoding:
|
33
22
|
- chunked
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
-
|
40
|
-
|
41
|
-
|
42
|
-
|
23
|
+
vary:
|
24
|
+
- "*"
|
25
|
+
content-type:
|
26
|
+
- application/json;charset=UTF-8
|
27
|
+
x-li-request-id:
|
28
|
+
- G0J3Z1XF1E
|
29
|
+
date:
|
30
|
+
- Wed, 10 Apr 2013 22:07:36 GMT
|
31
|
+
x-li-format:
|
32
|
+
- json
|
33
|
+
body: |-
|
34
|
+
{
|
35
|
+
"numResults": 0,
|
36
|
+
"people": {"_total": 0}
|
37
|
+
}
|
38
|
+
http_version: "1.1"
|
39
|
+
- !ruby/struct:VCR::HTTPInteraction
|
40
|
+
request: !ruby/struct:VCR::Request
|
41
|
+
method: :get
|
42
|
+
uri: https://api.linkedin.com:443/v1/people-search:(people:(id,first-name,last-name,public-profile-url,picture-url),num-results)?first-name=Charles&last-name=Garcia
|
43
43
|
body:
|
44
|
-
headers:
|
45
|
-
user-agent:
|
46
|
-
- OAuth gem v0.4.
|
47
|
-
|
48
|
-
-
|
49
|
-
|
50
|
-
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
message: Unauthorized
|
58
|
-
headers:
|
59
|
-
server:
|
44
|
+
headers:
|
45
|
+
user-agent:
|
46
|
+
- OAuth gem v0.4.7
|
47
|
+
authorization:
|
48
|
+
- OAuth oauth_consumer_key="mpibxdpwbwry", oauth_nonce="apcqck1ATxZYGou1ynnfBm6OgZFBz4TXKeuPo160NU", oauth_signature="zB0MtadBiOOL2rAX%2FdHn71fZyOA%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1365631934", oauth_token="d9f69cd6-f3f3-4c26-9f2c-12cd8e228089", oauth_version="1.0"
|
49
|
+
x-li-format:
|
50
|
+
- json
|
51
|
+
response: !ruby/struct:VCR::Response
|
52
|
+
status: !ruby/struct:VCR::ResponseStatus
|
53
|
+
code: 200
|
54
|
+
message: OK
|
55
|
+
headers:
|
56
|
+
server:
|
60
57
|
- Apache-Coyote/1.1
|
61
|
-
|
62
|
-
-
|
63
|
-
|
64
|
-
-
|
65
|
-
content-
|
66
|
-
-
|
67
|
-
|
68
|
-
-
|
69
|
-
date:
|
70
|
-
- Wed,
|
71
|
-
|
72
|
-
|
58
|
+
transfer-encoding:
|
59
|
+
- chunked
|
60
|
+
vary:
|
61
|
+
- "*"
|
62
|
+
content-type:
|
63
|
+
- application/json;charset=UTF-8
|
64
|
+
x-li-request-id:
|
65
|
+
- 7A7TZHN5V9
|
66
|
+
date:
|
67
|
+
- Wed, 10 Apr 2013 22:12:14 GMT
|
68
|
+
x-li-format:
|
69
|
+
- json
|
70
|
+
body: |-
|
71
|
+
{
|
72
|
+
"numResults": 308,
|
73
|
+
"people": {
|
74
|
+
"_count": 10,
|
75
|
+
"_start": 0,
|
76
|
+
"_total": 110,
|
77
|
+
"values": [
|
78
|
+
{
|
79
|
+
"firstName": "Charles",
|
80
|
+
"id": "2zk34r8TvA",
|
81
|
+
"lastName": "Garcia, CFA",
|
82
|
+
"publicProfileUrl": "http://www.linkedin.com/in/charlesgarcia"
|
83
|
+
},
|
84
|
+
{
|
85
|
+
"firstName": "Charles R.",
|
86
|
+
"id": "NjwO1vU6P6",
|
87
|
+
"lastName": "Garcia Jr.",
|
88
|
+
"pictureUrl": "http://m3.licdn.com/mpr/mprx/0_eyd5KukV6r4QDft-oYwsKfzsXqyWSdi-oUjVKaLVRAeMtSqtXsJWOmlqospnaaGOWxIUxWUUfdKb",
|
89
|
+
"publicProfileUrl": "http://www.linkedin.com/in/knightwealthmanagement"
|
90
|
+
},
|
91
|
+
{
|
92
|
+
"firstName": "Charles",
|
93
|
+
"id": "j8ZczJo44W",
|
94
|
+
"lastName": "Garcia-Tobin",
|
95
|
+
"publicProfileUrl": "http://www.linkedin.com/pub/charles-garcia-tobin/1/407/37"
|
96
|
+
},
|
97
|
+
{
|
98
|
+
"firstName": "Charles",
|
99
|
+
"id": "jYfrk5GM29",
|
100
|
+
"lastName": "Garcia",
|
101
|
+
"pictureUrl": "http://m3.licdn.com/mpr/mprx/0_oCf8Sdu0zOpQN_tEeLaPSwVjvZHIq5CEH6R0SEw2EOpRI3voQk0uio0GUveqBC_QITDYCDz2KP6m",
|
102
|
+
"publicProfileUrl": "http://www.linkedin.com/in/charleshgarcia"
|
103
|
+
},
|
104
|
+
{
|
105
|
+
"firstName": "Charles",
|
106
|
+
"id": "C-2ASm3SQ1",
|
107
|
+
"lastName": "Garcia",
|
108
|
+
"pictureUrl": "http://m3.licdn.com/mpr/mprx/0_eyd5KuNsktdHTE1-6RasKacFXqyWSdi-oUjVKaLVRAeMtSqtXsJWOmlqospnaaGOWxIUxWRzo_ib",
|
109
|
+
"publicProfileUrl": "http://www.linkedin.com/pub/charles-garcia/26/1b2/b28"
|
110
|
+
},
|
111
|
+
{
|
112
|
+
"firstName": "Charles",
|
113
|
+
"id": "LG__MFCUTJ",
|
114
|
+
"lastName": "Garcia",
|
115
|
+
"publicProfileUrl": "http://www.linkedin.com/pub/charles-garcia/5/465/b00"
|
116
|
+
},
|
117
|
+
{
|
118
|
+
"firstName": "Charles",
|
119
|
+
"id": "wjopxKqYYM",
|
120
|
+
"lastName": "Garcia",
|
121
|
+
"pictureUrl": "http://m3.licdn.com/mpr/mprx/0_ePvupanfrtgopBCiEBzPpuFir-Zdp-tioNT1pSkPfNuJin5_Xv58tDrgO049xzPfWKBt1o9wYUsb",
|
122
|
+
"publicProfileUrl": "http://www.linkedin.com/pub/charles-garcia/8/152/3ab"
|
123
|
+
},
|
124
|
+
{
|
125
|
+
"firstName": "Charles",
|
126
|
+
"id": "AtFQt5Lf1V",
|
127
|
+
"lastName": "Garcia",
|
128
|
+
"pictureUrl": "http://m3.licdn.com/mpr/mprx/0_uuv-7sRI0s_EdtBWuecS7Jf9jM5owt6WaSTS7Jd9GylVN9AdhE5O3Mg41cLzHvF5S7B28YBarPYq",
|
129
|
+
"publicProfileUrl": "http://www.linkedin.com/in/chasgarcia"
|
130
|
+
},
|
131
|
+
{
|
132
|
+
"firstName": "Charles",
|
133
|
+
"id": "MUXIZwfehE",
|
134
|
+
"lastName": "Garcia",
|
135
|
+
"publicProfileUrl": "http://www.linkedin.com/pub/charles-garcia/14/6a7/81"
|
136
|
+
},
|
137
|
+
{
|
138
|
+
"firstName": "Charles",
|
139
|
+
"id": "koTmAyWE8J",
|
140
|
+
"lastName": "Schwalbe Garcia-Lago",
|
141
|
+
"pictureUrl": "http://m3.licdn.com/mpr/mprx/0_q6hJ9GyYDCe0NRJ1sGCQ9TSySTY-nZZ1nFqQ9TyatkEGWp7PZhrzZ3Hh_fODzxM0zLGFJ6CC9gBb",
|
142
|
+
"publicProfileUrl": "http://www.linkedin.com/in/charlesschwalbe"
|
143
|
+
}
|
144
|
+
]
|
145
|
+
}
|
146
|
+
}
|
147
|
+
http_version: "1.1"
|