{ "info": { "author": "Markku Koponen, Alpenwolf Oy", "author_email": "markku@alpenwolf.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.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4" ], "description": "IntraZon Python SDK v. 0.1\n==========================\n\nIntraZon Python SDK allows you to use the IntraZon REST API without needing to handle the HTTPS transactions yourself.\nIt has two modes of operation: Blocking and non-blocking, which you select when creating the IntraZon object which\nhandles all the transactions. Blocking mode is simple: Any method which communicates with IntraZon will block until\nthe transaction has completely taken place, at which point it will return an object representing the result of the\ntransaction, or None in case of an error.\n\nIn non-blocking mode the methods will return immediately, and when the transaction is finished, a callback function\ngiven by the user shall be called with the result; either the object describing the transaction, or an IntraZonError\nobject in case of an error. If non-blocking mode is used, the main thread should call stop() method on the IntraZon\nobject before exiting itself, or the thread in which IntraZon communications take place will continue to run. When\nthe SDK is used from a console program in this mode, it is recommended that an exit and keyboard interrupt handler which\ncalls stop() is implemented.\n\nIntraZon Keys\n=============\n\nIntraZon uses a random, unique string as an identifier to all entity objects, such as players, applications and virtual\ngoods. This string is automatically assigned when the entity is created, and cannot be changed by the user. The keys can\nbe seen both with the IntraZon REST API, and in the IntraZon control panel to which all developers who connect their\napplications to IntraZon will receive login credentials.\n\nIn addition, the identity of the REST API user is confirmed by providing a secret, 28 characters long key for each\nIntraZon-enabled application. If this key is compromised, a new key can be requested in the control panel, which will\noverride the earlier key. The key can be seen in IntraZon control panel. It is placed in the back-end server, to confirm\nits identity. It must be provided as the user name in the HTTP Basic authentication method, with empty password. Since\nonly HTTPS protocol is allowed for the IntraZon REST API, this is secure.\n\nExample code\n============\n\nA simple example of the usage of IntraZon SDK can be seen by calling:\n\n python example.py listgoods aBcDeFgHiJ app_abcdefghijklmnopqrstuvwy\n\nto receive a list of virtual goods and their keys for the given application (substitute app key and auth key with real\nkeys for your application). Then, to create a new player, register a credit card to it and make a purchase for one of\nthe virtual goods, call:\n\n python example.py newplayerpurchase aBcDeFgHiJ app_abcdefghijklmnopqrstuvwy 1234567890 \"John Doe\" 4012888888881881 \n 123 12 2050\n \nwhere, again, substitute the three example keys with real keys. Assuming the application is in test mode in the IntraZon\ncontrol panel, this transaction will succeed. The example credit card number above must be used for test transactions.\nA real credit card must be used (note that it will be charged) if the application is not in test mode.\n\nIntraZon entity classes\n=======================\n\nAll IntraZon entities such as players, virtual goods are represented by classes which the SDK provides. They will have\nthe same attributes as the corresponding JSON object when the REST API is used directly. The currently supported\nentities and their attributes are thus:\n\nApplication\n-----------\n - key (string)\n - name (string)\n \nVirtualGood\n-----------\n - key (string)\n - name (string)\n - price (integer)\n - price_usd = (string; contains float)\n - price_eur = (string; contains float)\n - thumbnail = (string)\n - subscriber_discount = (string; contains float)\n - multiple = (boolean)\n - permanent = (boolean)\n \nPlayer\n------\n - key = (string)\n - name = (string)\n - subscribed = (boolean)\n - coins = (integer)\n - logged = (boolean)\n - last_login = (string)\n - app_unique_id = (string)\n \nPaymentMethod\n-------------\n - cc_num = (string, no spaces)\n - cc_csc = (string)\n - cc_name = (string)\n - cc_exp_month = (string, example \"03\")\n - cc_exp_year = (string, example \"2050\")\n \nVirtualGoodPurchase\n-------------------\n - virtual_good_key (string)\n - currency (string; \"coins\", \"usd\" or \"eur\")\n - amount (integer; 1 for any virtual goods which don't offer multiple purchases)\n \nSDK methods\n===========\n\nvirtual_goods(callback)\n-----------------------\nWhen communicating is done, calls the user-provided callback function with two arguments. In case of success, the first\nargument is a list of VirtualGood objects, and the second is None. In case of error, the first argument is None and the\nsecond is an IntraZonError object describing the error. Its code-field will correspond to the HTTP response code\nreceived from IntraZon, if that was the cause of the error. If code is 599, a timeout happened, and if it is 1000 or\nabove, it was an internal error in the SDK in which case the message-field will contain information about it.\n\nSee: callb_list_virtual_goods(virtual_goods, error) in example.py for an example callback function.\n\nadd_player(self, callback, name)\n--------------------------------\nSimilar to above, but the first argument given to the callback in case of success is just the one, created Player\nobject. See its key-field to see what key it was assigned and store it in your application. It is necessary to give a\nname for the player. Rest of the optional arguments can be left out, in which case they will get default values\n\npurchase_virtual_good(self, callback, player_key, virtual_good_key)\n-------------------------------------------------------------------\nSimilarly to above, the first argument given to the callback in case of success is a VirtualGoodPurchase object\ndescribing the given information, or None in case of error, and the second argument is the error, or None. This function\nmust be called with the player key of the player who does the purchase, and the Virtual Good key of the Virtual Good\nbeing purchased.\n\nregister_payment_method(self, callback, player_key, cc_num, cc_csc, cc_name, cc_exp_month, cc_exp_year)\n-------------------------------------------------------------------------------------------------------\nSimilarly to above, the first argument given to the callback in case of success is a PaymentMethod object describing the\npayment method, or None in case of error, and the second argument is the error, or None. Key of the player whose payment\ndetails are being registered must be provided, and the credit card details (without spaces): Number, CVC (security\ncode), name of the card holder (exactly as written on the credit card), expiration month as string with two digits\n(\"03\") and expiration year as string.\n\nstop()\n------\nIf IntraZon SDK is used in non-blocking mode, this must be called before exiting the program in order to stop the\ncommunication thread.", "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/alpenwolf/intrazon-python", "keywords": "intrazon", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "intrazon-python", "package_url": "https://pypi.org/project/intrazon-python/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/intrazon-python/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://bitbucket.org/alpenwolf/intrazon-python" }, "release_url": "https://pypi.org/project/intrazon-python/0.1.2.post3/", "requires_dist": null, "requires_python": null, "summary": "IntraZon python bindings", "version": "0.1.2.post3" }, "last_serial": 1759729, "releases": { "0.1.0": [], "0.1.0.post1": [ { "comment_text": "", "digests": { "md5": "bd11965c0b88111aa3eb254ebce14fec", "sha256": "da6f6314b80662e6a9a906fcfcde29171620a48ce1922760f99f3fd86e191dc8" }, "downloads": -1, "filename": "intrazon-python-0.1.0.post1.tar.gz", "has_sig": false, "md5_digest": "bd11965c0b88111aa3eb254ebce14fec", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8604, "upload_time": "2015-09-02T21:06:39", "url": "https://files.pythonhosted.org/packages/4b/e1/6c0269ac30f2760fd7364aa67c96ad4575901ec5059c2c8134d5c27fa21f/intrazon-python-0.1.0.post1.tar.gz" } ], "0.1.0.post2": [ { "comment_text": "", "digests": { "md5": "7368fb3d6300b7ba18f1d24fc8cc156f", "sha256": "7c49c4712b34dca9373523a45194e0cd86429db3bd0e13509257d0fbfbe76e3f" }, "downloads": -1, "filename": "intrazon-python-0.1.0.post2.tar.gz", "has_sig": false, "md5_digest": "7368fb3d6300b7ba18f1d24fc8cc156f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9845, "upload_time": "2015-09-02T21:11:21", "url": "https://files.pythonhosted.org/packages/4e/07/5fdceed337a31a504b6f3879dd2b0ffaee2939d1c548f2eff796db5a8952/intrazon-python-0.1.0.post2.tar.gz" } ], "0.1.0.post3": [ { "comment_text": "", "digests": { "md5": "8e0f16d4031707b6a479842684460db6", "sha256": "f58cf51cef1989751fadc03c07ad04360d29d37e63b898db850b5dc179fff113" }, "downloads": -1, "filename": "intrazon-python-0.1.0.post3.tar.gz", "has_sig": false, "md5_digest": "8e0f16d4031707b6a479842684460db6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9921, "upload_time": "2015-09-02T21:32:07", "url": "https://files.pythonhosted.org/packages/39/af/9bd2d93f7db5c17ca3fa1389c0a846f3e11f8e94180e9ffd2ad9b8bae73d/intrazon-python-0.1.0.post3.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "358fb29537823cb42e8f2216a8fb203c", "sha256": "a6ed63dcb2fd65098571f2f917271070a1bd3f03e02893513666d71acd1c03d8" }, "downloads": -1, "filename": "intrazon-python-0.1.1.tar.gz", "has_sig": false, "md5_digest": "358fb29537823cb42e8f2216a8fb203c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9883, "upload_time": "2015-09-25T09:36:23", "url": "https://files.pythonhosted.org/packages/b4/b2/5fd8b8c2835cdaa436e2932b465a51fea532b122de2c0748dafa345653af/intrazon-python-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "f3dcea521ea1d126403c740cc23941f4", "sha256": "cf88629a21ba91cda5aa4865a2da7ecb5a7c89f85ec6cd0815c4eee496193e62" }, "downloads": -1, "filename": "intrazon-python-0.1.2.tar.gz", "has_sig": false, "md5_digest": "f3dcea521ea1d126403c740cc23941f4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9953, "upload_time": "2015-10-09T08:24:53", "url": "https://files.pythonhosted.org/packages/2f/19/8dca3c8ecdde8c2c6c4954c846ebfd9c3dbbc3fd13a4cdbdfd6e207ac87b/intrazon-python-0.1.2.tar.gz" } ], "0.1.2.post1": [ { "comment_text": "", "digests": { "md5": "73e142d8c32efb1500551bbeef6062fa", "sha256": "7230784b3d2e9e84e439aafa86f09903c6481d98e743d7dbd71c2407b4dced1d" }, "downloads": -1, "filename": "intrazon-python-0.1.2.post1.tar.gz", "has_sig": false, "md5_digest": "73e142d8c32efb1500551bbeef6062fa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9932, "upload_time": "2015-10-09T08:27:04", "url": "https://files.pythonhosted.org/packages/0f/90/6169b1dd1ff49030dcd9adae2be18c03b76a532ae0fa257f871dbecf92fb/intrazon-python-0.1.2.post1.tar.gz" } ], "0.1.2.post2": [ { "comment_text": "", "digests": { "md5": "fb96985f0a3157a03411a94b079462b4", "sha256": "204eda8649383fcfb46ca8ece046bfa9a314dd26a4ab692ab432661266642cb3" }, "downloads": -1, "filename": "intrazon-python-0.1.2.post2.tar.gz", "has_sig": false, "md5_digest": "fb96985f0a3157a03411a94b079462b4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11549, "upload_time": "2015-10-09T09:52:57", "url": "https://files.pythonhosted.org/packages/62/2c/9c8e1c0006c453d660d7a1ae67c3b7b55b13a89445310781b06ea1cb0d3e/intrazon-python-0.1.2.post2.tar.gz" } ], "0.1.2.post3": [ { "comment_text": "", "digests": { "md5": "6a3603419209ce2ddf17163a10724d40", "sha256": "5dea541c2aa10060e5ca66322d91825495e271b6dfcd759abaaff1daee2af18c" }, "downloads": -1, "filename": "intrazon-python-0.1.2.post3.tar.gz", "has_sig": false, "md5_digest": "6a3603419209ce2ddf17163a10724d40", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11546, "upload_time": "2015-10-09T09:58:08", "url": "https://files.pythonhosted.org/packages/08/f6/885fcad0f1978c3f148dd4cee33002e1f08f1ba04cf4ab18f9735200a828/intrazon-python-0.1.2.post3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6a3603419209ce2ddf17163a10724d40", "sha256": "5dea541c2aa10060e5ca66322d91825495e271b6dfcd759abaaff1daee2af18c" }, "downloads": -1, "filename": "intrazon-python-0.1.2.post3.tar.gz", "has_sig": false, "md5_digest": "6a3603419209ce2ddf17163a10724d40", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11546, "upload_time": "2015-10-09T09:58:08", "url": "https://files.pythonhosted.org/packages/08/f6/885fcad0f1978c3f148dd4cee33002e1f08f1ba04cf4ab18f9735200a828/intrazon-python-0.1.2.post3.tar.gz" } ] }