cl_linkedin 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. data/.autotest +14 -0
  2. data/.document +5 -0
  3. data/.gitignore +25 -0
  4. data/Gemfile +3 -0
  5. data/LICENSE +20 -0
  6. data/README.markdown +80 -0
  7. data/Rakefile +41 -0
  8. data/VERSION +1 -0
  9. data/changelog.markdown +76 -0
  10. data/examples/authenticate.rb +21 -0
  11. data/examples/network.rb +12 -0
  12. data/examples/profile.rb +12 -0
  13. data/examples/status.rb +9 -0
  14. data/lib/linked_in/api_standard_profile_request.rb +17 -0
  15. data/lib/linked_in/authorization_helpers.rb +48 -0
  16. data/lib/linked_in/base.rb +13 -0
  17. data/lib/linked_in/birthdate.rb +21 -0
  18. data/lib/linked_in/client.rb +154 -0
  19. data/lib/linked_in/company.rb +11 -0
  20. data/lib/linked_in/connections.rb +16 -0
  21. data/lib/linked_in/country.rb +9 -0
  22. data/lib/linked_in/current_share.rb +56 -0
  23. data/lib/linked_in/education.rb +41 -0
  24. data/lib/linked_in/error.rb +21 -0
  25. data/lib/linked_in/group.rb +32 -0
  26. data/lib/linked_in/im_account.rb +28 -0
  27. data/lib/linked_in/languages.rb +28 -0
  28. data/lib/linked_in/likes.rb +23 -0
  29. data/lib/linked_in/location.rb +13 -0
  30. data/lib/linked_in/message.rb +20 -0
  31. data/lib/linked_in/network.rb +12 -0
  32. data/lib/linked_in/patents.rb +42 -0
  33. data/lib/linked_in/people.rb +18 -0
  34. data/lib/linked_in/person.rb +7 -0
  35. data/lib/linked_in/phone_number.rb +29 -0
  36. data/lib/linked_in/position.rb +46 -0
  37. data/lib/linked_in/profile.rb +94 -0
  38. data/lib/linked_in/publications.rb +40 -0
  39. data/lib/linked_in/recipient.rb +7 -0
  40. data/lib/linked_in/recipients.rb +18 -0
  41. data/lib/linked_in/recommendations.rb +30 -0
  42. data/lib/linked_in/request_helpers.rb +78 -0
  43. data/lib/linked_in/short_profile.rb +13 -0
  44. data/lib/linked_in/skill.rb +33 -0
  45. data/lib/linked_in/to_xml_helpers.rb +53 -0
  46. data/lib/linked_in/twitter_account.rb +28 -0
  47. data/lib/linked_in/update.rb +23 -0
  48. data/lib/linked_in/url_resource.rb +26 -0
  49. data/lib/linkedin.rb +83 -0
  50. data/linkedin.gemspec +49 -0
  51. data/spec/cases/client_spec.rb +230 -0
  52. data/spec/cases/linkedin_spec.rb +37 -0
  53. data/spec/cases/oauth_spec.rb +109 -0
  54. data/spec/client_shared_examples.orig.rb +91 -0
  55. data/spec/client_shared_examples.rb +104 -0
  56. data/spec/fixtures/403.xml +7 -0
  57. data/spec/fixtures/404.xml +7 -0
  58. data/spec/fixtures/blank.xml +0 -0
  59. data/spec/fixtures/connections.xml +3733 -0
  60. data/spec/fixtures/likes.xml +18 -0
  61. data/spec/fixtures/mailbox_items.xml +16 -0
  62. data/spec/fixtures/network_status_with_group.xml +44 -0
  63. data/spec/fixtures/network_statuses.xml +317 -0
  64. data/spec/fixtures/picture_updates.xml +117 -0
  65. data/spec/fixtures/profile.xml +9 -0
  66. data/spec/fixtures/profile_full.orig.xml +3909 -0
  67. data/spec/fixtures/profile_full.xml +395 -0
  68. data/spec/fixtures/profile_with_positions.xml +79 -0
  69. data/spec/fixtures/search.xml +538 -0
  70. data/spec/fixtures/shares.xml +12 -0
  71. data/spec/fixtures/status.xml +2 -0
  72. data/spec/spec_helper.rb +58 -0
  73. metadata +242 -0
