{ "info": { "author": "Ekevoo", "author_email": "ekevoo@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Internet :: WWW/HTTP :: Session", "Topic :: System :: Systems Administration :: Authentication/Directory" ], "description": "pyoneall - OneAll API Wrapper\n=============================\n\n**OneAll** (|oneall|_) provides web-applications with a unified API for **30+ social networks**.\n**pyoneall** provides developers with OneAll accounts a simple interface with the OneAll API for Python-based web-applications.\n\nImplementation Overview\n-----------------------\nOneAll API documentation is available at |onealldoc|_. However, in order to use pyoneall with your application, it's\nenough to read the docs for the Connection API: `Connection API Documentation`_.\n\nSo far, we have tested pyoneall within Flask and Django apps. To use OneAll as a Django authentication backend,\nplease check out our `django_oneall`_ project, which relies on this package.\n\npyoneall defines the ``OneAll`` class, which is the API client. As of now, it has the following methods:\n\n:``connections()``: Get a list of social connections to the site\n:``connection()``: Get detailed connection data including user details\n:``users()``: Get a list of users that have connected with the site\n:``user()``: Get detailed user data\n:``user_contacts()``: Get a list of user's contacts\n:``publish()``: Publish a message using user's social network account\n\nAs pyoneall wraps a REST API which returns JSON objects, the objects returned by the methods behave in a somewhat\nJavaScript-like manner. This means that in addition to the ``dict``-style ``object['key']`` notation, you can also\nuse ``object.key``.\n\nAlso, arrays nested in the JSON responses, are represented by a class that defines a ``by_*()`` grouping and searching\nmethod in an addition to the ``list`` methods it inherits from.\n\nFor more information on these classes, check out ``help(pyoneall.base.OADict)`` and ``help(pyoneall.base.OAList)``.\n\nExample\n-------\n\nAuthentication\n~~~~~~~~~~~~~~\nAccess to the OneAll API requires authentication. Obtain your API credentials following the procedure described at\n`Authentication Documentation`_.\n\nCreate an instance of the OneAll client::\n\n from pyoneall import OneAll\n\n oa = OneAll(\n site_name='NAME OF YOUR ONEALL SITE',\n public_key='PUBLIC KEY OF YOUR SITE',\n private_key='PRIVATE KEY OF YOUR SITE'\n )\n\nThe Connection API\n~~~~~~~~~~~~~~~~~~\nFetching connections lists\n**************************\n::\n\n connections = oa.connections()\n\n``connections`` now contains the \"connections\" portion of the result of the API call, as described in\n``_.\nFull response data (for debugging and whatnot) is in ``connections.response``.\n\nOneAll uses pagination for calls which contain many entries. Each call returns a page up to 500 entries. When the\n``OneAll.connections()`` method is executed without arguments, only the first page is loaded. You the access the\npagination information in ``connections.pagination``.\n\nIn order to load a custom range of pages, you can do something like::\n\n connections = oa.connections(first_page=3, last_page=6)\n\nOr, if you want to load all pages, use::\n\n connections = oa.connections(fetch_all=True)\n\nOf course, this will result in multiple API calls.\n\nThe connections list itself is in ``connections.entries``::\n\n >>> connections.entries\n [{u'callback_uri': u'http://www.example.com/connect/',\n u'connection_token': u'cf2fffc7-34dc-484e-95cd-13f8ab838e22',\n u'date_creation': u'Sun, 23 Jun 2013 14:12:43 +0200',\n u'status': u'succeeded'},\n {u'callback_uri': u'http://m.example.com/connect/',\n u'connection_token': u'4276bd23-3605-4679-acd2-963148c477cc',\n u'date_creation': u'Sun, 23 Jun 2013 14:13:20 +0200',\n u'status': u'succeeded'},\n {u'callback_uri': u'http://www.example.com/connect/',\n u'connection_token': u'58ad2a04-ed1e-4799-a3ca-2b26651e35a0',\n u'date_creation': u'Sun, 23 Jun 2013 14:18:00 +0200',\n u'status': u'succeeded'},\n {u'callback_uri': u'http://m.example.com/connect/',\n u'connection_token': u'e5231790-c6dc-4ce8-9922-792a2aebbba2',\n u'date_creation': u'Sun, 23 Jun 2013 14:18:11 +0200',\n u'status': u'succeeded'},\n {u'callback_uri': u'http://www.example.com/connect/',\n u'connection_token': u'f82ad1e5-113f-46a2-b1c5-2a57a6002401',\n u'date_creation': u'Sun, 23 Jun 2013 14:21:14 +0200',\n u'status': u'succeeded'}]\n\nIn the example above, you can see that some connections were made with the callback of the desktop website\n(``http://www.example.com/connect/``), and some were made with the mobile webapp (``http://m.example.com/connect/``).\nWe can get an object grouped by the \"callback_uri\" using::\n\n >>> connections.entries.by_callback_uri()\n {u'http://www.example.com/connect/': [\n {u'callback_uri': u'http://www.example.com/connect/',\n u'connection_token': u'cf2fffc7-34dc-484e-95cd-13f8ab838e22',\n u'date_creation': u'Sun, 23 Jun 2013 14:12:43 +0200',\n u'status': u'succeeded'},\n {u'callback_uri': u'http://www.example.com/connect/',\n u'connection_token': u'58ad2a04-ed1e-4799-a3ca-2b26651e35a0',\n u'date_creation': u'Sun, 23 Jun 2013 14:18:00 +0200',\n u'status': u'succeeded'}],\n {u'callback_uri': u'http://www.example.com/connect/',\n u'connection_token': u'f82ad1e5-113f-46a2-b1c5-2a57a6002401',\n u'date_creation': u'Sun, 23 Jun 2013 14:21:14 +0200',\n u'status': u'succeeded'},\n u'http://m.example.com/connect/': [\n {u'callback_uri': u'http://m.example.com/connect/',\n u'connection_token': u'4276bd23-3605-4679-acd2-963148c477cc',\n u'date_creation': u'Sun, 23 Jun 2013 14:13:20 +0200',\n u'status': u'succeeded'},\n {u'callback_uri': u'http://m.example.com/connect/',\n u'connection_token': u'e5231790-c6dc-4ce8-9922-792a2aebbba2',\n u'date_creation': u'Sun, 23 Jun 2013 14:18:11 +0200',\n u'status': u'succeeded'}]}\n\nOr get a list of connections with a specific \"callback_uri\"::\n\n >>> connections.entries.by_callback_uri('http://m.example.com/connect/')\n [{u'callback_uri': u'http://m.example.com/connect/',\n u'connection_token': u'4276bd23-3605-4679-acd2-963148c477cc',\n u'date_creation': u'Sun, 23 Jun 2013 14:13:20 +0200',\n u'status': u'succeeded'},\n {u'callback_uri': u'http://m.example.com/connect/',\n u'connection_token': u'e5231790-c6dc-4ce8-9922-792a2aebbba2',\n u'date_creation': u'Sun, 23 Jun 2013 14:18:11 +0200',\n u'status': u'succeeded'}]\n\nReading connection details\n**************************\nIn order to get the **user_token** and the user's social identity you can pass a **connection_token** to the\n``connection()`` method of the ``OneAll`` instance::\n\n some_connection = oa.connection('e5231790-c6dc-4ce8-9922-792a2aebbba2')\n\nOr, alternatively you can fetch the connection details through the ``connection()`` method of an entry in the list\nof connections::\n\n some_connection = connections.entries[3].connection()\n\n``some_connection`` will now contain the \"connection\" portion of the response described in the API documentation for\n`Read Connection Details`_, most importantly ``some_connection.user`` and ``some_connection.user.user_token``\n\nThe User API\n~~~~~~~~~~~~\nFetching user list\n******************\n``OneAll.users()`` behaves the same way ``OneAll.connections()`` does, arguments and all. This is due to the similarity\nof the List Users and the List Connections API, in terms of pagination and entries structure.\n::\n\n users = oa.users()\n\nNow, you can access ``users.entries``, or even access detailed user data with ``users.entries[4].user()``.\n\nReading user details\n********************\nRead user details using::\n\n user_token = some_connection.user.user_token\n some_user = oa.user(user_token)\n\n``some_user`` will contain the \"user\" portion of the response detailed at\n``_.\n\nReading user's contacts\n***********************\nYou can get the user's contacts (depending on the social network) with::\n\n contacts = some_user.contacts()\n\nor, with::\n\n contacts = oa.user_contacts(user_token)\n\nPublishing content on user's behalf\n***********************************\nFirst, you need to format a message as described at ``_.\nAfterwards, publish it using ``publish()``::\n\n message = {\n 'request': {\n 'message': {\n 'parts': {\n 'text': {\n 'body': 'Hello World!' }}}}}\n\n oa.publish(user_token, message)\n\nLicense\n-------\nCopyright (c) 2013-2015, Leandigo (|leandigo|_)\nReleased under the MIT License. See the LICENSE_ file for details.\n\n.. |leandigo| replace:: www.leandigo.com\n.. _leandigo: http://www.leandigo.com\n.. |oneall| replace:: http://www.oneall.com\n.. _oneall: http://www.oneall.com\n.. |onealldoc| replace:: http://docs.oneall.com\n.. _onealldoc: http://docs.oneall.com\n.. _django_oneall: https://github.com/leandigo/django-oneall\n.. _Connection API Documentation: http://docs.oneall.com/api/resources/connections/\n.. _Authentication Documentation: http://docs.oneall.com/api/basic/authentication/\n.. _Read Connection Details: http://docs.oneall.com/api/resources/connections/read-connection-details/\n.. _LICENSE: LICENSE", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://www.leandigo.com/", "keywords": null, "license": "MIT License, see LICENSE file", "maintainer": null, "maintainer_email": null, "name": "pyoneall", "package_url": "https://pypi.org/project/pyoneall/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pyoneall/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://www.leandigo.com/" }, "release_url": "https://pypi.org/project/pyoneall/0.2.3/", "requires_dist": null, "requires_python": null, "summary": "OneAll API wrapper (http://www.oneall.com). Provides unified API for 30+ social networks", "version": "0.2.3" }, "last_serial": 1750908, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "ad5b982281c74c9f233760586565814a", "sha256": "33c98fe0c51b1b9e703e7e412c72b826319d22b15832380ba1b652482a6f4a58" }, "downloads": -1, "filename": "pyoneall-0.1.tar.gz", "has_sig": false, "md5_digest": "ad5b982281c74c9f233760586565814a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7596, "upload_time": "2013-07-04T16:42:51", "url": "https://files.pythonhosted.org/packages/63/e6/5d4d7d1768310032ba41bdd97ffe24c03b2e5211cba6d9199044ba53a207/pyoneall-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "dc057b8591a451355bc3bbc05d2c583a", "sha256": "50f8004dcd36458652686c3a06f02427b36151856e76e738f94d54584b3c3799" }, "downloads": -1, "filename": "pyoneall-0.2.tar.gz", "has_sig": false, "md5_digest": "dc057b8591a451355bc3bbc05d2c583a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8781, "upload_time": "2015-09-17T14:35:09", "url": "https://files.pythonhosted.org/packages/3e/d3/d4a337da8f457ffa67eb06e5144b2c9a6d8975298ab020b61fb816349909/pyoneall-0.2.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "5cb0721ffacc8572656dd18e49ddc2d4", "sha256": "d38eb295b36356ef7f0dbccfbb25e859ceba6afd77792d52bf0a684bb86a2de4" }, "downloads": -1, "filename": "pyoneall-0.2.1.tar.gz", "has_sig": false, "md5_digest": "5cb0721ffacc8572656dd18e49ddc2d4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8705, "upload_time": "2015-09-18T07:09:03", "url": "https://files.pythonhosted.org/packages/dc/bd/f58333371a431ec90a15a608d0d95d7a68660eb0d968aa47958108e7a753/pyoneall-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "9cb11488a558986c2779b108e63d0cdd", "sha256": "b296d5a68066e1de8e026f45edac0b665c73d2e51ea673c22c31646b766ab1a6" }, "downloads": -1, "filename": "pyoneall-0.2.2.tar.gz", "has_sig": false, "md5_digest": "9cb11488a558986c2779b108e63d0cdd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8878, "upload_time": "2015-09-30T00:18:14", "url": "https://files.pythonhosted.org/packages/4f/03/9cd86fd072127054364b1fe16483ee2960b05c1d5b1558be41136a8ff690/pyoneall-0.2.2.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "dad6440b56eed9d9410dcd684e761a5f", "sha256": "ab13d82171082ae80b6092ca02de99c0926e9f8185cbadd2cd5ae2fe03fdf5a9" }, "downloads": -1, "filename": "pyoneall-0.2.3.tar.gz", "has_sig": false, "md5_digest": "dad6440b56eed9d9410dcd684e761a5f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11692, "upload_time": "2015-10-04T05:04:31", "url": "https://files.pythonhosted.org/packages/ab/9b/aa82144f8b7f03bbea6a372b6dd2566b3d7eed136a3caed4659eb13de7c4/pyoneall-0.2.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "dad6440b56eed9d9410dcd684e761a5f", "sha256": "ab13d82171082ae80b6092ca02de99c0926e9f8185cbadd2cd5ae2fe03fdf5a9" }, "downloads": -1, "filename": "pyoneall-0.2.3.tar.gz", "has_sig": false, "md5_digest": "dad6440b56eed9d9410dcd684e761a5f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11692, "upload_time": "2015-10-04T05:04:31", "url": "https://files.pythonhosted.org/packages/ab/9b/aa82144f8b7f03bbea6a372b6dd2566b3d7eed136a3caed4659eb13de7c4/pyoneall-0.2.3.tar.gz" } ] }