{ "info": { "author": "Kelvin Fichter", "author_email": "kelvinfichter@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "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 :: Software Development :: Libraries :: Python Modules" ], "description": "nike-py-sdk\n===========\n\nThis is an *unofficial* Python3 API wrapper for Nike services. WIP.\n\nBasic Usage\n-----------\n\n.. code:: py\n\n import nikepysdk\n\n nike = nikepysdk.NikeSdk()\n\n username = 'test@example.com'\n password = 'Password123!'\n access_token = nike.get_access_token(username, password)\n print(access_token) # Some long access token\n\n account_verified = nike.is_account_verified(access_token)\n print(account_verified) # True or False\n\n account_data = {\n 'email': 'newaccount@example.com',\n 'password': 'Password12345!',\n 'first_name': 'John',\n 'last_name': 'Smith',\n 'date_of_birth': '2000-01-01', # YYYY-MM-DD\n 'gender': 'male' # or female\n }\n account_created = nike.create_account(account_data)\n print(account_created)\n\n event = nike.get_event_by_id(88145)\n print(event.event_id, event.title, event.location)\n\nSDK Documentation\n-----------------\n\n``nike.get_access_token``\n~~~~~~~~~~~~~~~~~~~~~~~~~\n\n``nike.get_access_token(username, password)``\n\nReturns an access token for an account given a username and password\nthat can be used to interact with authenticated API endpoints.\n\nParameters\n^^^^^^^^^^\n\n1. ``string`` - Username for the account\n2. ``string`` - Password for the account\n\nReturns\n^^^^^^^\n\n``string`` Access token in a string format\n\nExample\n^^^^^^^\n\n.. code:: py\n\n username = 'example@test.com'\n password = 'Password123!'\n access_token = nike.get_access_token(username, password)\n print(access_token) # Some long string\n\n``nike.create_account``\n~~~~~~~~~~~~~~~~~~~~~~~\n\n``nike.create_account(account_data)``\n\nCreates a new Nike+ account given the account data. ``account_data`` is\na dictionary with the following schema:\n\n::\n\n {\n 'email': string,\n 'password': string,\n 'first_name': string,\n 'last_name': string,\n 'date_of_birth': string, # YYYY-MM-DD\n 'gender': string # 'male' or 'female'\n }\n\nParameters\n^^^^^^^^^^\n\n1. ``dict`` - Account data as a dict\n\nReturns\n^^^^^^^\n\n``bool`` Success of the account creation\n\nExample\n^^^^^^^\n\n.. code:: py\n\n account_data = {\n 'email': 'newaccount@example.com',\n 'password': 'Password12345!',\n 'first_name': 'John',\n 'last_name': 'Smith',\n 'date_of_birth': '2000-01-01', # YYYY-MM-DD\n 'gender': 'male' # or female\n }\n account_created = nike.create_account(account_data)\n print(account_created) # True, hopefully\n\n``nike.is_account_verified``\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n``nike.is_account_verified(access_token)``\n\nChecks if an account is verified given an account's valid access token\n\nParameters\n^^^^^^^^^^\n\n1. ``string`` - Account access token\n\nReturns\n^^^^^^^\n\n``bool`` If the account is verified or not\n\nExample\n^^^^^^^\n\n.. code:: py\n\n is_verified = nike.create_account(access_token)\n print(is_verified) # True, hopefully\n\n``nike.send_sms_code``\n~~~~~~~~~~~~~~~~~~~~~~\n\n``nike.send_sms_code(access_token, phone_number)``\n\nSends an SMS verification code to an account given its access token and\nphone number.\n\nParameters\n^^^^^^^^^^\n\n1. ``string`` - Account access token\n2. ``string`` - Phone number to send code to\n\nReturns\n^^^^^^^\n\n``bool`` Success of the operation\n\nExample\n^^^^^^^\n\n.. code:: py\n\n phone_number = '1112223333'\n sms_sent = nike.send_sms_code(access_token, phone_number)\n print(sms_sent) # True, hopefully\n\n``nike.verify_sms_code``\n~~~~~~~~~~~~~~~~~~~~~~~~\n\n``nike.verify_sms_code(access_token, sms_code)``\n\nVerifies the SMS code for an account.\n\nParameters\n^^^^^^^^^^\n\n1. ``string`` - Account access token\n2. ``string`` - SMS code that was received\n\nReturns\n^^^^^^^\n\n``bool`` Success of the operation\n\nExample\n^^^^^^^\n\n.. code:: py\n\n sms_code = '123456'\n sms_verified = nike.verify_sms_code(access_token, sms_code)\n print(sms_verified) # True, hopefully\n\n``nike.add_shipping_address``\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n``nike.add_shipping_address(access_token, shipping_info)``\n\nAdds a new shipping address to an account. ``shipping_info`` is a\ndictionary with the following schema:\n\n::\n\n {\n 'first_name': string,\n 'last_name': string,\n 'address_1': string,\n 'address_2': string,\n 'city': string,\n 'state': string, # Initials\n 'zip': string,\n 'phone': string, # 1112223333\n }\n\nParameters\n^^^^^^^^^^\n\n1. ``string`` - Access token for the account\\_\n2. ``dict`` - Shipping address data as a dict\n\nReturns\n^^^^^^^\n\n``string`` Address ID for use in adding billing info\n\nExample\n^^^^^^^\n\n.. code:: py\n\n shipping_info = {\n 'first_name': 'John',\n 'last_name': 'Smith',\n 'address_1': '123 Main Street',\n 'address_2': 'APT 1A',\n 'city': 'Sometown',\n 'state': 'OH',\n 'zip': '12345',\n 'phone': '1234567890'\n }\n address_id = nike.add_shipping_address(access_token, shipping_info)\n print(address_id) # Some uuid4 string\n\n``nike.add_card``\n~~~~~~~~~~~~~~~~~\n\n``nike.add_card(access_token, card_info)``\n\nAdds a new card to an account. ``card_info`` is a dictionary with the\nfollowing schema:\n\n::\n\n {\n 'number': string,\n 'type': string, # VISA or similar\n 'exp_month': string, # XX\n 'exp_year': string, # XXXX\n 'cvv': string\n }\n\nParameters\n^^^^^^^^^^\n\n1. ``string`` - Access token for the account\\_\n2. ``dict`` - Card data as a dict\n\nReturns\n^^^^^^^\n\n``string`` Card ID for use in adding billing info\n\nExample\n^^^^^^^\n\n.. code:: py\n\n card_info = {\n 'number': '1111222233334444,\n 'type': 'VISA', # VISA or similar\n 'exp_month': '12', # XX\n 'exp_year': '2021', # XXXX\n 'cvv': '123'\n }\n card_id = nike.add_card(access_token, card_info)\n print(card_id) # Some uuid4 string\n\n``nike.add_billing_info``\n~~~~~~~~~~~~~~~~~~~~~~~~~\n\n``nike.add_billing_info(access_token, access_token, billing_info, address_id, card_id)``\n\nAdds a new billing profile to an account. ``billing_info`` is a\ndictionary with the following schema:\n\n::\n\n {\n 'first_name': string,\n 'last_name': string,\n 'address_1': string,\n 'address_2': string,\n 'city': string,\n 'state': string, # Initials\n 'zip': string,\n 'phone': string, # 1112223333\n }\n\n``address_id`` and ``card_id`` are IDs returned by\n``add_shipping_address`` and ``add_card``.\n\nParameters\n^^^^^^^^^^\n\n1. ``string`` - Access token for the account\n2. ``dict`` - Billing data as a dict\n3. ``string`` - Address ID to add to the profile\n4. ``string`` - Card ID to add to the profile\n\nReturns\n^^^^^^^\n\n``bool`` Success of the operation\n\nExample\n^^^^^^^\n\n.. code:: py\n\n billing_info = {\n 'first_name': 'John',\n 'last_name': 'Smith',\n 'address_1': '123 Main Street',\n 'address_2': 'APT 1A',\n 'city': 'Sometown',\n 'state': 'OH',\n 'zip': '12345',\n 'phone': '1234567890'\n }\n billing_added = nike.add_billing_info(access_token, billing_info, address_id, card_id)\n print(billing_added) # True, hopefully\n\n``nike.get_event_by_id``\n~~~~~~~~~~~~~~~~~~~~~~~~\n\n``nike.get_event_by_id(event_id)``\n\nReturns a ``NikeEvent`` object that contains information about an event\n\nParameters\n^^^^^^^^^^\n\n1. ``string`` - ID of the event\n\nReturns\n^^^^^^^\n\n``NikeEvent`` Event data as a ``NikeEvent`` object\n\nExample\n^^^^^^^\n\n.. code:: py\n\n event_id = '12345'\n event = nike.get_event_by_id(event_id)\n print(event.title) # Some string\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/kfichter/nike-py-sdk", "keywords": "nike sneakers development", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "nikepysdk", "package_url": "https://pypi.org/project/nikepysdk/", "platform": "", "project_url": "https://pypi.org/project/nikepysdk/", "project_urls": { "Homepage": "https://github.com/kfichter/nike-py-sdk" }, "release_url": "https://pypi.org/project/nikepysdk/0.0.2/", "requires_dist": null, "requires_python": "", "summary": "A Python3 SDK for interacting with Nike services", "version": "0.0.2" }, "last_serial": 3143581, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "1849e9865e5602b88232bb30cb3475d6", "sha256": "ac2f12ce00789e363389d4ccf1709f896d427194fcc6007e2ef4028c4943cb06" }, "downloads": -1, "filename": "nikepysdk-0.0.1.tar.gz", "has_sig": false, "md5_digest": "1849e9865e5602b88232bb30cb3475d6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3917, "upload_time": "2017-08-31T16:37:30", "url": "https://files.pythonhosted.org/packages/c3/c2/d7e48dd36f1736949aa4c1828d1c92dd43d687c0a5cd5f8dcbc1eb8f9993/nikepysdk-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "82229902985a2f69102492f5b07f2dbd", "sha256": "85139dcee76b1f3b823289b192f082a79544b91e39814d06336a72d637135311" }, "downloads": -1, "filename": "nikepysdk-0.0.2.tar.gz", "has_sig": false, "md5_digest": "82229902985a2f69102492f5b07f2dbd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6354, "upload_time": "2017-09-02T20:39:15", "url": "https://files.pythonhosted.org/packages/7f/a7/13d56cf9466550170ce0304dac9bd60bd4ada3d5ba9943ec6cd825e81dc9/nikepysdk-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "82229902985a2f69102492f5b07f2dbd", "sha256": "85139dcee76b1f3b823289b192f082a79544b91e39814d06336a72d637135311" }, "downloads": -1, "filename": "nikepysdk-0.0.2.tar.gz", "has_sig": false, "md5_digest": "82229902985a2f69102492f5b07f2dbd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6354, "upload_time": "2017-09-02T20:39:15", "url": "https://files.pythonhosted.org/packages/7f/a7/13d56cf9466550170ce0304dac9bd60bd4ada3d5ba9943ec6cd825e81dc9/nikepysdk-0.0.2.tar.gz" } ] }