@@ -0,0 +1,395 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <person>
3
+ <id>tb8GkEgKA8</id>
4
+ <first-name>Shaun</first-name>
5
+ <last-name>Russell</last-name>
6
+ <headline>UX Engineer at Caplinked</headline>
7
+ <location>
8
+ <name>Greater Los Angeles Area</name>
9
+ <country>
10
+ <code>us</code>
11
+ </country>
12
+ </location>
13
+ <industry>Internet</industry>
14
+ <distance>0</distance>
15
+ <connections total="3" count="3" start="0">
16
+ <person>
17
+ <id>MbS1b4MPwd</id>
18
+ <first-name>Andrew</first-name>
19
+ <last-name>Aubee</last-name>
20
+ <headline>Sonar Systems Engineer at Electric Boat</headline>
21
+ <picture-url>http://media.linkedin.com/mpr/mprx/0_OSEuUBSXBi1Ow_Y2pmW0UqSLv3Lad5Y2yfY1Uqo4EXAO93Wutws8zNY9U75AECxh0metNPqwBbVm</picture-url>
22
+ <api-standard-profile-request>
23
+ <url>http://api.linkedin.com/v1/people/MbS1b4MPwd</url>
24
+ <headers total="1">
25
+ <http-header>
26
+ <name>x-li-auth-token</name>
27
+ <value>name:cnK7</value>
28
+ </http-header>
29
+ </headers>
30
+ </api-standard-profile-request>
31
+ <site-standard-profile-request>
32
+ <url>http://www.linkedin.com/profile?viewProfile=&key=34580702&authToken=cnK7&authType=name&trk=api*a108281*s116823*</url>
33
+ </site-standard-profile-request>
34
+ <location>
35
+ <name>New London/Norwich, Connecticut Area</name>
36
+ <country>
37
+ <code>us</code>
38
+ </country>
39
+ </location>
40
+ <industry>Defense & Space</industry>
41
+ </person>
42
+ <person>
43
+ <id>_SZtIYj7xP</id>
44
+ <first-name>Darren</first-name>
45
+ <last-name>Bacon</last-name>
46
+ <headline>Concept Designer</headline>
47
+ <picture-url>http://media.linkedin.com/mpr/mprx/0_-RFTK1tdPtCPm9AttsBOKK-U1qA-m98tKM1OKlrR2ALGltB-YjcSOAkzjslDDATY14Lxx9GxJIHG</picture-url>
48
+ <api-standard-profile-request>
49
+ <url>http://api.linkedin.com/v1/people/_SZtIYj7xP</url>
50
+ <headers total="1">
51
+ <http-header>
52
+ <name>x-li-auth-token</name>
53
+ <value>name:eLjh</value>
54
+ </http-header>
55
+ </headers>
56
+ </api-standard-profile-request>
57
+ <site-standard-profile-request>
58
+ <url>http://www.linkedin.com/profile?viewProfile=&key=52064714&authToken=eLjh&authType=name&trk=api*a108281*s116823*</url>
59
+ </site-standard-profile-request>
60
+ <location>
61
+ <name>San Francisco Bay Area</name>
62
+ <country>
63
+ <code>us</code>
64
+ </country>
65
+ </location>
66
+ <industry>Motion Pictures and Film</industry>
67
+ </person>
68
+ <person>
69
+ <id>721os9rXqI</id>
70
+ <first-name>Carter</first-name>
71
+ <last-name>Winton</last-name>
72
+ <headline>Talent Acquisition at Q</headline>
73
+ <picture-url>http://media.linkedin.com/mpr/mprx/0_OurBLBRbaHBhLUw4Y2teLzeVuW8aFOo4ywXHLqEbPuNO4sjZtEhUwNOWCFhAkJIq07-WoPqKcu-g</picture-url>
74
+ <api-standard-profile-request>
75
+ <url>http://api.linkedin.com/v1/people/721os9rXqI</url>
76
+ <headers total="1">
77
+ <http-header>
78
+ <name>x-li-auth-token</name>
79
+ <value>name:rQNh</value>
80
+ </http-header>
81
+ </headers>
82
+ </api-standard-profile-request>
83
+ <site-standard-profile-request>
84
+ <url>http://www.linkedin.com/profile?viewProfile=&key=11368764&authToken=rQNh&authType=name&trk=api*a108281*s116823*</url>
85
+ </site-standard-profile-request>
86
+ <location>
87
+ <name>Greater Los Angeles Area</name>
88
+ <country>
89
+ <code>us</code>
90
+ </country>
91
+ </location>
92
+ <industry>Information Technology and Services</industry>
93
+ </person>
94
+ </connections>
95
+ <num-connections>86</num-connections>
96
+ <num-connections-capped>false</num-connections-capped>
97
+ <summary>Highly motivated, well organized, self starter.</summary>
98
+ <specialties>HTML5, CSS3, Javascript (jQuery), PHP, Python (Django), Ruby on Rails, Wordpress, SEO</specialties>
99
+ <proposal-comments />
100
+ <associations>IEEE</associations>
101
+ <honors>w3c 2004</honors>
102
+ <interests>coding, websites, spearfishing, investing, politics</interests>
103
+ <positions total="3">
104
+ <position>
105
+ <id>174050787</id>
106
+ <title>UX Engineer</title>
107
+ <summary />
108
+ <start-date>
109
+ <year>2011</year>
110
+ <month>2</month>
111
+ </start-date>
112
+ <is-current>true</is-current>
113
+ <company>
114
+ <id>739542</id>
115
+ <name>Caplinked</name>
116
+ <type>Privately Held</type>
117
+ <industry>Internet</industry>
118
+ </company>
119
+ </position>
120
+ <position>
121
+ <id>69100750</id>
122
+ <title>Project Manager</title>
123
+ <summary>Manage all stages of web development - from conception to completion. Interface with clients, programmers, and graphic artists.
124
+
125
+ Setup, manage and maintain linux and windows hosting environments.</summary>
126
+ <start-date>
127
+ <year>2008</year>
128
+ <month>2</month>
129
+ </start-date>
130
+ <end-date>
131
+ <year>2011</year>
132
+ <month>3</month>
133
+ </end-date>
134
+ <is-current>false</is-current>
135
+ <company>
136
+ <id>1061173</id>
137
+ <name>Still Water Interactive</name>
138
+ <size>1-10 employees</size>
139
+ <type>Privately Held</type>
140
+ <industry>Internet</industry>
141
+ </company>
142
+ </position>
143
+ <position>
144
+ <id>69348968</id>
145
+ <title>Manager, Server Administrator, Computer Technician, Web Developer, SEO Expert</title>
146
+ <summary>I managed a small 'jack of all trades' computer business. We provided a variety of services:
147
+
148
+ websites, hosting, SEO, graphic design, house calls, custom machines, digitized audio, tapes and photos.</summary>
149
+ <start-date>
150
+ <year>2001</year>
151
+ <month>8</month>
152
+ </start-date>
153
+ <end-date>
154
+ <year>2008</year>
155
+ <month>2</month>
156
+ </end-date>
157
+ <is-current>false</is-current>
158
+ <company>
159
+ <name>Rhode Island PC</name>
160
+ <industry>Internet</industry>
161
+ </company>
162
+ </position>
163
+ </positions>
164
+ <publications total="1">
165
+ <publication>
166
+ <id>18</id>
167
+ <title>Test publication</title>
168
+ <date>
169
+ <year>2009</year>
170
+ <month>1</month>
171
+ <day>2</day>
172
+ </date>
173
+ </publication>
174
+ </publications>
175
+ <patents total="1">
176
+ <patent>
177
+ <id>16</id>
178
+ <title>Test Patent</title>
179
+ <date>
180
+ <year>2006</year>
181
+ <month>2</month>
182
+ <day>3</day>
183
+ </date>
184
+ </patent>
185
+ </patents>
186
+ <languages total="2">
187
+ <language>
188
+ <id>11</id>
189
+ <language>
190
+ <name>English</name>
191
+ </language>
192
+ </language>
193
+ <language>
194
+ <id>12</id>
195
+ <language>
196
+ <name>Spanish</name>
197
+ </language>
198
+ </language>
199
+ </languages>
200
+ <skills total="7">
201
+ <skill>
202
+ <id>1</id>
203
+ <skill>
204
+ <name>Agile Project Management</name>
205
+ </skill>
206
+ </skill>
207
+ <skill>
208
+ <id>2</id>
209
+ <skill>
210
+ <name>JQuery</name>
211
+ </skill>
212
+ </skill>
213
+ <skill>
214
+ <id>3</id>
215
+ <skill>
216
+ <name>Advanced CSS</name>
217
+ </skill>
218
+ </skill>
219
+ <skill>
220
+ <id>4</id>
221
+ <skill>
222
+ <name>HTML5</name>
223
+ </skill>
224
+ </skill>
225
+ <skill>
226
+ <id>5</id>
227
+ <skill>
228
+ <name>Ruby on Rails</name>
229
+ </skill>
230
+ </skill>
231
+ <skill>
232
+ <id>6</id>
233
+ <skill>
234
+ <name>PHP</name>
235
+ </skill>
236
+ </skill>
237
+ <skill>
238
+ <id>7</id>
239
+ <skill>
240
+ <name>Photoshop</name>
241
+ </skill>
242
+ </skill>
243
+ </skills>
244
+ <certifications total="1">
245
+ <certification>
246
+ <id>8</id>
247
+ <name>Test Certi</name>
248
+ </certification>
249
+ </certifications>
250
+ <educations total="1">
251
+ <education>
252
+ <id>31352097</id>
253
+ <school-name>University of Rhode Island</school-name>
254
+ <notes>Began as a Computer Engineering major and later switched to Biomedical Engineering in hope of finding something more rewarding.</notes>
255
+ <activities />
256
+ <degree>B.S.</degree>
257
+ <field-of-study>Biomedical Engineering</field-of-study>
258
+ <start-date>
259
+ <year>2002</year>
260
+ <month>8</month>
261
+ </start-date>
262
+ <end-date>
263
+ <year>2006</year>
264
+ <month>5</month>
265
+ </end-date>
266
+ </education>
267
+ </educations>
268
+ <three-current-positions total="1">
269
+ <position>
270
+ <id>174050787</id>
271
+ <title>UX Engineer</title>
272
+ <summary />
273
+ <start-date>
274
+ <year>2011</year>
275
+ <month>2</month>
276
+ </start-date>
277
+ <is-current>true</is-current>
278
+ <company>
279
+ <id>739542</id>
280
+ <name>Caplinked</name>
281
+ <type>Privately Held</type>
282
+ <industry>Internet</industry>
283
+ </company>
284
+ </position>
285
+ </three-current-positions>
286
+ <three-past-positions total="2">
287
+ <position>
288
+ <id>69100750</id>
289
+ <title>Project Manager</title>
290
+ <summary>Manage all stages of web development - from conception to completion. Interface with clients, programmers, and graphic artists.
291
+
292
+ Setup, manage and maintain linux and windows hosting environments.</summary>
293
+ <start-date>
294
+ <year>2008</year>
295
+ <month>2</month>
296
+ </start-date>
297
+ <end-date>
298
+ <year>2011</year>
299
+ <month>3</month>
300
+ </end-date>
301
+ <is-current>false</is-current>
302
+ <company>
303
+ <id>1061173</id>
304
+ <name>Still Water Interactive</name>
305
+ <size>1-10 employees</size>
306
+ <type>Privately Held</type>
307
+ <industry>Internet</industry>
308
+ </company>
309
+ </position>
310
+ <position>
311
+ <id>69348968</id>
312
+ <title>Manager, Server Administrator, Computer Technician, Web Developer, SEO Expert</title>
313
+ <summary>I managed a small 'jack of all trades' computer business. We provided a variety of services:
314
+
315
+ websites, hosting, SEO, graphic design, house calls, custom machines, digitized audio, tapes and photos.</summary>
316
+ <start-date>
317
+ <year>2001</year>
318
+ <month>8</month>
319
+ </start-date>
320
+ <end-date>
321
+ <year>2008</year>
322
+ <month>2</month>
323
+ </end-date>
324
+ <is-current>false</is-current>
325
+ <company>
326
+ <name>Rhode Island PC</name>
327
+ <industry>Internet</industry>
328
+ </company>
329
+ </position>
330
+ </three-past-positions>
331
+ <num-recommenders>1</num-recommenders>
332
+ <recommendations-received total="1">
333
+ <recommendation>
334
+ <id>26870582</id>
335
+ <recommendation-type>
336
+ <code>colleague</code>
337
+ </recommendation-type>
338
+ <recommendation-text>You definitely want Shaun on your team. Shaun is a web development expert in every sense of the word. He is professional, courteous to clients, and has an encyclopedic knowledge of code. He is also very logical, intelligent, and knows the quickest way to solve a problem. With his knowledge of servers and business principles he kept Still-Water active in many crises situations, and his positive contributions to a project cannot be underestimated. Hire this man without hesitation.</recommendation-text>
339
+ <recommender>
340
+ <id>xxXLq8_LIb</id>
341
+ <first-name>Derek</first-name>
342
+ <last-name>Padula</last-name>
343
+ </recommender>
344
+ </recommendation>
345
+ </recommendations-received>
346
+ <phone-numbers total="1">
347
+ <phone-number>
348
+ <phone-type>mobile</phone-type>
349
+ <phone-number>+14014444444</phone-number>
350
+ </phone-number>
351
+ </phone-numbers>
352
+ <im-accounts total="1">
353
+ <im-account>
354
+ <im-account-type>gtalk</im-account-type>
355
+ <im-account-name>shaun.d.russell</im-account-name>
356
+ </im-account>
357
+ </im-accounts>
358
+ <twitter-accounts total="1">
359
+ <twitter-account>
360
+ <provider-account-id>166369106</provider-account-id>
361
+ <provider-account-name>shaunrussell</provider-account-name>
362
+ </twitter-account>
363
+ </twitter-accounts>
364
+ <date-of-birth>
365
+ <year>1984</year>
366
+ <month>3</month>
367
+ <day>13</day>
368
+ </date-of-birth>
369
+ <main-address>27 Westminster #107
370
+ Venice, CA 90401</main-address>
371
+ <member-url-resources total="2">
372
+ <member-url>
373
+ <url>http://www.shaunrussell.com/curriculum-vitae</url>
374
+ <name>Resume</name>
375
+ </member-url>
376
+ <member-url>
377
+ <url>http://www.caplinked.com/</url>
378
+ <name>Company Website</name>
379
+ </member-url>
380
+ </member-url-resources>
381
+ <picture-url>http://media.linkedin.com/mpr/mprx/0_gPLYktciY2CTrzVcjz9SkANfYulmpzUc0AA3krFxTW5YiluBAvztoKPlKGAlx-sRyKF8wBJz74tD</picture-url>
382
+ <site-standard-profile-request>
383
+ <url>http://www.linkedin.com/profile?viewProfile=&key=42992594&authToken=Nw3h&authType=name&trk=api*a108281*s116823*</url>
384
+ </site-standard-profile-request>
385
+ <api-standard-profile-request>
386
+ <url>http://api.linkedin.com/v1/people/tb8GkEgKA8</url>
387
+ <headers total="1">
388
+ <http-header>
389
+ <name>x-li-auth-token</name>
390
+ <value>name:Nw3h</value>
391
+ </http-header>
392
+ </headers>
393
+ </api-standard-profile-request>
394
+ <public-profile-url>http://www.linkedin.com/in/shauner</public-profile-url>
395
+ </person>
@@ -0,0 +1,79 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2
+ <person>
3
+ <first-name>Wynn</first-name>
4
+ <last-name>Netherland</last-name>
5
+ <headline>Pixel Pusher at Orrka</headline>
6
+ <relation-to-viewer>
7
+ <distance>0</distance>
8
+ </relation-to-viewer>
9
+ <positions total="4">
10
+ <position>
11
+ <id>95092599</id>
12
+ <title>Founder</title>
13
+ <summary></summary>
14
+ <start-date>
15
+ <year>2009</year>
16
+ <month>10</month>
17
+ </start-date>
18
+ <is-current>true</is-current>
19
+ <company>
20
+ <name>Orrka</name>
21
+ </company>
22
+ </position>
23
+ <position>
24
+ <id>21901644</id>
25
+ <title>Founder</title>
26
+ <summary>- Ruby on Rails development
27
+ - Web application development
28
+ - Web-based customer satisfaction tools
29
+ - Hosted web applications
30
+ - User Interface design and front end development</summary>
31
+ <start-date>
32
+ <year>2000</year>
33
+ <month>9</month>
34
+ </start-date>
35
+ <end-date>
36
+ <year>2009</year>
37
+ <month>11</month>
38
+ </end-date>
39
+ <is-current>false</is-current>
40
+ <company>
41
+ <name>Squeejee</name>
42
+ </company>
43
+ </position>
44
+ <position>
45
+ <id>4891362</id>
46
+ <title>Solution Architect</title>
47
+ <summary>Part of architecture team that develops worldwide software application frameworks for web storefronts and desktop call center applications using Microsoft .NET technology.
48
+ Includes analyzing requirements, designing framework APIs, ensuring consistency and simplicity to enable regional extension.
49
+ Evangelism of project throughout enterprise and partnering with other global teams to deliver the most robust and efficient platform for our business customers.
50
+ Working closely with Microsoft consultants onstaff and in Redmond in order to influence future versions of Microsoft development products.</summary>
51
+ <start-date>
52
+ <year>2004</year>
53
+ <month>10</month>
54
+ </start-date>
55
+ <end-date>
56
+ <year>2007</year>
57
+ <month>6</month>
58
+ </end-date>
59
+ <is-current>false</is-current>
60
+ <company>
61
+ <name>Hewlett-Packard</name>
62
+ </company>
63
+ </position>
64
+ <position>
65
+ <id>4987329</id>
66
+ <title>Developer</title>
67
+ <start-date>
68
+ <year>1998</year>
69
+ </start-date>
70
+ <end-date>
71
+ <year>2000</year>
72
+ </end-date>
73
+ <is-current>false</is-current>
74
+ <company>
75
+ <name>Shell Services International</name>
76
+ </company>
77
+ </position>
78
+ </positions>
79
+ </person>