{ "info": { "author": "Mike Helmick", "author_email": "mikehelmick@me.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Topic :: Communications :: Chat", "Topic :: Internet", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "#Overview\nHere's another library based on the LinkedIn API, OAuth and JSON responses.\n\nHope this documentation explains everything you need to get started. Any questions feel free to email me or inbox me.\n\n#Install through pip...\n```\npip install linkedin\n```\n\nIf `linkedin` is already installed, pass `-I` to your install:\n```\npip install -I linkedin\n```\n\n#Import LinkedIn library\n```\nfrom linkedin import *\n```\n\n#Authorization URL\n\n*Get an authorization url for your user*\n\n```python\nl = LinkedinAPI(api_key='*your app key*',\n api_secret='*your app secret*',\n callback_url='http://www.example.com/callback/',\n permissions=[\"r_network\"])\n\nauth_props = l.get_authentication_tokens()\nauth_url = auth_props['auth_url']\n\n#Store this token in a session or something for later use in the next step.\noauth_token_secret = auth_props['oauth_token_secret']\n\nprint 'Connect with LinkedIn via: %s' % auth_url\n```\nIf you leave callback_url blank, you can get the oauth_verifier from the web browser. It is a five-digit integer.\n\nThe permissions parameter is optional. It can be a list or string. The [list of permissions](https://developer.linkedin.com/documents/authentication) is in the LinkedIn API documentation.\n\nOnce you click \"Allow\" be sure that there is a URL set up to handle getting finalized tokens and possibly adding them to your database to use their information at a later date. \\n\\n'\n\n#Handling the callback\n```python\n# In Django, you'd do something like\n# oauth_token = request.GET.get('oauth_token')\n# oauth_verifier = request.GET.get('oauth_verifier')\n\noauth_token = *Grab oauth token from URL*\noauth_verifier = *Grab oauth verifier from URL*\n\n#Initiate the LinkedIn class in your callback.\nl = LinkedinAPI(api_key='*your app key*',\n api_secret='*your app secret*',\n oauth_token=oauth_token,\n oauth_token_secret=session['linkedin_session_keys']['oauth_token_secret'])\n\nauthorized_tokens = l.get_access_token(oauth_verifier)\n\nfinal_oauth_token = authorized_tokens['oauth_token']\nfinal_oauth_token_secret = authorized_tokens['oauth_token_secret']\n\n# Save those tokens to the database for a later use?\n```\n\n#Getting some user information, search results, network updates.\n```python\n# Get the final tokens from the database or wherever you have them stored\n\nl = LinkedinAPI(api_key = '*your app key*',\n api_secret = '*your app secret*',\n oauth_token=final_tokens['oauth_token'],\n oauth_token_secret=final_tokens['oauth_token_secret'])\n\n# Get your profile information (first name, last name)\nprofile = l.get('people/~', fields='first-name,last-name')\nprint profile\n\n# Get search results\nsearch = l.get('people-search', params={'keywords':'Hacker'})\nprint search\n\n# Get your network updates\nfeed = l.get('people/~/network/updates')\nprint feed\n```\n\n# POST a network update\n```python\nshare_content = { \n \"comment\": \"Posting from the API using JSON\", \n \"content\": { \n \"title\": \"A title for your share\", \n \"submitted-url\": \"http://www.linkedin.com\", \n \"submitted-image-url\": \"http://lnkd.in/Vjc5ec\" \n }, \n \"visibility\": { \n \"code\": \"anyone\" \n } \n}\n\nshare_update = l.post('people/~/shares', params=share_content)\nprint share_update\n```", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/michaelhelmick/linkedin/zipball/master", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/michaelhelmick/linkedin/", "keywords": "python linkedin json oauth api", "license": "MIT License", "maintainer": null, "maintainer_email": null, "name": "linkedin", "package_url": "https://pypi.org/project/linkedin/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/linkedin/", "project_urls": { "Download": "https://github.com/michaelhelmick/linkedin/zipball/master", "Homepage": "https://github.com/michaelhelmick/linkedin/" }, "release_url": "https://pypi.org/project/linkedin/0.1.5/", "requires_dist": null, "requires_python": null, "summary": "A Python Library to interface with LinkedIn API, OAuth and JSON responses", "version": "0.1.5" }, "last_serial": 794220, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "01fff18d7bb641eff34c6217a38294ca", "sha256": "330b9e97599b60e08adf754aa544d5050fe3759a5390fd0ae3743d221ee1f28d" }, "downloads": -1, "filename": "linkedin-0.1.0.tar.gz", "has_sig": false, "md5_digest": "01fff18d7bb641eff34c6217a38294ca", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4168, "upload_time": "2012-01-18T21:38:11", "url": "https://files.pythonhosted.org/packages/32/3b/3957f11feeffb5aaddbcec94230d2920bba6e16902195c0b205ab96dc046/linkedin-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "9bf72fd76224f3a1a125ac4fabfedaaf", "sha256": "44ea23b82dfbd61d364e5d2fb023021a1e225c240c0bd9b06dc7f9c85506695c" }, "downloads": -1, "filename": "linkedin-0.1.1.tar.gz", "has_sig": false, "md5_digest": "9bf72fd76224f3a1a125ac4fabfedaaf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4158, "upload_time": "2012-02-02T04:50:56", "url": "https://files.pythonhosted.org/packages/69/94/d020637bc6980cc4aa5cfdff47606d327aaf759f62fb92359f1d16772d93/linkedin-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "626e1a2e13e31634b1352117797c498f", "sha256": "3d68aa215519a44ed4abc29f7b31731c7977faf78e2bc093addb1b2a9869fca4" }, "downloads": -1, "filename": "linkedin-0.1.2.tar.gz", "has_sig": false, "md5_digest": "626e1a2e13e31634b1352117797c498f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4124, "upload_time": "2012-02-02T05:10:20", "url": "https://files.pythonhosted.org/packages/cf/00/cff98116ebe5dad00c24cd46f21bafbafa3dfe0fdf61c60873819626d112/linkedin-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "4c1edb0d9d7635158de07bf9487e3ac1", "sha256": "6d81b1e70f4181ccc7564906986a399f68267996fd08b50aa5de7969da93a0f0" }, "downloads": -1, "filename": "linkedin-0.1.3.tar.gz", "has_sig": false, "md5_digest": "4c1edb0d9d7635158de07bf9487e3ac1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4500, "upload_time": "2013-02-11T21:12:13", "url": "https://files.pythonhosted.org/packages/7e/c8/a66176a0390c23564ff154fdc021edc37209f124bd276832f28fde03d958/linkedin-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "49b8f03f69c79ce6133c92b1ff76d15a", "sha256": "dc3a60416e125a9eed2a022ce83d119614cdba6bebc6db7813b3bcc73ccaad64" }, "downloads": -1, "filename": "linkedin-0.1.4.tar.gz", "has_sig": false, "md5_digest": "49b8f03f69c79ce6133c92b1ff76d15a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4597, "upload_time": "2013-02-13T20:10:10", "url": "https://files.pythonhosted.org/packages/cf/28/5917f35dd3b2fc415e3e34c78b2d1e639be13bc5249c0e8566c96f1dfa4c/linkedin-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "ef21edd3c1ffc9aaca53ce71faa8a1c3", "sha256": "e56760a6506a111eb66cd96b46e1971130d2249f2a0f3b594d12fab0013cc4b4" }, "downloads": -1, "filename": "linkedin-0.1.5.tar.gz", "has_sig": false, "md5_digest": "ef21edd3c1ffc9aaca53ce71faa8a1c3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4659, "upload_time": "2013-03-21T19:34:09", "url": "https://files.pythonhosted.org/packages/c3/e5/aed71595c0d7619fb72954565b452acbeb289da1cbc2161f7b1a87d827be/linkedin-0.1.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ef21edd3c1ffc9aaca53ce71faa8a1c3", "sha256": "e56760a6506a111eb66cd96b46e1971130d2249f2a0f3b594d12fab0013cc4b4" }, "downloads": -1, "filename": "linkedin-0.1.5.tar.gz", "has_sig": false, "md5_digest": "ef21edd3c1ffc9aaca53ce71faa8a1c3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4659, "upload_time": "2013-03-21T19:34:09", "url": "https://files.pythonhosted.org/packages/c3/e5/aed71595c0d7619fb72954565b452acbeb289da1cbc2161f7b1a87d827be/linkedin-0.1.5.tar.gz" } ] }