linkedin 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (24) hide show
  1. checksums.yaml +7 -0
  2. data/README.markdown +26 -24
  3. data/Rakefile +1 -0
  4. data/lib/linked_in/api/query_methods.rb +3 -3
  5. data/lib/linked_in/version.rb +1 -1
  6. data/linkedin.gemspec +7 -7
  7. data/spec/cases/api_spec.rb +6 -0
  8. data/spec/fixtures/cassette_library/LinkedIn_Api/Company_API.yml +50 -42
  9. data/spec/fixtures/cassette_library/LinkedIn_Client/_authorize_from_request.yml +31 -22
  10. data/spec/fixtures/cassette_library/LinkedIn_Client/_request_token.yml +31 -22
  11. data/spec/fixtures/cassette_library/LinkedIn_Client/_request_token/with_a_callback_url.yml +31 -22
  12. data/spec/fixtures/cassette_library/LinkedIn_Client/_request_token/with_default_options.yml +31 -22
  13. data/spec/fixtures/cassette_library/LinkedIn_Search/_search/by_company_name_option.yml +73 -89
  14. data/spec/fixtures/cassette_library/LinkedIn_Search/_search/by_first_name_and_last_name_options.yml +80 -111
  15. data/spec/fixtures/cassette_library/LinkedIn_Search/_search/by_first_name_and_last_name_options_with_fields.yml +92 -127
  16. data/spec/fixtures/cassette_library/LinkedIn_Search/_search/by_keywords_string_parameter.yml +43 -62
  17. data/spec/fixtures/cassette_library/LinkedIn_Search/_search/by_single_keywords_option.yml +43 -62
  18. data/spec/fixtures/cassette_library/LinkedIn_Search/_search/by_single_keywords_option_with_pagination.yml +35 -37
  19. data/spec/fixtures/cassette_library/LinkedIn_Search/_search_company/by_keywords_options_with_fields.yml +222 -25
  20. data/spec/fixtures/cassette_library/LinkedIn_Search/_search_company/by_keywords_string_parameter.yml +70 -146
  21. data/spec/fixtures/cassette_library/LinkedIn_Search/_search_company/by_single_keywords_option.yml +70 -146
  22. data/spec/fixtures/cassette_library/LinkedIn_Search/_search_company/by_single_keywords_option_with_facets_to_return.yml +70 -146
  23. data/spec/fixtures/cassette_library/LinkedIn_Search/_search_company/by_single_keywords_option_with_pagination.yml +64 -126
  24. metadata +21 -57
@@ -1,28 +1,37 @@
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:
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:
9
11
  - 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="5INIHjRHjfLCYQX0r7cArMGiUPXoH62wEAgbrh1M", oauth_signature="K1kJU%2FQsuIKj1OUKsaUIcM1xr8Q%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1297103788", oauth_version="1.0"
12
- content-length:
13
- - "0"
14
- response: !ruby/struct:VCR::Response
15
- status: !ruby/struct:VCR::ResponseStatus
12
+ Authorization:
13
+ - OAuth oauth_body_hash="2jmj7l5rSw0yVb%2FvlWAYkK%2FYBwk%3D", oauth_callback="oob",
14
+ oauth_consumer_key="eAI15DqRUTTd7OuQJBG3Mo0aw2Ekx5yoLX3x3NaLnbTnZbaU46OEii7uNTKijII4",
15
+ oauth_nonce="5INIHjRHjfLCYQX0r7cArMGiUPXoH62wEAgbrh1M", oauth_signature="K1kJU%2FQsuIKj1OUKsaUIcM1xr8Q%3D",
16
+ oauth_signature_method="HMAC-SHA1", oauth_timestamp="1297103788", oauth_version="1.0"
17
+ Content-Length:
18
+ - '0'
19
+ response:
20
+ status:
16
21
  code: 200
17
22
  message: OK
18
- headers:
19
- content-type:
23
+ headers:
24
+ Content-Type:
20
25
  - text/plain
21
- server:
26
+ Server:
22
27
  - Apache-Coyote/1.1
23
- date:
28
+ Date:
24
29
  - Mon, 07 Feb 2011 18:36:29 GMT
