{ "info": { "author": "James Errico", "author_email": "james.errico@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4" ], "description": "phishnetpy\n==========\n\nphishnetpy is a Python client for the `Phish.net\nAPI `__. It works with either Python 2 or 3 and\nsupports all of the endpoints provided by api.phish.net.\n\nInstallation\n============\n\nYou guessed it...\n\n::\n\n pip install phishnetpy\n\nGetting Started\n===============\n\nAs you browse the `Phish.net API\ndocumentation `__ you will see that some API\nmethods are labeled as \"protected\". This means that in order to use\nthose methods, you must generate an Application Key. To allow both\npublic and protected usage, there are several setup steps you have to\ncomplete.\n\nPublic API Methods\n------------------\n\nFor \"public\" or \"unprotected\" API calls, you simply need to instantiate\nthe PhishNetAPI class, and call the methods for each of the API methods.\n\n.. code:: python\n\n >>> from phishnetpy import PhishNetAPI\n >>> phishnet = PhishNetAPI()\n >>> artists = phishnet.artists_get()\n >>> artists\n [{'artist': 'Phish', 'slug': 'phish', 'artistid': '1'}, {'artist': 'Trey Anastasio', 'slug': 'trey-anastasio-band', 'artistid': '2'}, {'artist': 'Mike Gordon', 'slug': 'mike-gordon', 'artistid': '6'}, {'artist': 'Jon Fishman', 'slug': 'jon-fishman', 'artistid': '7'}, {'artist': 'Page McConnell', 'slug': 'page-mcconnell', 'artistid': '9'}]\n\nAttempting to call protected methods without passing in an API key into\nthe constructor will raise ``phishnetpy.exceptions.AuthError``.\n\n.. code:: python\n\n >>> phishnet.user_username_check(\"wilson\")\n Traceback (most recent call last):\n File \"\", line 1, in \n File \"./phishnetpy/phishnetpy/decorators.py\", line 16, in wrapper\n raise AuthError(\"{} requires an API key\".format(qual_name_safe(f)))\n phishnetpy.exceptions.AuthError: PhishNetAPI.user_username_check requires an API key\n\nProtected API Methods\n---------------------\n\nIn order to collect \"protected\" API methods, you must pass an API key\ninto the constuctor.\n\n.. code:: python\n\n >>> from phishnetpy import PhishNetAPI\n >>> my_api_key = \"\" # Private API key from http://api.phish.net/keys/\n >>> phishnet = PhishNetAPI(api_key=my_api_key)\n >>> phishnet.user_username_check(\"wilson\")\n {'success': '0', 'reason': 'Sorry! wilson is already taken.'}\n\nMethods requiring user authorization\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nSome protected methods additionally require an auth\\_key to take actions\non behalf of specific users. This includes submitting reviews, forum\nthreads, or adding a show to \"My Shows\".\n\nphishnetpy can make generating auth codes simpler by adding some logic\non top of the ``pnet.api.*`` API methods.\n\nThe simplest way is probably by using the ``authorize`` method. In order\nto make this method work, you will need both the username and password\nof the user you are authorizing (at least the first time).\n\n.. code:: python\n\n >>> from phishnetpy import PhishNetAPI\n >>> my_api_key = \"\" # Private API key from http://api.phish.net/keys/\n >>> phishnet = PhishNetAPI(api_key=my_api_key)\n >>> phishnet.authorize('authorized_username', 'that_users_password')\n\nIf unsuccessful, the ``phishnetpy.exceptions.AuthError`` will be raised.\nIf successful, the authorized username and auth key will be stored as\nattributes on the instance you're working with.\n\n.. code:: python\n\n >>> phishnet.username\n 'authorized_username'\n >>> phishnet.auth_key\n 'ABCD123456789012345'\n\nOnce those attributes have been set, you can make user-authorized API\ncalls. For example, lets add, and then remove `Halloween\n2014 `__ to my shows.\n\n.. code:: python\n\n >>> len(phishnet.user_myshows_get_authorized())\n 7\n >>> phishnet.user_myshows_add('2014-10-31')\n {'success': 1}\n >>> len(phishnet.user_myshows_get_authorized())\n 8\n >>> phishnet.user_myshows_remove('2014-10-31')\n {'success': 1}\n >>> len(phishnet.user_myshows_get_authorized())\n 7\n\nOnce authorized, you should not store the user's password (per the\nPhish.net terms).\n\n.. |Build Status| image:: https://travis-ci.org/jameserrico/phishnetpy.svg?branch=master\n :target: https://travis-ci.org/jameserrico/phishnetpy", "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/jameserrico/phishnetpy", "keywords": "phish phish.net client", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "phishnetpy", "package_url": "https://pypi.org/project/phishnetpy/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/phishnetpy/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/jameserrico/phishnetpy" }, "release_url": "https://pypi.org/project/phishnetpy/0.2.4/", "requires_dist": null, "requires_python": null, "summary": "Python client for the Phish.net API", "version": "0.2.4" }, "last_serial": 1734235, "releases": { "0.2.3": [ { "comment_text": "", "digests": { "md5": "f20893493dad0741348eaa56e110bff8", "sha256": "51c815f88acfc9582b8a9d7c3bc85de8ed8868350dd2c40f0c5da3cd177928d9" }, "downloads": -1, "filename": "phishnetpy-0.2.3.tar.gz", "has_sig": false, "md5_digest": "f20893493dad0741348eaa56e110bff8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9584, "upload_time": "2015-09-15T21:17:00", "url": "https://files.pythonhosted.org/packages/d3/48/47129e0c875ffb8fcbf3a345bc2961e326eb838c41abaa0a3b1b94233a6c/phishnetpy-0.2.3.tar.gz" } ], "0.2.4": [ { "comment_text": "", "digests": { "md5": "1a2b28a964094c7125bd5d365f60f543", "sha256": "46d0c17e6b700673723500437abc7a235a5470e6ae515c0ec8f9d13f70947b12" }, "downloads": -1, "filename": "phishnetpy-0.2.4.tar.gz", "has_sig": false, "md5_digest": "1a2b28a964094c7125bd5d365f60f543", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9775, "upload_time": "2015-09-23T03:03:55", "url": "https://files.pythonhosted.org/packages/b6/f2/a7e55d9a4a1669a6358ae5abc88a4c9b191d54aa57a979743ff7e971cb85/phishnetpy-0.2.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1a2b28a964094c7125bd5d365f60f543", "sha256": "46d0c17e6b700673723500437abc7a235a5470e6ae515c0ec8f9d13f70947b12" }, "downloads": -1, "filename": "phishnetpy-0.2.4.tar.gz", "has_sig": false, "md5_digest": "1a2b28a964094c7125bd5d365f60f543", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9775, "upload_time": "2015-09-23T03:03:55", "url": "https://files.pythonhosted.org/packages/b6/f2/a7e55d9a4a1669a6358ae5abc88a4c9b191d54aa57a979743ff7e971cb85/phishnetpy-0.2.4.tar.gz" } ] }