{ "info": { "author": "Sebastian Wehrmann", "author_email": "sebastian.wehrmann@me.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: Zope Public License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python" ], "description": "============\nNikePlus API\n============\n\nAs a Nike+ user and software engeneer I thought it would be interesting to be\nable to get the raw data of my runs. This little bit of software enables you to\nfetch that data either in XML (as provided by Nike) or in JSON.\n\nAll you need is you UserID, which you can get by following those steps:\n\n1. Sign in to NikePlus_.\n2. Click *My Runs*.\n3. Click the *Share* button on the top right of your runs.\n4. Click *Add to a Web page*.\n5. Click *Grab the Code*.\n\nThe Code is now copied to your clipboard. Inside that code, you can find your\nUserID.\n\n.. _NikePlus: http://nikeplus.nike.com/\n\n\n==========\nHow to use\n==========\n\nThe following tests are live tests with my UserID. They will ensure, that the\ncode works against the live Nike+ API.\n\n>>> import sw.nikeplus\n>>> user_id = 279218513\n\n\nRetrieving data in XML\n======================\n\n>>> print sw.nikeplus.get_xml(user_id)\nsuccess...2006-10-31T16:50:07+01:00...\n\nThe response from Nike+ is cached. If, for any reason, the service is\nout-of-order on the next try, the old response is returned. You may force a\nrefresh by providing the optional parameter `force`.\n\n\nRetrieving data in JSON\n=======================\n\n>>> print sw.nikeplus.get_json(user_id)\n{'status': 'success',...'startTime': '2006-10-31T16:50:07+01:00', 'duration': '1752873', 'id': '1889752785', 'workoutType': 'standard'...\n\nThe response from Nike+ is cached here, too. You can provide the optional\nparameter `force` as well, if you like to disable caching.\n\n\nHelper functions\n================\n\nThere is a helper function called `xml2json`. It should work with every XML,\nnot just with the Nike+ one. It is tested inside the package, but may be used\nfrom other packages, if you need it:\n\n>>> import sw.nikeplus.utils\n>>> print sw.nikeplus.utils.xml2json(\n... \"\"\"\n... \n... Tove\n... Jani\n... Reminder\n... Don't forget me this weekend!\n... \"\"\")\n{'body': \"Don't forget me this weekend!\", 'to': 'Tove', 'from': 'Jani', 'heading': 'Reminder', 'id': '1234'}\n\n\n=========\nCHANGELOG\n=========\n\n\n0.1 (2012-04-04)\n================\n\n- initial release", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://bitbucket.org/sweh/sw.nikeplus", "keywords": null, "license": "ZPL 2.1", "maintainer": null, "maintainer_email": null, "name": "sw.nikeplus", "package_url": "https://pypi.org/project/sw.nikeplus/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/sw.nikeplus/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://bitbucket.org/sweh/sw.nikeplus" }, "release_url": "https://pypi.org/project/sw.nikeplus/0.1/", "requires_dist": null, "requires_python": null, "summary": "API for retrieving workout data from Nike+.", "version": "0.1" }, "last_serial": 800283, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "be1f2653b011c501965a8b657b1b8dac", "sha256": "831879fca383c076e77768201c39b36686ca84bbfaa8e90b4e2eea8a514715fd" }, "downloads": -1, "filename": "sw.nikeplus-0.1.tar.gz", "has_sig": false, "md5_digest": "be1f2653b011c501965a8b657b1b8dac", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7043, "upload_time": "2012-04-04T08:22:01", "url": "https://files.pythonhosted.org/packages/9d/66/ecdd10175225b5f065d9e81fba603a2d4881d76b0e5d86f3ecf7ef876de0/sw.nikeplus-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "be1f2653b011c501965a8b657b1b8dac", "sha256": "831879fca383c076e77768201c39b36686ca84bbfaa8e90b4e2eea8a514715fd" }, "downloads": -1, "filename": "sw.nikeplus-0.1.tar.gz", "has_sig": false, "md5_digest": "be1f2653b011c501965a8b657b1b8dac", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7043, "upload_time": "2012-04-04T08:22:01", "url": "https://files.pythonhosted.org/packages/9d/66/ecdd10175225b5f065d9e81fba603a2d4881d76b0e5d86f3ecf7ef876de0/sw.nikeplus-0.1.tar.gz" } ] }