25
- content-length:
26
- - "236"
27
- body: oauth_token=fe9d7429-e5cc-47c2-b396-23521d86cf9c&oauth_token_secret=092e7c24-8ad8-4ca9-8f92-8c4f17664bcb&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"
30
+ Content-Length:
31
+ - '236'
32
+ body:
33
+ encoding: UTF-8
34
+ string: oauth_token=fe9d7429-e5cc-47c2-b396-23521d86cf9c&oauth_token_secret=092e7c24-8ad8-4ca9-8f92-8c4f17664bcb&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
@@ -1,109 +1,93 @@
1
- ---
2
- - !ruby/struct:VCR::HTTPInteraction
3
- request: !ruby/struct:VCR::Request
4
- method: :get
5
- uri: https://api.linkedin.com:443/v1/people-search?company-name=linkedin
6
- body:
7
- headers:
8
- user-agent:
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.linkedin.com/v1/people-search?company-name=linkedin
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
9
11
  - OAuth gem v0.4.7
10
- authorization:
11
- - OAuth oauth_consumer_key="mpibxdpwbwry", oauth_nonce="TkuTVt34MgzfuheowxiWtlQzdNdJBfGwh8uNqwcDrS4", oauth_signature="TQsnrPLgwq6hrw4G9VaPwJIKW8o%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1365631657", oauth_token="d9f69cd6-f3f3-4c26-9f2c-12cd8e228089", oauth_version="1.0"
12
- x-li-format:
12
+ Authorization:
13
+ - OAuth oauth_consumer_key="mpibxdpwbwry", oauth_nonce="TkuTVt34MgzfuheowxiWtlQzdNdJBfGwh8uNqwcDrS4",
14
+ oauth_signature="TQsnrPLgwq6hrw4G9VaPwJIKW8o%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:
13
18
  - json
14
- response: !ruby/struct:VCR::Response
15
- status: !ruby/struct:VCR::ResponseStatus
19
+ response:
20
+ status:
16
21
  code: 200
17
22
  message: OK
18
- headers:
19
- x-li-request-id:
23
+ headers:
24
+ X-Li-Request-Id:
20
25
  - 0UF1FY9HHN
21
- vary:
22
- - "*"
23
- transfer-encoding:
26
+ Vary:
27
+ - ! '*'
28
+ Transfer-Encoding:
24
29
  - chunked
25
- server:
30
+ Server:
26
31
  - Apache-Coyote/1.1
27
- content-type:
32
+ Content-Type:
28
33
  - application/json;charset=UTF-8
29
- date:
34
+ Date:
30
35
  - Wed, 10 Apr 2013 22:07:36 GMT
31
- x-li-format:
36
+ X-Li-Format:
32
37
  - 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?company-name=IBM
43
- body:
44
- headers:
45
- user-agent:
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?company-name=IBM
46
+ body:
47
+ encoding: US-ASCII
48
+ string: ''
49
+ headers:
50
+ User-Agent:
46
51
  - OAuth gem v0.4.7
47
- authorization:
48
- - OAuth oauth_consumer_key="mpibxdpwbwry", oauth_nonce="dixy4z5VMylJTypqa3abkuEnVrjFtb5V5hd9DpMKB0", oauth_signature="OOD9beldHTV5d9a6fVpPUqOB%2BPs%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1365631799", oauth_token="d9f69cd6-f3f3-4c26-9f2c-12cd8e228089", oauth_version="1.0"
49
- x-li-format:
52
+ Authorization:
53
+ - OAuth oauth_consumer_key="mpibxdpwbwry", oauth_nonce="dixy4z5VMylJTypqa3abkuEnVrjFtb5V5hd9DpMKB0",
54
+ oauth_signature="OOD9beldHTV5d9a6fVpPUqOB%2BPs%3D", oauth_signature_method="HMAC-SHA1",
55
+ oauth_timestamp="1365631799", oauth_token="d9f69cd6-f3f3-4c26-9f2c-12cd8e228089",
56
+ oauth_version="1.0"
57
+ X-Li-Format:
50
58
  - json
51
- response: !ruby/struct:VCR::Response
52
- status: !ruby/struct:VCR::ResponseStatus
59
+ response:
60
+ status:
53
61
  code: 200
54
62
  message: OK
55
- headers:
56
- x-li-request-id:
63
+ headers:
64
+ X-Li-Request-Id:
57
65
  - L00YMW359U
