Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Checking that the LinkedIn update has currentShare field

  • Loading branch information...
commit 0664788f94a50655c4abf03fae4a7d4623c38354 1 parent f046d50
Marek Rei authored
Showing with 4 additions and 0 deletions.
  1. +1 −0  AUTHORS.markdown
  2. +3 −0  examples/linkedin-updates.py
View
1  AUTHORS.markdown
@@ -29,4 +29,5 @@ Add yourself as a contributor!
* [Justin Barber](https://github.com/barberj)
* [Dave Stoll](https://github.com/netdude78)
+* [Marek Rei](https://github.com/marekrei)
* (your name here)
View
3  examples/linkedin-updates.py
@@ -38,6 +38,9 @@
updates = response.content
for i, update in enumerate(updates['values'], 1):
+ if 'currentShare' not in update['updateContent']['person']:
+ print '{0}. {1}'.format(i, update['updateKey'])
+ continue
current_share = update['updateContent']['person']['currentShare']
person = current_share['author']['firstName'].encode('utf-8') + ' '
person += current_share['author']['lastName'].encode('utf-8')

0 comments on commit 0664788

Please sign in to comment.
Something went wrong with that request. Please try again.