linkedin 0.3.7 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (23) hide show
  1. data/README.markdown +1 -1
  2. data/changelog.markdown +15 -0
  3. data/lib/linked_in/api/query_methods.rb +15 -0
  4. data/lib/linked_in/api/update_methods.rb +16 -4
  5. data/lib/linked_in/helpers/authorization.rb +4 -3
  6. data/lib/linked_in/version.rb +2 -2
  7. data/linkedin.gemspec +2 -2
  8. data/spec/cases/api_spec.rb +49 -4
  9. data/spec/cases/oauth_spec.rb +13 -0
  10. data/spec/cases/search_spec.rb +35 -37
  11. data/spec/fixtures/cassette_library/LinkedIn_Search/_search/by_company_name_option.yml +98 -124
  12. data/spec/fixtures/cassette_library/LinkedIn_Search/_search/by_first_name_and_last_name_options.yml +120 -111
  13. data/spec/fixtures/cassette_library/LinkedIn_Search/_search/by_first_name_and_last_name_options_with_fields.yml +137 -62
  14. data/spec/fixtures/cassette_library/LinkedIn_Search/_search/by_keywords_string_parameter.yml +64 -128
  15. data/spec/fixtures/cassette_library/LinkedIn_Search/_search/by_single_keywords_option.yml +64 -128
  16. data/spec/fixtures/cassette_library/LinkedIn_Search/_search/by_single_keywords_option_with_pagination.yml +39 -120
  17. data/spec/fixtures/cassette_library/LinkedIn_Search/_search_company/by_keywords_options_with_fields.yml +26 -243
  18. data/spec/fixtures/cassette_library/LinkedIn_Search/_search_company/by_keywords_string_parameter.yml +147 -64
  19. data/spec/fixtures/cassette_library/LinkedIn_Search/_search_company/by_single_keywords_option.yml +147 -62
  20. data/spec/fixtures/cassette_library/LinkedIn_Search/_search_company/by_single_keywords_option_with_facets_to_return.yml +147 -62
  21. data/spec/fixtures/cassette_library/LinkedIn_Search/_search_company/by_single_keywords_option_with_pagination.yml +127 -57
  22. metadata +81 -28
  23. data/spec/fixtures/cassette_library/LinkedIn_Search/_search_company/by_single_keywords_option_with_a_facet.yml +0 -111
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: linkedin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.7
4
+ version: 0.4.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,22 +10,33 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-05-30 00:00:00.000000000 Z
13
+ date: 2013-05-30 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: hashie
17
- requirement: &70192547125300 !ruby/object:Gem::Requirement
17
+ requirement: !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
- - - ~>
20
+ - - ! '>='
21
21
  - !ruby/object:Gem::Version
22
22
  version: '1.2'
23
+ - - <
24
+ - !ruby/object:Gem::Version
25
+ version: '2.1'
23
26
  type: :runtime
24
27
  prerelease: false
25
- version_requirements: *70192547125300
28
+ version_requirements: !ruby/object:Gem::Requirement
29
+ none: false
30
+ requirements:
31
+ - - ! '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '1.2'
34
+ - - <
35
+ - !ruby/object:Gem::Version
36
+ version: '2.1'
26
37
  - !ruby/object:Gem::Dependency
27
38
  name: multi_json
28
- requirement: &70192547123600 !ruby/object:Gem::Requirement
39
+ requirement: !ruby/object:Gem::Requirement
29
40
  none: false
30
41
  requirements:
31
42
  - - ~>
@@ -33,10 +44,15 @@ dependencies:
33
44
  version: '1.0'
34
45
  type: :runtime
35
46
  prerelease: false
36
- version_requirements: *70192547123600
47
+ version_requirements: !ruby/object:Gem::Requirement
48
+ none: false
49
+ requirements:
50
+ - - ~>
51
+ - !ruby/object:Gem::Version
52
+ version: '1.0'
37
53
  - !ruby/object:Gem::Dependency
38
54
  name: oauth
39
- requirement: &70192547122740 !ruby/object:Gem::Requirement
55
+ requirement: !ruby/object:Gem::Requirement
40
56
  none: false
41
57
  requirements:
42
58
  - - ~>
@@ -44,10 +60,15 @@ dependencies:
44
60
  version: '0.4'
45
61
  type: :runtime
46
62
  prerelease: false
47
- version_requirements: *70192547122740
63
+ version_requirements: !ruby/object:Gem::Requirement
64
+ none: false
65
+ requirements:
66
+ - - ~>
67
+ - !ruby/object:Gem::Version
68
+ version: '0.4'
48
69
  - !ruby/object:Gem::Dependency
49
70
  name: json
50
- requirement: &70192547121960 !ruby/object:Gem::Requirement
71
+ requirement: !ruby/object:Gem::Requirement
51
72
  none: false
52
73
  requirements:
53
74
  - - ~>
@@ -55,10 +76,15 @@ dependencies:
55
76
  version: '1.6'
56
77
  type: :development
57
78
  prerelease: false
58
- version_requirements: *70192547121960
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ none: false
81
+ requirements:
82
+ - - ~>
83
+ - !ruby/object:Gem::Version
84
+ version: '1.6'
59
85
  - !ruby/object:Gem::Dependency
60
86
  name: rake
61
- requirement: &70192547137360 !ruby/object:Gem::Requirement
87
+ requirement: !ruby/object:Gem::Requirement
62
88
  none: false
63
89
  requirements:
64
90
  - - ~>
@@ -66,10 +92,15 @@ dependencies:
66
92
  version: '0.9'
67
93
  type: :development
68
94
  prerelease: false
69
- version_requirements: *70192547137360
95
+ version_requirements: !ruby/object:Gem::Requirement
96
+ none: false
97
+ requirements:
98
+ - - ~>
99
+ - !ruby/object:Gem::Version
100
+ version: '0.9'
70
101
  - !ruby/object:Gem::Dependency
71
102
  name: rdoc
72
- requirement: &70192547136900 !ruby/object:Gem::Requirement
103
+ requirement: !ruby/object:Gem::Requirement
73
104
  none: false
74
105
  requirements:
75
106
  - - ~>
@@ -77,10 +108,15 @@ dependencies:
77
108
  version: '3.8'
78
109
  type: :development
79
110
  prerelease: false
80
- version_requirements: *70192547136900
111
+ version_requirements: !ruby/object:Gem::Requirement
112
+ none: false
113
+ requirements:
114
+ - - ~>
115
+ - !ruby/object:Gem::Version
116
+ version: '3.8'
81
117
  - !ruby/object:Gem::Dependency
82
118
  name: rspec
83
- requirement: &70192547136400 !ruby/object:Gem::Requirement
119
+ requirement: !ruby/object:Gem::Requirement
84
120
  none: false
85
121
  requirements:
86
122
  - - ~>
@@ -88,10 +124,15 @@ dependencies:
88
124
  version: '2.6'
89
125
  type: :development
90
126
  prerelease: false
91
- version_requirements: *70192547136400
127
+ version_requirements: !ruby/object:Gem::Requirement
128
+ none: false
129
+ requirements:
130
+ - - ~>
131
+ - !ruby/object:Gem::Version
132
+ version: '2.6'
92
133
  - !ruby/object:Gem::Dependency
93
134
  name: simplecov
94
- requirement: &70192547135880 !ruby/object:Gem::Requirement
135
+ requirement: !ruby/object:Gem::Requirement
95
136
  none: false
96
137
  requirements:
97
138
  - - ~>
@@ -99,10 +140,15 @@ dependencies:
99
140
  version: '0.5'
100
141
  type: :development
101
142
  prerelease: false
102
- version_requirements: *70192547135880
143
+ version_requirements: !ruby/object:Gem::Requirement
144
+ none: false
145
+ requirements:
146
+ - - ~>
147
+ - !ruby/object:Gem::Version
148
+ version: '0.5'
103
149
  - !ruby/object:Gem::Dependency
104
150
  name: vcr
105
- requirement: &70192547135320 !ruby/object:Gem::Requirement
151
+ requirement: !ruby/object:Gem::Requirement
106
152
  none: false
107
153
  requirements:
108
154
  - - ~>
@@ -110,18 +156,28 @@ dependencies:
110
156
  version: '1.10'
111
157
  type: :development
112
158
  prerelease: false
113
- version_requirements: *70192547135320
159
+ version_requirements: !ruby/object:Gem::Requirement
160
+ none: false
161
+ requirements:
162
+ - - ~>
163
+ - !ruby/object:Gem::Version
164
+ version: '1.10'
114
165
  - !ruby/object:Gem::Dependency
115
166
  name: webmock
116
- requirement: &70192547134760 !ruby/object:Gem::Requirement
167
+ requirement: !ruby/object:Gem::Requirement
117
168
  none: false
118
169
  requirements:
119
170
  - - ~>
120
171
  - !ruby/object:Gem::Version
121
- version: '1.7'
172
+ version: '1.9'
122
173
  type: :development