58
- vary:
59
- - "*"
60
- transfer-encoding:
66
+ Vary:
67
+ - ! '*'
68
+ Transfer-Encoding:
61
69
  - chunked
62
- server:
70
+ Server:
63
71
  - Apache-Coyote/1.1
64
- date:
72
+ Date:
65
73
  - Wed, 10 Apr 2013 22:09:58 GMT
66
- x-li-format:
74
+ X-Li-Format:
67
75
  - json
68
- content-type:
76
+ Content-Type:
69
77
  - application/json;charset=UTF-8
70
- body: |-
71
- {
72
- "numResults": 6,
73
- "people": {
74
- "_total": 6,
75
- "values": [
76
- {
77
- "firstName": "Ryan",
78
- "id": "KHkgwBMaa-",
79
- "lastName": "Sue"
80
- },
81
- {
82
- "firstName": "Ben",
83
- "id": "lljISRB-WQ",
84
- "lastName": "Mejia"
85
- },
86
- {
87
- "firstName": "James",
88
- "id": "zLwxyfa2cv",
89
- "lastName": "Stevenson"
90
- },
91
- {
92
- "firstName": "Charles",
93
- "id": "r5Kzi9Um-e",
94
- "lastName": "Kafoglis"
95
- },
96
- {
97
- "firstName": "Sauraj",
98
- "id": "RLJu6NhdI2",
99
- "lastName": "Goswami"
100
- },
101
- {
102
- "firstName": "Jonathan",
103
- "id": "NgAxaSCyZ3",
104
- "lastName": "Hedstrom"
105
- }
106
- ]
107
- }
108
- }
109
- http_version: "1.1"
78
+ body:
79
+ encoding: UTF-8
80
+ string: ! "{\n \"numResults\": 6,\n \"people\": {\n \"_total\": 6,\n \"values\":
81
+ [\n {\n \"firstName\": \"Ryan\",\n \"id\": \"KHkgwBMaa-\",\n
82
+ \ \"lastName\": \"Sue\"\n },\n {\n \"firstName\": \"Ben\",\n
83
+ \ \"id\": \"lljISRB-WQ\",\n \"lastName\": \"Mejia\"\n },\n
84
+ \ {\n \"firstName\": \"James\",\n \"id\": \"zLwxyfa2cv\",\n
85
+ \ \"lastName\": \"Stevenson\"\n },\n {\n \"firstName\":
86
+ \"Charles\",\n \"id\": \"r5Kzi9Um-e\",\n \"lastName\": \"Kafoglis\"\n
87
+ \ },\n {\n \"firstName\": \"Sauraj\",\n \"id\": \"RLJu6NhdI2\",\n
88
+ \ \"lastName\": \"Goswami\"\n },\n {\n \"firstName\":
89
+ \"Jonathan\",\n \"id\": \"NgAxaSCyZ3\",\n \"lastName\": \"Hedstrom\"\n
90
+ \ }\n ]\n }\n}"
91
+ http_version: '1.1'
92
+ recorded_at: Tue, 04 Jun 2013 03:42:37 GMT
93
+ recorded_with: VCR 2.5.0
@@ -1,131 +1,100 @@
1
- ---
2
- - !ruby/struct:VCR::HTTPInteraction
3
- request: !ruby/struct:VCR::Request
4
- method: :get
5
- uri: https://api.linkedin.com:443/v1/people-search?first-name=Giliardi&last-name=Pires
6
- body:
7
- headers:
8
- x-li-format:
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.linkedin.com/v1/people-search?first-name=Giliardi&last-name=Pires
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ X-Li-Format:
9
11
  - json
10
- user-agent:
12
+ User-Agent:
11
13
  - 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
14
+ Authorization:
15
+ - OAuth oauth_consumer_key="mpibxdpwbwry", oauth_nonce="eq8g0jFLe2FsDxO255PW6UqoZ8lwJAqiIJCm3qEKF8",
16
+ oauth_signature="D1xMNnx7aOxDotnPt1mtEdbJPlU%3D", oauth_signature_method="HMAC-SHA1",
17
+ oauth_timestamp="1365631656", oauth_token="d9f69cd6-f3f3-4c26-9f2c-12cd8e228089",
18
+ oauth_version="1.0"
19
+ response:
20
+ status:
16
21
  code: 200
17
22
  message: OK
