linkedin-idkmybffjill 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/linked_in/client.rb +15 -2
  3. metadata +4 -4
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.1
1
+ 0.2.2
@@ -127,14 +127,21 @@ module LinkedIn
127
127
 
128
128
  People.from_xml(get(to_uri(path, options)))
129
129
  end
130
+
131
+ def create_network_update(text)
132
+ path = "/people/~/person-activities"
133
+ post(path, network_update_to_xml(CGI.escapeHTML(text)), {"Content-Type" => "text/xml"})
134
+ end
130
135
 
131
136
  def current_status
132
137
  path = "/people/~/current-status"
133
138
  Crack::XML.parse(get(path))['current_status']
134
139
  end
135
140
 
141
+ #NOTE: this is a deprecated API. Please use the Share API,
142
+ # which is not currently implemented
136
143
  def update_status(text)
137
- path = "/people/~/current-status"
144
+ path = "/people/~/person-activities"
138
145
  put(path, status_to_xml(text))
139
146
  end
140
147
 
@@ -289,7 +296,13 @@ module LinkedIn
289
296
  path += "~"
290
297
  end
291
298
  end
292
-
299
+
300
+ def network_update_to_xml(update)
301
+ %Q{<activity locale="en_US">
302
+ <content-type>linkedin-html</content-type>
303
+ <body>#{update}</body></activity>}
304
+ end
305
+
293
306
  def status_to_xml(status)
294
307
  %Q{<?xml version="1.0" encoding="UTF-8"?>
295
308
  <current-status>#{status}</current-status>}
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: linkedin-idkmybffjill
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 1
10
- version: 0.2.1
9
+ - 2
10
+ version: 0.2.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Wynn Netherland, idkmybffjill
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-08-26 00:00:00 -07:00
18
+ date: 2011-04-08 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency