linkedin2 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/example-linkedin.yml +4 -0
- data/lib/linkedin/api.rb +11 -0
- data/lib/linkedin/api/authentication.rb +1 -3
- data/lib/linkedin/api/companies.rb +14 -0
- data/lib/linkedin/api/groups.rb +6 -0
- data/lib/linkedin/api/industries.rb +173 -0
- data/lib/linkedin/api/jobs.rb +6 -0
- data/lib/linkedin/api/permissions.rb +43 -0
- data/lib/linkedin/api/profiles.rb +23 -0
- data/lib/linkedin/base.rb +28 -0
- data/lib/linkedin/client.rb +67 -9
- data/lib/linkedin/company.rb +20 -0
- data/lib/linkedin/configuration.rb +14 -28
- data/lib/linkedin/error.rb +21 -1
- data/lib/linkedin/faraday_middleware.rb +10 -0
- data/lib/linkedin/faraday_middleware/linkedin_error_response.rb +28 -0
- data/lib/linkedin/faraday_middleware/linkedin_format_request.rb +27 -0
- data/lib/linkedin/industry.rb +23 -0
- data/lib/linkedin/profile.rb +20 -0
- data/lib/linkedin/version.rb +1 -1
- data/lib/linkedin2.rb +52 -3
- data/linkedin.gemspec +5 -0
- data/spec/api/companies_spec.rb +37 -0
- data/spec/api/groups_spec.rb +22 -0
- data/spec/api/jobs_spec.rb +31 -0
- data/spec/api/profiles_spec.rb +109 -0
- data/spec/faraday_middleware/linkedin_error_response_spec.rb +47 -0
- data/spec/fixtures/requests/access_token.yml +37 -0
- data/spec/fixtures/requests/company-search/by_keywords_options_with_fields.yml +232 -0
- data/spec/fixtures/requests/company-search/by_keywords_string_parameter.yml +80 -0
- data/spec/fixtures/requests/company-search/by_single_keywords_option.yml +80 -0
- data/spec/fixtures/requests/company-search/by_single_keywords_option_with_facets_to_return.yml +80 -0
- data/spec/fixtures/requests/company-search/by_single_keywords_option_with_pagination.yml +74 -0
- data/spec/fixtures/requests/company.yml +81 -0
- data/spec/fixtures/requests/invalid.yml +53 -0
- data/spec/fixtures/requests/people-search/by_company_name_option.yml +93 -0
- data/spec/fixtures/requests/people-search/by_first_name_and_last_name_options.yml +100 -0
- data/spec/fixtures/requests/people-search/by_first_name_and_last_name_options_with_fields.yml +112 -0
- data/spec/fixtures/requests/people-search/by_keywords_string_parameter.yml +53 -0
- data/spec/fixtures/requests/people-search/by_single_keywords_option.yml +53 -0
- data/spec/fixtures/requests/people-search/by_single_keywords_option_with_pagination.yml +45 -0
- data/spec/fixtures/requests/request_token/request_token.yml +37 -0
- data/spec/fixtures/requests/request_token/with_callback.yml +37 -0
- data/spec/spec_helper.rb +17 -0
- metadata +132 -3
@@ -0,0 +1,112 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.linkedin.com/v1/people-search:(people:(id,first-name,last-name,public-profile-url,picture-url),num-results)?first-name=Giliardi&last-name=Pires
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- OAuth gem v0.4.7
|
12
|
+
Authorization:
|
13
|
+
- OAuth oauth_consumer_key="mpibxdpwbwry", oauth_nonce="XxYZ3yqoTFr792YTu6TmJPFCrrkZejwXkORldtyZGI",
|
14
|
+
oauth_signature="cBkWRwhVxBDozgn5sCXBwGIoer4%3D", oauth_signature_method="HMAC-SHA1",
|
15
|
+
oauth_timestamp="1365631657", oauth_token="d9f69cd6-f3f3-4c26-9f2c-12cd8e228089",
|
16
|
+
oauth_version="1.0"
|
17
|
+
X-Li-Format:
|
18
|
+
- json
|
19
|
+
response:
|
20
|
+
status:
|
21
|
+
code: 200
|
22
|
+
message: OK
|
23
|
+
headers:
|
24
|
+
Server:
|
25
|
+
- Apache-Coyote/1.1
|
26
|
+
Transfer-Encoding:
|
27
|
+
- chunked
|
28
|
+
Vary:
|
29
|
+
- ! '*'
|
30
|
+
Content-Type:
|
31
|
+
- application/json;charset=UTF-8
|
32
|
+
X-Li-Request-Id:
|
33
|
+
- G0J3Z1XF1E
|
34
|
+
Date:
|
35
|
+
- Wed, 10 Apr 2013 22:07:36 GMT
|
36
|
+
X-Li-Format:
|
37
|
+
- json
|
38
|
+
body:
|
39
|
+
encoding: UTF-8
|
40
|
+
string: ! "{\n \"numResults\": 0,\n \"people\": {\"_total\": 0}\n}"
|
41
|
+
http_version: '1.1'
|
42
|
+
recorded_at: Tue, 04 Jun 2013 03:42:37 GMT
|
43
|
+
- request:
|
44
|
+
method: get
|
45
|
+
uri: https://api.linkedin.com/v1/people-search:(people:(id,first-name,last-name,public-profile-url,picture-url),num-results)?first-name=Charles&last-name=Garcia
|
46
|
+
body:
|
47
|
+
encoding: US-ASCII
|
48
|
+
string: ''
|
49
|
+
headers:
|
50
|
+
User-Agent:
|
51
|
+
- OAuth gem v0.4.7
|
52
|
+
Authorization:
|
53
|
+
- OAuth oauth_consumer_key="mpibxdpwbwry", oauth_nonce="apcqck1ATxZYGou1ynnfBm6OgZFBz4TXKeuPo160NU",
|
54
|
+
oauth_signature="zB0MtadBiOOL2rAX%2FdHn71fZyOA%3D", oauth_signature_method="HMAC-SHA1",
|
55
|
+
oauth_timestamp="1365631934", oauth_token="d9f69cd6-f3f3-4c26-9f2c-12cd8e228089",
|
56
|
+
oauth_version="1.0"
|
57
|
+
X-Li-Format:
|
58
|
+
- json
|
59
|
+
response:
|
60
|
+
status:
|
61
|
+
code: 200
|
62
|
+
message: OK
|
63
|
+
headers:
|
64
|
+
Server:
|
65
|
+
- Apache-Coyote/1.1
|
66
|
+
Transfer-Encoding:
|
67
|
+
- chunked
|
68
|
+
Vary:
|
69
|
+
- ! '*'
|
70
|
+
Content-Type:
|
71
|
+
- application/json;charset=UTF-8
|
72
|
+
X-Li-Request-Id:
|
73
|
+
- 7A7TZHN5V9
|
74
|
+
Date:
|
75
|
+
- Wed, 10 Apr 2013 22:12:14 GMT
|
76
|
+
X-Li-Format:
|
77
|
+
- json
|
78
|
+
body:
|
79
|
+
encoding: UTF-8
|
80
|
+
string: ! "{\n \"numResults\": 308,\n \"people\": {\n \"_count\": 10,\n
|
81
|
+
\ \"_start\": 0,\n \"_total\": 110,\n \"values\": [\n {\n \"firstName\":
|
82
|
+
\"Charles\",\n \"id\": \"2zk34r8TvA\",\n \"lastName\": \"Garcia,
|
83
|
+
CFA\",\n \"publicProfileUrl\": \"http://www.linkedin.com/in/charlesgarcia\"\n
|
84
|
+
\ },\n {\n \"firstName\": \"Charles R.\",\n \"id\":
|
85
|
+
\"NjwO1vU6P6\",\n \"lastName\": \"Garcia Jr.\",\n \"pictureUrl\":
|
86
|
+
\"http://m3.licdn.com/mpr/mprx/0_eyd5KukV6r4QDft-oYwsKfzsXqyWSdi-oUjVKaLVRAeMtSqtXsJWOmlqospnaaGOWxIUxWUUfdKb\",\n
|
87
|
+
\ \"publicProfileUrl\": \"http://www.linkedin.com/in/knightwealthmanagement\"\n
|
88
|
+
\ },\n {\n \"firstName\": \"Charles\",\n \"id\": \"j8ZczJo44W\",\n
|
89
|
+
\ \"lastName\": \"Garcia-Tobin\",\n \"publicProfileUrl\": \"http://www.linkedin.com/pub/charles-garcia-tobin/1/407/37\"\n
|
90
|
+
\ },\n {\n \"firstName\": \"Charles\",\n \"id\": \"jYfrk5GM29\",\n
|
91
|
+
\ \"lastName\": \"Garcia\",\n \"pictureUrl\": \"http://m3.licdn.com/mpr/mprx/0_oCf8Sdu0zOpQN_tEeLaPSwVjvZHIq5CEH6R0SEw2EOpRI3voQk0uio0GUveqBC_QITDYCDz2KP6m\",\n
|
92
|
+
\ \"publicProfileUrl\": \"http://www.linkedin.com/in/charleshgarcia\"\n
|
93
|
+
\ },\n {\n \"firstName\": \"Charles\",\n \"id\": \"C-2ASm3SQ1\",\n
|
94
|
+
\ \"lastName\": \"Garcia\",\n \"pictureUrl\": \"http://m3.licdn.com/mpr/mprx/0_eyd5KuNsktdHTE1-6RasKacFXqyWSdi-oUjVKaLVRAeMtSqtXsJWOmlqospnaaGOWxIUxWRzo_ib\",\n
|
95
|
+
\ \"publicProfileUrl\": \"http://www.linkedin.com/pub/charles-garcia/26/1b2/b28\"\n
|
96
|
+
\ },\n {\n \"firstName\": \"Charles\",\n \"id\": \"LG__MFCUTJ\",\n
|
97
|
+
\ \"lastName\": \"Garcia\",\n \"publicProfileUrl\": \"http://www.linkedin.com/pub/charles-garcia/5/465/b00\"\n
|
98
|
+
\ },\n {\n \"firstName\": \"Charles\",\n \"id\": \"wjopxKqYYM\",\n
|
99
|
+
\ \"lastName\": \"Garcia\",\n \"pictureUrl\": \"http://m3.licdn.com/mpr/mprx/0_ePvupanfrtgopBCiEBzPpuFir-Zdp-tioNT1pSkPfNuJin5_Xv58tDrgO049xzPfWKBt1o9wYUsb\",\n
|
100
|
+
\ \"publicProfileUrl\": \"http://www.linkedin.com/pub/charles-garcia/8/152/3ab\"\n
|
101
|
+
\ },\n {\n \"firstName\": \"Charles\",\n \"id\": \"AtFQt5Lf1V\",\n
|
102
|
+
\ \"lastName\": \"Garcia\",\n \"pictureUrl\": \"http://m3.licdn.com/mpr/mprx/0_uuv-7sRI0s_EdtBWuecS7Jf9jM5owt6WaSTS7Jd9GylVN9AdhE5O3Mg41cLzHvF5S7B28YBarPYq\",\n
|
103
|
+
\ \"publicProfileUrl\": \"http://www.linkedin.com/in/chasgarcia\"\n
|
104
|
+
\ },\n {\n \"firstName\": \"Charles\",\n \"id\": \"MUXIZwfehE\",\n
|
105
|
+
\ \"lastName\": \"Garcia\",\n \"publicProfileUrl\": \"http://www.linkedin.com/pub/charles-garcia/14/6a7/81\"\n
|
106
|
+
\ },\n {\n \"firstName\": \"Charles\",\n \"id\": \"koTmAyWE8J\",\n
|
107
|
+
\ \"lastName\": \"Schwalbe Garcia-Lago\",\n \"pictureUrl\": \"http://m3.licdn.com/mpr/mprx/0_q6hJ9GyYDCe0NRJ1sGCQ9TSySTY-nZZ1nFqQ9TyatkEGWp7PZhrzZ3Hh_fODzxM0zLGFJ6CC9gBb\",\n
|
108
|
+
\ \"publicProfileUrl\": \"http://www.linkedin.com/in/charlesschwalbe\"\n
|
109
|
+
\ }\n ]\n }\n}"
|
110
|
+
http_version: '1.1'
|
111
|
+
recorded_at: Tue, 04 Jun 2013 03:42:37 GMT
|
112
|
+
recorded_with: VCR 2.5.0
|
@@ -0,0 +1,53 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.linkedin.com/v1/people-search?keywords=github
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
X-Li-Format:
|
11
|
+
- json
|
12
|
+
Authorization:
|
13
|
+
- OAuth oauth_consumer_key="mpibxdpwbwry", oauth_nonce="KJPWM7qluIAetEW5kk8NSQuB3ssr1S2v6HBpofhFY",
|
14
|
+
oauth_signature="LEh2O3mlLU6GqhsuU4admW%2B1hDw%3D", oauth_signature_method="HMAC-SHA1",
|
15
|
+
oauth_timestamp="1365631655", oauth_token="d9f69cd6-f3f3-4c26-9f2c-12cd8e228089",
|
16
|
+
oauth_version="1.0"
|
17
|
+
User-Agent:
|
18
|
+
- OAuth gem v0.4.7
|
19
|
+
response:
|
20
|
+
status:
|
21
|
+
code: 200
|
22
|
+
message: OK
|
23
|
+
headers:
|
24
|
+
X-Li-Request-Id:
|
25
|
+
- L4BQ08FWG8
|
26
|
+
X-Li-Format:
|
27
|
+
- json
|
28
|
+
Date:
|
29
|
+
- Wed, 10 Apr 2013 22:07:35 GMT
|
30
|
+
Vary:
|
31
|
+
- ! '*'
|
32
|
+
Server:
|
33
|
+
- Apache-Coyote/1.1
|
34
|
+
Content-Type:
|
35
|
+
- application/json;charset=UTF-8
|
36
|
+
Transfer-Encoding:
|
37
|
+
- chunked
|
38
|
+
body:
|
39
|
+
encoding: UTF-8
|
40
|
+
string: ! "{\n \"numResults\": 6,\n \"people\": {\n \"_total\": 6,\n \"values\":
|
41
|
+
[\n {\n \"firstName\": \"Shay\",\n \"id\": \"ucXjUw4M9J\",\n
|
42
|
+
\ \"lastName\": \"Frendt\"\n },\n {\n \"firstName\":
|
43
|
+
\"Scott\",\n \"id\": \"t6mvVsY3df\",\n \"lastName\": \"Smith\"\n
|
44
|
+
\ },\n {\n \"firstName\": \"Philip\",\n \"id\": \"ZeSnXwtz6Y\",\n
|
45
|
+
\ \"lastName\": \"Corliss\"\n },\n {\n \"firstName\":
|
46
|
+
\"Jay\",\n \"id\": \"i24wDA2GrH\",\n \"lastName\": \"Beavers\"\n
|
47
|
+
\ },\n {\n \"firstName\": \"Chris\",\n \"id\": \"SJBelisgHh\",\n
|
48
|
+
\ \"lastName\": \"Wiswell\"\n },\n {\n \"firstName\":
|
49
|
+
\"Satish\",\n \"id\": \"V1FPuGot-I\",\n \"lastName\": \"Talim\"\n
|
50
|
+
\ }\n ]\n }\n}"
|
51
|
+
http_version: '1.1'
|
52
|
+
recorded_at: Tue, 04 Jun 2013 03:42:37 GMT
|
53
|
+
recorded_with: VCR 2.5.0
|
@@ -0,0 +1,53 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.linkedin.com/v1/people-search?keywords=github
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
X-Li-Format:
|
11
|
+
- json
|
12
|
+
Authorization:
|
13
|
+
- OAuth oauth_consumer_key="mpibxdpwbwry", oauth_nonce="DlBgAEJHkDYAnMMZwzFObsUNcCmRbzFldB4dV1yeE",
|
14
|
+
oauth_signature="RLiPr%2FC1bq9Dv29W3mjezy1of54%3D", oauth_signature_method="HMAC-SHA1",
|
15
|
+
oauth_timestamp="1365631655", oauth_token="d9f69cd6-f3f3-4c26-9f2c-12cd8e228089",
|
16
|
+
oauth_version="1.0"
|
17
|
+
User-Agent:
|
18
|
+
- OAuth gem v0.4.7
|
19
|
+
response:
|
20
|
+
status:
|
21
|
+
code: 200
|
22
|
+
message: OK
|
23
|
+
headers:
|
24
|
+
X-Li-Request-Id:
|
25
|
+
- 5BE8O0G2CK
|
26
|
+
X-Li-Format:
|
27
|
+
- json
|
28
|
+
Date:
|
29
|
+
- Wed, 10 Apr 2013 22:07:35 GMT
|
30
|
+
Vary:
|
31
|
+
- ! '*'
|
32
|
+
Server:
|
33
|
+
- Apache-Coyote/1.1
|
34
|
+
Content-Type:
|
35
|
+
- application/json;charset=UTF-8
|
36
|
+
Transfer-Encoding:
|
37
|
+
- chunked
|
38
|
+
body:
|
39
|
+
encoding: UTF-8
|
40
|
+
string: ! "{\n \"numResults\": 6,\n \"people\": {\n \"_total\": 6,\n \"values\":
|
41
|
+
[\n {\n \"firstName\": \"Shay\",\n \"id\": \"ucXjUw4M9J\",\n
|
42
|
+
\ \"lastName\": \"Frendt\"\n },\n {\n \"firstName\":
|
43
|
+
\"Scott\",\n \"id\": \"t6mvVsY3df\",\n \"lastName\": \"Smith\"\n
|
44
|
+
\ },\n {\n \"firstName\": \"Philip\",\n \"id\": \"ZeSnXwtz6Y\",\n
|
45
|
+
\ \"lastName\": \"Corliss\"\n },\n {\n \"firstName\":
|
46
|
+
\"Jay\",\n \"id\": \"i24wDA2GrH\",\n \"lastName\": \"Beavers\"\n
|
47
|
+
\ },\n {\n \"firstName\": \"Chris\",\n \"id\": \"SJBelisgHh\",\n
|
48
|
+
\ \"lastName\": \"Wiswell\"\n },\n {\n \"firstName\":
|
49
|
+
\"Satish\",\n \"id\": \"V1FPuGot-I\",\n \"lastName\": \"Talim\"\n
|
50
|
+
\ }\n ]\n }\n}"
|
51
|
+
http_version: '1.1'
|
52
|
+
recorded_at: Tue, 04 Jun 2013 03:42:37 GMT
|
53
|
+
recorded_with: VCR 2.5.0
|
@@ -0,0 +1,45 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.linkedin.com/v1/people-search?count=5&keywords=github&start=5
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
X-Li-Format:
|
11
|
+
- json
|
12
|
+
Authorization:
|
13
|
+
- OAuth oauth_consumer_key="mpibxdpwbwry", oauth_nonce="PfrLyLbcfxXAJshwSsQ4YDPBk1OncuNV0RjgB4fbVEs",
|
14
|
+
oauth_signature="16fUd%2BHUkWJULyxMCEbISV0Ltks%3D", oauth_signature_method="HMAC-SHA1",
|
15
|
+
oauth_timestamp="1365631656", oauth_token="d9f69cd6-f3f3-4c26-9f2c-12cd8e228089",
|
16
|
+
oauth_version="1.0"
|
17
|
+
User-Agent:
|
18
|
+
- OAuth gem v0.4.7
|
19
|
+
response:
|
20
|
+
status:
|
21
|
+
code: 200
|
22
|
+
message: OK
|
23
|
+
headers:
|
24
|
+
X-Li-Request-Id:
|
25
|
+
- JI3L4KN8K1
|
26
|
+
X-Li-Format:
|
27
|
+
- json
|
28
|
+
Date:
|
29
|
+
- Wed, 10 Apr 2013 22:07:36 GMT
|
30
|
+
Vary:
|
31
|
+
- ! '*'
|
32
|
+
Server:
|
33
|
+
- Apache-Coyote/1.1
|
34
|
+
Content-Type:
|
35
|
+
- application/json;charset=UTF-8
|
36
|
+
Transfer-Encoding:
|
37
|
+
- chunked
|
38
|
+
body:
|
39
|
+
encoding: UTF-8
|
40
|
+
string: ! "{\n \"numResults\": 6,\n \"people\": {\n \"_count\": 1,\n \"_start\":
|
41
|
+
5,\n \"_total\": 6,\n \"values\": [{\n \"firstName\": \"Satish\",\n
|
42
|
+
\ \"id\": \"V1FPuGot-I\",\n \"lastName\": \"Talim\"\n }]\n }\n}"
|
43
|
+
http_version: '1.1'
|
44
|
+
recorded_at: Tue, 04 Jun 2013 03:42:37 GMT
|
45
|
+
recorded_with: VCR 2.5.0
|
@@ -0,0 +1,37 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://api.linkedin.com/uas/oauth/requestToken
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- OAuth gem v0.4.4
|
12
|
+
Authorization:
|
13
|
+
- OAuth oauth_body_hash="2jmj7l5rSw0yVb%2FvlWAYkK%2FYBwk%3D", oauth_callback="oob",
|
14
|
+
oauth_consumer_key="eAI15DqRUTTd7OuQJBG3Mo0aw2Ekx5yoLX3x3NaLnbTnZbaU46OEii7uNTKijII4",
|
15
|
+
oauth_nonce="jSQpxoXaoTl2e0dALgc7VKzRJE993wqzRWuXuF0H0", oauth_signature="wn%2Bw0Jvyb9TQ4DC8sq3CxWMDM7Y%3D",
|
16
|
+
oauth_signature_method="HMAC-SHA1", oauth_timestamp="1297093507", oauth_version="1.0"
|
17
|
+
Content-Length:
|
18
|
+
- '0'
|
19
|
+
response:
|
20
|
+
status:
|
21
|
+
code: 200
|
22
|
+
message: OK
|
23
|
+
headers:
|
24
|
+
Content-Type:
|
25
|
+
- text/plain
|
26
|
+
Server:
|
27
|
+
- Apache-Coyote/1.1
|
28
|
+
Date:
|
29
|
+
- Mon, 07 Feb 2011 15:45:08 GMT
|
30
|
+
Content-Length:
|
31
|
+
- '236'
|
32
|
+
body:
|
33
|
+
encoding: UTF-8
|
34
|
+
string: 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
|
35
|
+
http_version: '1.1'
|
36
|
+
recorded_at: Wed, 10 Apr 2013 22:06:51 GMT
|
37
|
+
recorded_with: VCR 2.5.0
|
@@ -0,0 +1,37 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://api.linkedin.com/uas/oauth/requestToken
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- OAuth gem v0.4.4
|
12
|
+
Authorization:
|
13
|
+
- OAuth oauth_body_hash="2jmj7l5rSw0yVb%2FvlWAYkK%2FYBwk%3D", oauth_callback="http%3A%2F%2Fwww.josh.com",
|
14
|
+
oauth_consumer_key="eAI15DqRUTTd7OuQJBG3Mo0aw2Ekx5yoLX3x3NaLnbTnZbaU46OEii7uNTKijII4",
|
15
|
+
oauth_nonce="OYVkd4yi5oe16NGQMbANhBB8cabeynkTX28fOEjG1rs", oauth_signature="%2BwgZ8nb2CM5oWRpJEC5U0554uGk%3D",
|
16
|
+
oauth_signature_method="HMAC-SHA1", oauth_timestamp="1297103790", oauth_version="1.0"
|
17
|
+
Content-Length:
|
18
|
+
- '0'
|
19
|
+
response:
|
20
|
+
status:
|
21
|
+
code: 200
|
22
|
+
message: OK
|
23
|
+
headers:
|
24
|
+
Content-Type:
|
25
|
+
- text/plain
|
26
|
+
Server:
|
27
|
+
- Apache-Coyote/1.1
|
28
|
+
Date:
|
29
|
+
- Mon, 07 Feb 2011 18:36:30 GMT
|
30
|
+
Content-Length:
|
31
|
+
- '236'
|
32
|
+
body:
|
33
|
+
encoding: UTF-8
|
34
|
+
string: 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
|
35
|
+
http_version: '1.1'
|
36
|
+
recorded_at: Wed, 10 Apr 2013 22:06:51 GMT
|
37
|
+
recorded_with: VCR 2.5.0
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'linkedin2'
|
2
|
+
|
3
|
+
require 'rspec'
|
4
|
+
require 'vcr'
|
5
|
+
require 'pry'
|
6
|
+
require 'byebug'
|
7
|
+
|
8
|
+
VCR.configure do |c|
|
9
|
+
c.cassette_library_dir = 'spec/fixtures/requests'
|
10
|
+
c.hook_into :faraday
|
11
|
+
c.default_cassette_options = { :record => :none }
|
12
|
+
c.configure_rspec_metadata!
|
13
|
+
end
|
14
|
+
|
15
|
+
RSpec.configure do |c|
|
16
|
+
c.treat_symbols_as_metadata_keys_with_true_values = true
|
17
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: linkedin2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bob Breznak
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-10-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oauth2
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0.9'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: hashie
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 2.0.5
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 2.0.5
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: activesupport
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -38,6 +52,20 @@ dependencies:
|
|
38
52
|
- - ~>
|
39
53
|
- !ruby/object:Gem::Version
|
40
54
|
version: '4.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: faraday_middleware
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0.9'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ~>
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0.9'
|
41
69
|
- !ruby/object:Gem::Dependency
|
42
70
|
name: bundler
|
43
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -80,6 +108,48 @@ dependencies:
|
|
80
108
|
- - '>='
|
81
109
|
- !ruby/object:Gem::Version
|
82
110
|
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: pry
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - '>='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - '>='
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: rspec
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ~>
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '2.14'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ~>
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '2.14'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: vcr
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ~>
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '2.5'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ~>
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '2.5'
|
83
153
|
description: Ruby wrapper for the LinkedIn API
|
84
154
|
email:
|
85
155
|
- bob@evertrue.com
|
@@ -92,14 +162,51 @@ files:
|
|
92
162
|
- LICENSE.txt
|
93
163
|
- README.md
|
94
164
|
- Rakefile
|
165
|
+
- example-linkedin.yml
|
166
|
+
- lib/linkedin/api.rb
|
95
167
|
- lib/linkedin/api/authentication.rb
|
168
|
+
- lib/linkedin/api/companies.rb
|
169
|
+
- lib/linkedin/api/groups.rb
|
170
|
+
- lib/linkedin/api/industries.rb
|
171
|
+
- lib/linkedin/api/jobs.rb
|
172
|
+
- lib/linkedin/api/permissions.rb
|
173
|
+
- lib/linkedin/api/profiles.rb
|
174
|
+
- lib/linkedin/base.rb
|
96
175
|
- lib/linkedin/client.rb
|
176
|
+
- lib/linkedin/company.rb
|
97
177
|
- lib/linkedin/configuration.rb
|
98
178
|
- lib/linkedin/error.rb
|
179
|
+
- lib/linkedin/faraday_middleware.rb
|
180
|
+
- lib/linkedin/faraday_middleware/linkedin_error_response.rb
|
181
|
+
- lib/linkedin/faraday_middleware/linkedin_format_request.rb
|
182
|
+
- lib/linkedin/industry.rb
|
183
|
+
- lib/linkedin/profile.rb
|
99
184
|
- lib/linkedin/utils.rb
|
100
185
|
- lib/linkedin/version.rb
|
101
186
|
- lib/linkedin2.rb
|
102
187
|
- linkedin.gemspec
|
188
|
+
- spec/api/companies_spec.rb
|
189
|
+
- spec/api/groups_spec.rb
|
190
|
+
- spec/api/jobs_spec.rb
|
191
|
+
- spec/api/profiles_spec.rb
|
192
|
+
- spec/faraday_middleware/linkedin_error_response_spec.rb
|
193
|
+
- spec/fixtures/requests/access_token.yml
|
194
|
+
- spec/fixtures/requests/company-search/by_keywords_options_with_fields.yml
|
195
|
+
- spec/fixtures/requests/company-search/by_keywords_string_parameter.yml
|
196
|
+
- spec/fixtures/requests/company-search/by_single_keywords_option.yml
|
197
|
+
- spec/fixtures/requests/company-search/by_single_keywords_option_with_facets_to_return.yml
|
198
|
+
- spec/fixtures/requests/company-search/by_single_keywords_option_with_pagination.yml
|
199
|
+
- spec/fixtures/requests/company.yml
|
200
|
+
- spec/fixtures/requests/invalid.yml
|
201
|
+
- spec/fixtures/requests/people-search/by_company_name_option.yml
|
202
|
+
- spec/fixtures/requests/people-search/by_first_name_and_last_name_options.yml
|
203
|
+
- spec/fixtures/requests/people-search/by_first_name_and_last_name_options_with_fields.yml
|
204
|
+
- spec/fixtures/requests/people-search/by_keywords_string_parameter.yml
|
205
|
+
- spec/fixtures/requests/people-search/by_single_keywords_option.yml
|
206
|
+
- spec/fixtures/requests/people-search/by_single_keywords_option_with_pagination.yml
|
207
|
+
- spec/fixtures/requests/request_token/request_token.yml
|
208
|
+
- spec/fixtures/requests/request_token/with_callback.yml
|
209
|
+
- spec/spec_helper.rb
|
103
210
|
homepage: https://github.com/bobbrez/linkedin2
|
104
211
|
licenses:
|
105
212
|
- MIT
|
@@ -124,5 +231,27 @@ rubygems_version: 2.0.0
|
|
124
231
|
signing_key:
|
125
232
|
specification_version: 4
|
126
233
|
summary: Ruby wrapper for the LinkedIn API
|
127
|
-
test_files:
|
234
|
+
test_files:
|
235
|
+
- spec/api/companies_spec.rb
|
236
|
+
- spec/api/groups_spec.rb
|
237
|
+
- spec/api/jobs_spec.rb
|
238
|
+
- spec/api/profiles_spec.rb
|
239
|
+
- spec/faraday_middleware/linkedin_error_response_spec.rb
|
240
|
+
- spec/fixtures/requests/access_token.yml
|
241
|
+
- spec/fixtures/requests/company-search/by_keywords_options_with_fields.yml
|
242
|
+
- spec/fixtures/requests/company-search/by_keywords_string_parameter.yml
|
243
|
+
- spec/fixtures/requests/company-search/by_single_keywords_option.yml
|
244
|
+
- spec/fixtures/requests/company-search/by_single_keywords_option_with_facets_to_return.yml
|
245
|
+
- spec/fixtures/requests/company-search/by_single_keywords_option_with_pagination.yml
|
246
|
+
- spec/fixtures/requests/company.yml
|
247
|
+
- spec/fixtures/requests/invalid.yml
|
248
|
+
- spec/fixtures/requests/people-search/by_company_name_option.yml
|
249
|
+
- spec/fixtures/requests/people-search/by_first_name_and_last_name_options.yml
|
250
|
+
- spec/fixtures/requests/people-search/by_first_name_and_last_name_options_with_fields.yml
|
251
|
+
- spec/fixtures/requests/people-search/by_keywords_string_parameter.yml
|
252
|
+
- spec/fixtures/requests/people-search/by_single_keywords_option.yml
|
253
|
+
- spec/fixtures/requests/people-search/by_single_keywords_option_with_pagination.yml
|
254
|
+
- spec/fixtures/requests/request_token/request_token.yml
|
255
|
+
- spec/fixtures/requests/request_token/with_callback.yml
|
256
|
+
- spec/spec_helper.rb
|
128
257
|
has_rdoc:
|