{ "info": { "author": "ScrappyCocco", "author_email": "", "bugtrack_url": null, "classifiers": [], "description": "# HowLongToBeat Python API\n[![Build Status](https://travis-ci.org/ScrappyCocco/HowLongToBeat-PythonAPI.svg?branch=master)](https://travis-ci.org/ScrappyCocco/HowLongToBeat-PythonAPI)\n[![codecov](https://codecov.io/gh/ScrappyCocco/HowLongToBeat-PythonAPI/branch/master/graph/badge.svg)](https://codecov.io/gh/ScrappyCocco/HowLongToBeat-PythonAPI)\n\nA simple Python API to read data from howlongtobeat.com.\n\nIt is inspired by [ckatzorke - howlongtobeat](https://github.com/ckatzorke/howlongtobeat) JS API.\n\n## Usage\n\n## Installation\n\n### Installing the package downloading the last release\n\n```python\npip install howlongtobeatpy\n```\n\n### Installing the package from the source code\n\nDownload the repo, enter the folder with 'setup.py' and run the command\n\n```python\npip install .\n```\n\n## Usage in code\n\n### Start including it in your file\n\n```python\nfrom howlongtobeatpy import HowLongToBeat\n```\n\n### Now call search()\n\nThe API main functions are:\n\n```python\nresults = HowLongToBeat().search(\"Awesome Game\")\n```\n\nor, if you prefer using async:\n\n```python\nresults = await HowLongToBeat().async_search(\"Awesome Game\")\n```\n\nThe return of that function is a **list** of possible games, or **None** in case you passed an invalid \"game name\" as parameter or if there was an error in the request.\n\nIf the list **is not None** you should choose the best entry checking the Similarity value with the original name, example:\n\n```python\nresults_list = await HowLongToBeat().async_search(\"Awesome Game\")\nif results_list is not None and len(results_list) > 0:\n max_sim = -1\n best_element = None\n for element in results_list:\n if element.similarity > max_sim:\n max_sim = element.similarity\n best_element = element\n```\n\nAt the end of the for cycle \"best_element\" will contain the best game found in the research.\n\n### Reading an entry\n\nAn entry is made of few values, you can check them [in the Entry class file](https://github.com/ScrappyCocco/HowLongToBeat-PythonAPI/blob/master/howlongtobeatpy/howlongtobeatpy/HowLongToBeatEntry.py)\n\n## Found a bug?\n\nPlease report it as soon as you can creating an [issue](https://github.com/ScrappyCocco/HowLongToBeat-PythonAPI/issues/new), the code may not be perfect.\n\n## Authors\n\n* **ScrappyCocco**\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ScrappyCocco/HowLongToBeat-PythonAPI", "keywords": "howlongtobeat gaming steam uplay origin time length how long to beat", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "howlongtobeatpy", "package_url": "https://pypi.org/project/howlongtobeatpy/", "platform": "", "project_url": "https://pypi.org/project/howlongtobeatpy/", "project_urls": { "Homepage": "https://github.com/ScrappyCocco/HowLongToBeat-PythonAPI" }, "release_url": "https://pypi.org/project/howlongtobeatpy/0.1.4/", "requires_dist": null, "requires_python": "", "summary": "A Python API for How Long to Beat", "version": "0.1.4" }, "last_serial": 4755999, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "b1a36b33b01a4b67e8dcf84b99352105", "sha256": "6d1fde38a6e89c54eea6b3e789826d57f4c51948325bff07d1d3e7aef8f780e6" }, "downloads": -1, "filename": "howlongtobeatpy-0.1.1.tar.gz", "has_sig": false, "md5_digest": "b1a36b33b01a4b67e8dcf84b99352105", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4972, "upload_time": "2018-12-29T12:09:29", "url": "https://files.pythonhosted.org/packages/2b/47/2d2606b689a4227e149ffeb4cc570c891fd47c3f7be79fde924a56cf0a9a/howlongtobeatpy-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "846c2aab7e40a11935c5d860df84c935", "sha256": "5efd3bc71054362d6ed44df8c8da42355116a057a3c4f178faf08f1e30eae5e1" }, "downloads": -1, "filename": "howlongtobeatpy-0.1.2.tar.gz", "has_sig": false, "md5_digest": "846c2aab7e40a11935c5d860df84c935", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5212, "upload_time": "2018-12-29T13:58:48", "url": "https://files.pythonhosted.org/packages/9b/6f/52dd98f8eb3922f2b7601b2293c7f0da640c3c84c7522417a3fb8bff1593/howlongtobeatpy-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "b675e3acd9f5e7ffaa10f499d0220622", "sha256": "9402a2e04975523d2fec70a56fb5f7337e85ef5f8bc43793b9d3be741b1addfa" }, "downloads": -1, "filename": "howlongtobeatpy-0.1.3.tar.gz", "has_sig": false, "md5_digest": "b675e3acd9f5e7ffaa10f499d0220622", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5208, "upload_time": "2019-01-19T14:19:40", "url": "https://files.pythonhosted.org/packages/9e/62/beffdcd225f8c5bba2bd12e56ea689bcd66ff9f99bac16e3f3aaab45d25c/howlongtobeatpy-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "973d7c99659137c8d0eec17e68d77efe", "sha256": "64d28187bc08471b8fb439ac38071a7dd589256373bc55a2cbab3a4eb45f3b37" }, "downloads": -1, "filename": "howlongtobeatpy-0.1.4.tar.gz", "has_sig": false, "md5_digest": "973d7c99659137c8d0eec17e68d77efe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5257, "upload_time": "2019-01-29T17:44:51", "url": "https://files.pythonhosted.org/packages/97/99/7f56d58eaf72528ddcb08590069ab5b71a7f35ba59c5c6d44c47cfaaed9a/howlongtobeatpy-0.1.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "973d7c99659137c8d0eec17e68d77efe", "sha256": "64d28187bc08471b8fb439ac38071a7dd589256373bc55a2cbab3a4eb45f3b37" }, "downloads": -1, "filename": "howlongtobeatpy-0.1.4.tar.gz", "has_sig": false, "md5_digest": "973d7c99659137c8d0eec17e68d77efe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5257, "upload_time": "2019-01-29T17:44:51", "url": "https://files.pythonhosted.org/packages/97/99/7f56d58eaf72528ddcb08590069ab5b71a7f35ba59c5c6d44c47cfaaed9a/howlongtobeatpy-0.1.4.tar.gz" } ] }