{ "info": { "author": "Matt Snider", "author_email": "admin@mattsnider.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Introduction\n============\n\nThe LinkedIn-API-JSON-Client library provides an abstract interface for working with the LinkedIn API. My goal is that you should not have to understand oauth or much of the details of the LinkedIn client library (if setup correctly, it should just work).\n\nAll functions and classes are documented inline. If you have additional questions, I can be reached on github or at admin@mattsnider.com.\n\nDisclaimer\n==========\n\nThis package is loosely based on the LinkedIn-Client-Library by Aaron Brenzel. The original library was written for XML support, but LinkedIn now supports JSON responses, which IMHO provides a cleaner interface for use with python. I have tried to preserve the same general architecture and api functions, while adding some new ones, improving error management, and making the API more DRY.\n\nGetting started\n===============\n\nStandard stuff applies to install. Use PIP to install with dependencies:\n\n pip install linkedin-api-json-client\n\nOr install from the command line:\n\n python setup.py install\n\nIf you install from the command line, you will need to also install the oauth2, simplejson, and httplib2 packages.\n\nThis package is intended for use with the LinkedIn API. You must supply your own API key for this library to work. Once you have an API key from LinkedIn, the syntax for instantiating an API client object is this::\n\n my_key = 'mysecretkey'\n my_secret = 'mysecretsecret'\n li_client = LinkedInJsonAPI(my_key, my_secret)\n\nFrom there, you can obtain request tokens, authorization urls, access tokens, and actual LinkedIn data through the LinkedInJsonAPI object's methods. The object will handle signing requests, url formatting, and JSON parsing for you.\n\nDependencies\n============\n\nCurrently, the API is dependent on oauth2, httplib2 (for oauth2), and simplejson. All can easily be obtained using Python Package Index, and will be automatically included, if you use PIP to install.\n\nAuthorization Guide\n===================\n\nOauth authorization is a multi-step process. When a user wants to authorize your app, you must first create an authorization URL, indicating which permissions your application needs, and redirect the user there::\n\n from urllib import urlencode\n from linkedin_json_client.constants import LinkedInScope\n try:\n request_token_dict = li_client.get_request_token(scope=[\n LinkedInScope.BASIC_PROFILE, LinkedInScope.EMAIL_ADDRESS])\n url = '%s?%s' % (li_client.authorize_path, urlencode(request_token_dict))\n # store your request token in the user session for use in callback\n request.session['li_request_token'] = request_token_dict\n # REDIRECT USER TO url\n except (HTTPError, socket.error):\n # failed to connect to LinkedIn, handle this in your application\n\nWhen you setup your application on LinkedIn, you specified a callback URL for authorization. That URL should compare the stored request token against an oauth verifier token::\n\n oauth_verifier = request.GET.get('oauth_verifier')\n request_token = request.session.get('li_request_token')\n\n oauth_problem = request.GET.get('oauth_problem')\n if oauth_problem or request_token is None:\n if oauth_problem == 'user_refused':\n # user refused auth, handle in your application\n # some other problem, handle in your application\n else:\n access_token = li_client.get_access_token(request_token, oauth_verifier)\n # user successfully authorized, store this access_token and associate with the user for use with API\n\nOnce you have an access token, you may make calls against the API::\n\n from linkedin_json_client.constants import BasicProfileFields, BasicProfileSelectors\n json_object = li_client.get_user_profile(access_token, [BasicProfileSelectors.FIRST_NAME, BasicProfileSelectors.LAST_NAME, BasicProfileSelectors.ID])\n\n json_object[BasicProfileFields.ID]\n json_object[BasicProfileFields.FIRST_NAME]\n json_object[BasicProfileFields.LAST_NAME]\n\nIf something goes wrong with any API calls, except authorization, a LinkedInApiJsonClientError is raised, so it is best to always wrap API calls in a try statement and handle the error in your app::\n\n try:\n # api call\n except LinkedInApiJsonClientError, e:\n print e\n\nTodo\n====\n\n#. Search support\n#. Test coverage where the LinkedIn API is mocked\n#. Build docs from comments\n#. Test coverage against the LinkedIn API, will require test users with fairly complete profiles. Haven't been able to get help from LinkedIn to create test data, so if anyone has any ideas here, let me know.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/mattsnider/LinkedIn-API-JSON-Client", "keywords": "linkedin,api", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "linkedin-api-json-client", "package_url": "https://pypi.org/project/linkedin-api-json-client/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/linkedin-api-json-client/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/mattsnider/LinkedIn-API-JSON-Client" }, "release_url": "https://pypi.org/project/linkedin-api-json-client/0.2.6/", "requires_dist": null, "requires_python": null, "summary": "Python API for interacting with LinkedIn API.", "version": "0.2.6" }, "last_serial": 705312, "releases": { "0.2.1": [ { "comment_text": "", "digests": { "md5": "0d4627be21ed7ef12982af8583484ea2", "sha256": "9d4acf47f97cb32b7e1b12a5e4a6be56173dcc63ae427c9b206e85159eab329a" }, "downloads": -1, "filename": "linkedin-api-json-client-0.2.1.macosx-10.7-intel.exe", "has_sig": false, "md5_digest": "0d4627be21ed7ef12982af8583484ea2", "packagetype": "bdist_wininst", "python_version": "any", "requires_python": null, "size": 79934, "upload_time": "2012-11-02T19:26:27", "url": "https://files.pythonhosted.org/packages/98/8e/58d4257436ed1642474f41e865985d3cac9a67716d330b044de89b530d06/linkedin-api-json-client-0.2.1.macosx-10.7-intel.exe" }, { "comment_text": "", "digests": { "md5": "34dd6c7b822bb6635b369610ebe5190e", "sha256": "fe6fcf9afd96faef593932ff07a39b1f9cd1b28a26992ab6b4b393da786bf970" }, "downloads": -1, "filename": "linkedin-api-json-client-0.2.1.tar.gz", "has_sig": false, "md5_digest": "34dd6c7b822bb6635b369610ebe5190e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12204, "upload_time": "2012-11-02T19:26:25", "url": "https://files.pythonhosted.org/packages/e4/dd/3e6a733a7db65c11c3f3a50434e5c18d1dc12566de17df6e820a3e7cb0ac/linkedin-api-json-client-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "a8df11e9dc06078866acb4ceb7dd4777", "sha256": "6bb9bbc22c9764891aba7011c37dc2b4bb102565bf5eecce348399379da42c1e" }, "downloads": -1, "filename": "linkedin-api-json-client-0.2.2.macosx-10.7-intel.exe", "has_sig": false, "md5_digest": "a8df11e9dc06078866acb4ceb7dd4777", "packagetype": "bdist_wininst", "python_version": "any", "requires_python": null, "size": 79853, "upload_time": "2012-11-02T19:33:34", "url": "https://files.pythonhosted.org/packages/a4/c6/68fa179c1d46b66b9a53f9fb5b7bbe549130fcd3abe8ce96da7aafbc431d/linkedin-api-json-client-0.2.2.macosx-10.7-intel.exe" }, { "comment_text": "", "digests": { "md5": "212c5ae7dcf47688c4437d0cc05c35f2", "sha256": "aad8fb27151061dd8661104e2b3e7f74968485719e52a3a9c3c0e887085e41e7" }, "downloads": -1, "filename": "linkedin-api-json-client-0.2.2.tar.gz", "has_sig": false, "md5_digest": "212c5ae7dcf47688c4437d0cc05c35f2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12150, "upload_time": "2012-11-02T19:33:31", "url": "https://files.pythonhosted.org/packages/26/05/ebca9ef97cc6aca7a310d89a9e23c5964bfcf5953461659bd1d41c890586/linkedin-api-json-client-0.2.2.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "35fe2690c06f9d6e7671428e18575d1f", "sha256": "7a84159e1338449982534429145f92e954f5db9eaf67add478a66d6e566ae805" }, "downloads": -1, "filename": "linkedin-api-json-client-0.2.3.macosx-10.7-intel.exe", "has_sig": false, "md5_digest": "35fe2690c06f9d6e7671428e18575d1f", "packagetype": "bdist_wininst", "python_version": "any", "requires_python": null, "size": 79856, "upload_time": "2012-11-02T19:40:01", "url": "https://files.pythonhosted.org/packages/1e/21/e9c395247b82233ca71f918b94bd97aaa2dd56226d2407d3e3a5dfc53d07/linkedin-api-json-client-0.2.3.macosx-10.7-intel.exe" }, { "comment_text": "", "digests": { "md5": "3c9d9607e89686c0dea3132e5d08b274", "sha256": "caf7ad7214fd88a5a3c22dbf6eeb77a2ff84d4d5e57e0679ab553b7191eadaac" }, "downloads": -1, "filename": "linkedin-api-json-client-0.2.3.tar.gz", "has_sig": false, "md5_digest": "3c9d9607e89686c0dea3132e5d08b274", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12264, "upload_time": "2012-11-02T19:40:00", "url": "https://files.pythonhosted.org/packages/cd/bb/566683de7cf4de48f902a132632c4061d6cd88c61cd4ac1f8743ba28a5a0/linkedin-api-json-client-0.2.3.tar.gz" } ], "0.2.4": [], "0.2.5": [ { "comment_text": "", "digests": { "md5": "3e6a514d8464b8df6d8c53cc435d830e", "sha256": "c087ec32672ee324651f62a595224627ecd691af1cf351d4b7b686a98bad0f23" }, "downloads": -1, "filename": "linkedin-api-json-client-0.2.5.macosx-10.7-intel.exe", "has_sig": false, "md5_digest": "3e6a514d8464b8df6d8c53cc435d830e", "packagetype": "bdist_wininst", "python_version": "any", "requires_python": null, "size": 79857, "upload_time": "2012-11-02T20:04:55", "url": "https://files.pythonhosted.org/packages/5b/7a/e09159606ddcf47b262cbd537ca05d7e07ae2c24cab3b8226ed44de6971e/linkedin-api-json-client-0.2.5.macosx-10.7-intel.exe" }, { "comment_text": "", "digests": { "md5": "e69b132043f6f309a29ab7c2f7cf504d", "sha256": "11142560ea4e4953bd98e00ca430d8501bccab43b2f8087a03e74659a720ce41" }, "downloads": -1, "filename": "linkedin-api-json-client-0.2.5.tar.gz", "has_sig": false, "md5_digest": "e69b132043f6f309a29ab7c2f7cf504d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13053, "upload_time": "2012-11-02T20:04:13", "url": "https://files.pythonhosted.org/packages/3c/40/ef8d4227b36a40f2629ddceec899de648526fc85747527f98afca1946ea8/linkedin-api-json-client-0.2.5.tar.gz" } ], "0.2.6": [ { "comment_text": "", "digests": { "md5": "7b8ee7cb4d78fc440d98613b99966876", "sha256": "4d7d2a8c8dfce1f9d94fd84dc7e1cc0b6f99675dce3531fdaff5926e38870539" }, "downloads": -1, "filename": "linkedin-api-json-client-0.2.6.macosx-10.7-intel.exe", "has_sig": false, "md5_digest": "7b8ee7cb4d78fc440d98613b99966876", "packagetype": "bdist_wininst", "python_version": "any", "requires_python": null, "size": 79857, "upload_time": "2012-11-02T20:11:08", "url": "https://files.pythonhosted.org/packages/ca/63/21af9caa6fa1b1bf1dfe24aa6c495f4a89f7eb96112537e9b38b88db6722/linkedin-api-json-client-0.2.6.macosx-10.7-intel.exe" }, { "comment_text": "", "digests": { "md5": "b0f03da7ba2124a6e430d255346f4acb", "sha256": "2f25541fc044283bf6e00ce85e064c4744886a74e12c81cc46bcff67d91834c1" }, "downloads": -1, "filename": "linkedin-api-json-client-0.2.6.tar.gz", "has_sig": false, "md5_digest": "b0f03da7ba2124a6e430d255346f4acb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13013, "upload_time": "2012-11-02T20:11:06", "url": "https://files.pythonhosted.org/packages/09/55/3e9bb8293ed4fb7f316e6d5db47b553c331e011434d6ce15035b35746be4/linkedin-api-json-client-0.2.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7b8ee7cb4d78fc440d98613b99966876", "sha256": "4d7d2a8c8dfce1f9d94fd84dc7e1cc0b6f99675dce3531fdaff5926e38870539" }, "downloads": -1, "filename": "linkedin-api-json-client-0.2.6.macosx-10.7-intel.exe", "has_sig": false, "md5_digest": "7b8ee7cb4d78fc440d98613b99966876", "packagetype": "bdist_wininst", "python_version": "any", "requires_python": null, "size": 79857, "upload_time": "2012-11-02T20:11:08", "url": "https://files.pythonhosted.org/packages/ca/63/21af9caa6fa1b1bf1dfe24aa6c495f4a89f7eb96112537e9b38b88db6722/linkedin-api-json-client-0.2.6.macosx-10.7-intel.exe" }, { "comment_text": "", "digests": { "md5": "b0f03da7ba2124a6e430d255346f4acb", "sha256": "2f25541fc044283bf6e00ce85e064c4744886a74e12c81cc46bcff67d91834c1" }, "downloads": -1, "filename": "linkedin-api-json-client-0.2.6.tar.gz", "has_sig": false, "md5_digest": "b0f03da7ba2124a6e430d255346f4acb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13013, "upload_time": "2012-11-02T20:11:06", "url": "https://files.pythonhosted.org/packages/09/55/3e9bb8293ed4fb7f316e6d5db47b553c331e011434d6ce15035b35746be4/linkedin-api-json-client-0.2.6.tar.gz" } ] }