Skip to content

Commit be2b8ef

Browse files
committed
Merge pull request ozgur#24 from abraham/comment-updates
Added method to comment on an update
2 parents 1388ae6 + a7619d8 commit be2b8ef

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

linkedin/linkedin.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -544,3 +544,13 @@ def send_invitation(self, invitation):
544544
except (requests.ConnectionError, requests.HTTPError), error:
545545
raise LinkedInHTTPError(error.message)
546546
return True
547+
548+
def comment_on_update(self, update_key, comment):
549+
comment = {'comment': comment}
550+
url = '%s/~/network/updates/key=%s/update-comments' % (ENDPOINTS.PEOPLE, update_key)
551+
try:
552+
response = self.make_request('POST', url, data=json.dumps(comment))
553+
response.raise_for_status()
554+
except (requests.ConnectionError, requests.HTTPError), error:
555+
raise LinkedInHTTPError(error.message)
556+
return True

0 commit comments

Comments
 (0)