18
- headers:
19
- vary:
20
- - "*"
21
- transfer-encoding:
23
+ headers:
24
+ Vary:
25
+ - ! '*'
26
+ Transfer-Encoding:
22
27
  - chunked
23
- server:
28
+ Server:
24
29
  - Apache-Coyote/1.1
25
- x-li-format:
30
+ X-Li-Format:
26
31
  - json
27
- x-li-request-id:
32
+ X-Li-Request-Id:
28
33
  - CH30LTU9DW
29
- date:
34
+ Date:
30
35
  - Wed, 10 Apr 2013 22:07:36 GMT
31
- content-type:
36
+ Content-Type:
32
37
  - 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
41
- method: :get
42
- uri: https://api.linkedin.com:443/v1/people-search?first-name=Charles&last-name=Garcia
43
- body:
44
- headers:
45
- x-li-format:
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?first-name=Charles&last-name=Garcia
46
+ body:
47
+ encoding: US-ASCII
48
+ string: ''
49
+ headers:
50
+ X-Li-Format:
46
51
  - json
47
- user-agent:
52
+ User-Agent:
48
53
  - 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
54
+ Authorization:
55
+ - OAuth oauth_consumer_key="mpibxdpwbwry", oauth_nonce="lTIll68hM4A1tc0I56h92w5znsrjFfJ4nDvKpSqDfg",
56
+ oauth_signature="AhGLaPTVAJvv8pncUjz2j8C6%2B%2FA%3D", oauth_signature_method="HMAC-SHA1",
57
+ oauth_timestamp="1365632102", oauth_token="d9f69cd6-f3f3-4c26-9f2c-12cd8e228089",
58
+ oauth_version="1.0"
59
+ response:
60
+ status:
53
61
  code: 200
54
62
  message: OK
55
- headers:
56
- vary:
57
- - "*"
58
- transfer-encoding:
63
+ headers:
64
+ Vary:
65
+ - ! '*'
66
+ Transfer-Encoding:
59
67
  - chunked
60
- server:
68
+ Server:
61
69
  - Apache-Coyote/1.1
62
- x-li-request-id:
70
+ X-Li-Request-Id:
63
71
  - 6AXWFPE8I6
64
- x-li-format:
72
+ X-Li-Format:
65
73
  - json
66
- date:
74
+ Date:
67
75
  - Wed, 10 Apr 2013 22:15:03 GMT
68
- content-type:
76
+ Content-Type:
69
77
  - 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"
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 },\n {\n \"firstName\": \"Charles R.\",\n \"id\":
84
+ \"NjwO1vU6P6\",\n \"lastName\": \"Garcia Jr.\"\n },\n {\n
85
+ \ \"firstName\": \"Charles\",\n \"id\": \"j8ZczJo44W\",\n \"lastName\":
86
+ \"Garcia-Tobin\"\n },\n {\n \"firstName\": \"Charles\",\n
87
+ \ \"id\": \"jYfrk5GM29\",\n \"lastName\": \"Garcia\"\n },\n
88
+ \ {\n \"firstName\": \"Charles\",\n \"id\": \"C-2ASm3SQ1\",\n
89
+ \ \"lastName\": \"Garcia\"\n },\n {\n \"firstName\":
90
+ \"Charles\",\n \"id\": \"LG__MFCUTJ\",\n \"lastName\": \"Garcia\"\n
91
+ \ },\n {\n \"firstName\": \"Charles\",\n \"id\": \"wjopxKqYYM\",\n
92
+ \ \"lastName\": \"Garcia\"\n },\n {\n \"firstName\":
93
+ \"Charles\",\n \"id\": \"AtFQt5Lf1V\",\n \"lastName\": \"Garcia\"\n
94
+ \ },\n {\n \"firstName\": \"Charles\",\n \"id\": \"MUXIZwfehE\",\n
95
+ \ \"lastName\": \"Garcia\"\n },\n {\n \"firstName\":
96
+ \"Charles\",\n \"id\": \"koTmAyWE8J\",\n \"lastName\": \"Schwalbe
97
+ Garcia-Lago\"\n }\n ]\n }\n}"
98
+ http_version: '1.1'
99
+ recorded_at: Tue, 04 Jun 2013 03:42:37 GMT
100
+ recorded_with: VCR 2.5.0