Skip to content

Commit

Permalink
Added getting a single network update by key, get_network_update
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason McInerney committed Jun 10, 2014
1 parent f63f4f9 commit 389defe
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions linkedin/linkedin.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,23 @@ def get_network_updates(self, types, member_id=None,
raise_for_error(response)
return response.json()

def get_network_update(self, types, update_key,
self_scope=True, params=None, headers=None):
url = '%s/~/network/updates/key=%s' % (ENDPOINTS.PEOPLE, str(update_key))

if not params:
params = {}

if types:
params.update({'type': types})

if self_scope is True:
params.update({'scope': 'self'})

response = self.make_request('GET', url, params=params, headers=headers)
raise_for_error(response)
return response.json()

def get_network_status(self, params=None, headers=None):
url = '%s/~/network/network-stats' % ENDPOINTS.PEOPLE
response = self.make_request('GET', url, params=params, headers=headers)
Expand Down

0 comments on commit 389defe

Please sign in to comment.