123
174
  prerelease: false
124
- version_requirements: *70192547134760
175
+ version_requirements: !ruby/object:Gem::Requirement
176
+ none: false
177
+ requirements:
178
+ - - ~>
179
+ - !ruby/object:Gem::Version
180
+ version: '1.9'
125
181
  description: Ruby wrapper for the LinkedIn API
126
182
  email:
127
183
  - wynn.netherland@gmail.com
@@ -178,7 +234,6 @@ files:
178
234
  - spec/fixtures/cassette_library/LinkedIn_Search/_search_company/by_keywords_options_with_fields.yml
179
235
  - spec/fixtures/cassette_library/LinkedIn_Search/_search_company/by_keywords_string_parameter.yml
180
236
  - spec/fixtures/cassette_library/LinkedIn_Search/_search_company/by_single_keywords_option.yml
181
- - spec/fixtures/cassette_library/LinkedIn_Search/_search_company/by_single_keywords_option_with_a_facet.yml
182
237
  - spec/fixtures/cassette_library/LinkedIn_Search/_search_company/by_single_keywords_option_with_facets_to_return.yml
183
238
  - spec/fixtures/cassette_library/LinkedIn_Search/_search_company/by_single_keywords_option_with_pagination.yml
184
239
  - spec/helper.rb
@@ -202,7 +257,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
202
257
  version: '0'
203
258
  requirements: []
204
259
  rubyforge_project:
205
- rubygems_version: 1.8.11
260
+ rubygems_version: 1.8.25
206
261
  signing_key:
207
262
  specification_version: 3
208
263
  summary: Ruby wrapper for the LinkedIn API
@@ -226,8 +281,6 @@ test_files:
226
281
  - spec/fixtures/cassette_library/LinkedIn_Search/_search_company/by_keywords_options_with_fields.yml
227
282
  - spec/fixtures/cassette_library/LinkedIn_Search/_search_company/by_keywords_string_parameter.yml
228
283
  - spec/fixtures/cassette_library/LinkedIn_Search/_search_company/by_single_keywords_option.yml
229
- - spec/fixtures/cassette_library/LinkedIn_Search/_search_company/by_single_keywords_option_with_a_facet.yml
230
284
  - spec/fixtures/cassette_library/LinkedIn_Search/_search_company/by_single_keywords_option_with_facets_to_return.yml
231
285
  - spec/fixtures/cassette_library/LinkedIn_Search/_search_company/by_single_keywords_option_with_pagination.yml
232
286
  - spec/helper.rb
233
- has_rdoc:
@@ -1,111 +0,0 @@
1
- ---
2
- - !ruby/struct:VCR::HTTPInteraction
3
- request: !ruby/struct:VCR::Request
4
- method: :get
5
- uri: https://api.linkedin.com:443/v1/company-search?facets=industry%20location&keywords=apple
6
- body:
7
- headers:
8
- x-li-format:
9
- - json
10
- user-agent:
11
- - OAuth gem v0.4.5
12
- authorization:
13
- - OAuth oauth_consumer_key="n22cs9eyo36s", oauth_nonce="xcTeuTk5cLV7tNNj54FHtRznawbANOaFufpxhOzMoo",
14
- oauth_signature="JoirhKilAS83lfN9j27EccA5EBw%3D", oauth_signature_method="HMAC-SHA1",
15
- oauth_timestamp="1329991294", oauth_token="a39e395e-bc38-4d5b-ae3b-52f840f821e9",
16
- oauth_version="1.0"
17
- response: !ruby/struct:VCR::Response
18
- status: !ruby/struct:VCR::ResponseStatus
19
- code: 400
20
- message: Bad Request
21
- headers:
22
- server:
23
- - Apache-Coyote/1.1
24
- x-li-request-id:
25
- - KK2E56GW6H
26
- date:
27
- - Thu, 23 Feb 2012 10:01:34 GMT
28
- vary:
29
- - ! '*'
30
- x-li-format:
31
- - json
32
- content-type:
33
- - application/json;charset=UTF-8
34
- content-length:
35
- - '151'
36
- nncoection:
37
- - close
38
- body: ! "{\n \"errorCode\": 0,\n \"message\": \"Unknown facet code {industry
39
- location}\",\n \"requestId\": \"KK2E56GW6H\",\n \"status\": 400,\n \"timestamp\":
40
- 1329991295101\n}"
41
- http_version: '1.1'
42
- - !ruby/struct:VCR::HTTPInteraction
43
- request: !ruby/struct:VCR::Request
44
- method: :get
45
- uri: https://api.linkedin.com:443/v1/company-search?facets=industry&keywords=apple
46
- body:
47
- headers:
48
- x-li-format:
49
- - json
50
- user-agent:
51
- - OAuth gem v0.4.5
52
- authorization:
53
- - OAuth oauth_consumer_key="n22cs9eyo36s", oauth_nonce="irnhySxSqqJGyvqrhpTSLcNDzNZRjJlwEje7dkhgvg",
54
- oauth_signature="5giHjjs15I5NzMA%2FEYoPejTl4BI%3D", oauth_signature_method="HMAC-SHA1",
55
- oauth_timestamp="1329991354", oauth_token="a39e395e-bc38-4d5b-ae3b-52f840f821e9",
56
- oauth_version="1.0"
57
- response: !ruby/struct:VCR::Response
58
- status: !ruby/struct:VCR::ResponseStatus
59
- code: 200
60
- message: OK
61
- headers:
62
- server:
63
- - Apache-Coyote/1.1
64
- x-li-request-id:
65
- - 0VNTJU19QA
66
- vary:
67
- - ! '*'
68
- x-li-format:
69
- - json
70
- content-type:
71
- - application/json;charset=UTF-8
72
- transfer-encoding:
73
- - chunked
74
- date:
75
- - Thu, 23 Feb 2012 10:02:36 GMT
76
- body: ! "{\n \"companies\": {\n \"_count\": 10,\n \"_start\": 0,\n \"_total\":
77
- 5696,\n \"values\": [\n {\n \"id\": 162479,\n \"name\":
78
- \"Apple\"\n },\n {\n \"id\": 1276,\n \"name\": \"Apple
79
- Retail\"\n },\n {\n \"id\": 1373,\n \"name\": \"Xerox\"\n
80
- \ },\n {\n \"id\": 165158,\n \"name\": \"Netflix\"\n
81
- \ },\n {\n \"id\": 7240,\n \"name\": \"HCL Infosystems
82
- Ltd\"\n },\n {\n \"id\": 19271,\n \"name\": \"Apple
83
- Vacations\"\n },\n {\n \"id\": 163801,\n \"name\": \"FileMaker\"\n
84
- \ },\n {\n \"id\": 21482,\n \"name\": \"GHA Technologies\"\n
85
- \ },\n {\n \"id\": 112136,\n \"name\": \"Apple & Associates\"\n
86
- \ },\n {\n \"id\": 15552,\n \"name\": \"Micro Center\"\n
87
- \ }\n ]\n },\n \"facets\": {\n \"_total\": 1,\n \"values\": [{\n
88
- \ \"buckets\": {\n \"_total\": 10,\n \"values\": [\n {\n
89
- \ \"code\": \"96\",\n \"count\": 1386,\n \"name\":
90
- \"Information Technology and Services\",\n \"selected\": false\n
91
- \ },\n {\n \"code\": \"4\",\n \"count\":
92
- 732,\n \"name\": \"Computer Software\",\n \"selected\":
93
- false\n },\n {\n \"code\": \"3\",\n \"count\":
94
- 313,\n \"name\": \"Computer Hardware\",\n \"selected\":
95
- false\n },\n {\n \"code\": \"6\",\n \"count\":
96
- 295,\n \"name\": \"Internet\",\n \"selected\": false\n
97
- \ },\n {\n \"code\": \"80\",\n \"count\":
98
- 219,\n \"name\": \"Marketing and Advertising\",\n \"selected\":
99
- false\n },\n {\n \"code\": \"24\",\n \"count\":
100
- 166,\n \"name\": \"Consumer Electronics\",\n \"selected\":
101
- false\n },\n {\n \"code\": \"27\",\n \"count\":
102
- 142,\n \"name\": \"Retail\",\n \"selected\": false\n },\n
103
- \ {\n \"code\": \"109\",\n \"count\": 123,\n \"name\":
104
- \"Computer Games\",\n \"selected\": false\n },\n {\n
105
- \ \"code\": \"126\",\n \"count\": 120,\n \"name\":
106
- \"Media Production\",\n \"selected\": false\n },\n {\n
107
- \ \"code\": \"99\",\n \"count\": 117,\n \"name\":
108
- \"Design\",\n \"selected\": false\n }\n ]\n },\n
109
- \ \"code\": \"industry\",\n \"name\": \"Industry\"\n }]\n },\n
110
- \ \"numResults\": 5696\n}"
111
- http_version: '1.1'