{ "info": { "author": "KarkaLT", "author_email": "karoliscd@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "## FortniteAPI\nSimple python library used to get fortnite player statistics, shop, challenges etc.\n\nThis library uses [https://fortniteapi.com/](https://fortniteapi.com/) api to get all statistics and other stuff.\n\nYou don't need any api keys for [https://fortniteapi.com/](https://fortniteapi.com/).\n\nPackage needs requests library.\n\n## Challenges\nUsed to get seasonal battle pass challenges.\n\n from FortniteAPI import Challenges\n\n base = Challenges(7) # Season number\n print(base.season) # Prints season\n print(base.current_week) # Prints current season week\n print(base.star) # Prints link of a battle star image\n\n challenges = base.get_challenges(5) # Week number\n for challenge in challenges:\n\t print(challenge.id) # Prints challenge identifier\n\t print(challenge.challenge) # Prints challenge\n\t print(challenge.count) # Prints challenge amount\n\t print(challenge.stars) # Prints amount of rewarded battle star\n\t print(challenge.difficulty) # Prints challenge difficulty\n## Item\nUsed to specific item by its id.\n\n from FortniteAPI import Item\n\n item = Item(\"61ea3e9-8438e42-f53d351-e53a5ce\")\n print(item.id) # Prints item identifier\n print(item.name) # Prints item name\n print(item.description) # Prints item description\n print(item.price) # Prints item price\n print(item.type) # Prints item type\n print(item.rarity) # Prints item rarity\n print(item.transparent) # Prints link of transparent image of item\n print(item.background) # Prints link of image with background of item\n print(item.information) # Prints link of image with information of item\n**Note:**\n Sometimes when printing name can cause encoding errors. To prevent that encode item name.\n\n print(item.name.encode('utf-8'))\nYou can check if item is in store today:\n\n if item.in_store():\n\t # Do stuff if in store\n\telse:\n\t\t# Do stuff if item isn't in store\nChecking if item is upcoming:\n\n if item.is_upcoming():\n\t # Do stuff if is upcoming\n\telse:\n\t\t# Do stuff if item is already realesed\n## Items\nUsed to get all Fortnite items.\n\n from FortniteAPI import Items\n\n items = Items().get_items()\n for item in items:\n\t print(item.id) # Prints item identifier\n\t print(item.name) # Prints item name\n\t print(item.description) # Prints item description\n\t print(item.price) # Prints item price\n\t print(item.rarity) # Prints item rarity\n\t print(item.type) # Prints item type\n\t print(item.image) # Prints link of transparent image of item\n\t print(item.background) # Prints link of image with background of item\n\t print(item.information) # Prints link of image with information of item\n **Note:**\n Sometimes when printing name can cause encoding errors. To prevent that encode item name.\n\n print(item.name.encode('utf-8'))\n## News\nUsed to get Fortnite news.\n\n from FortniteAPI import News\n\n news = News().get_news()\n for new in news:\n\t print(new.title) # Prints news title\n\t print(new.body) # Prints body\n\t print(new.image) # Prints image link\n\t print(new.time) # Prints time when news was posted\n## Shop\nUsed to get daily Fortnite shop.\n\n from FortniteAPI import Shop\n\n shop = Shop()\n print(shop.date) # Prints shop date\n print(shop.vbucks) # Prints link of vbucks icon\n\n items = shop.get_items()\n for item in items:\n\t print(item.id) # Prints item identifier\n\t print(item.name) # Prints item name\n\t print(item.price) # Prints item price\n\t print(item.rarity) # Prints item rarity\n\t print(item.type) # Prints item type\n\t print(item.image) # Prints link of transparent image of item\n\t print(item.transparent) # Prints link of transparent image of item\n\t print(item.background) # Prints link of image with background of item\n\t print(item.information) # Prints link of image with information of item\n## Stats\nUsed to get player statistics.\n\n from FortniteAPI import Stats\n\n stats = Stats(\"4735ce9132924caf8a5b17789b40f79c\") # User id\n print(stats.user_id) # Prints user id\n print(stats.username) # Prints username\n print(stats.devices) # Prints available user devices\nStatistics are categorized by device. If user haven't played on that device, it will return `None`\nAvailable devices:\n\n - Keyboard and mouse: `keyboard`\n - Controller: `controller`\n - Touch screen: `touch`\n\nNext you need to provide game mode.\nAvailable game modes:\n\n - Solo: `solo`\n - Duo: `duo`\n - Squad: `squad`\n - Overall: `overall`\n\nNow you need to provide data type you want.\n - Score: `score`\n - Wins: `wins`\n - Matches: `matches`\n - Kills: `kills`\n - Winrate: `winrate`\n - Average kills: `avg_kills`\n - Deaths: `deaths`\n - Kill-death ratio: `kd`\n\nFor example if you wanted to access players solo wins while playing with controller:\n\n print(stats.controller.solo.wins) # Prints solo wins while playing with controller\n## Status\nUsed to check if Fortnite servers are running.\n\n from FortniteAPI import Status\n\n status = Status()\n print(status.status) # Prints UP if Fortnite is working properly\n print(status.message) # Prints status message\n print(status.version) # Prints current version of Fortnite game\n print(status.up_since) # Prints the time when Fortnite started running\n print(status.uptime) # Prints uptime\n print(status.formatted) # Prints formatted uptime\n\n## Upcoming\nUsed to get unrealesed items in Fortnite.\n\n from FortniteAPI import Upcoming\n\n upcoming = Upcoming()\n print(upcoming.vbucks) # Prints link of vbucks icon\n\n items = upcoming.get_items()\n for item in items:\n\t print(item.id) # Prints item identifier\n print(item.name) # Prints item name\n print(item.price) # Prints item price\n\t print(item.rarity) # Prints item rarity\n\t print(item.type) # Prints item type\n\t print(item.image) # Prints link of transparent image of item\n\t print(item.transparent) # Prints link of transparent image of item\n\t print(item.background) # Prints link of image with background of item\n\t print(item.information) # Prints link of image with information of item\n## User\nUsed to user's identifier by username.\n\n from FortniteAPI import User\n\n user = User(\"Ninja\") # user's username\n print(user.id) # Prints user's indentifier\n print(user.username) # Prints user's username\n print(user.platforms) # Prints user's available platforms\n print(user.seasons) # Prints user's seasons\n**Note:**\nUsing `print(user.platforms)` returns not input devices, but platforms.\n## Weapons\nUsed to get all Fortnite weapon statistics.\n\n from FortniteAPI import Weapons\n\n weapons = Weapons().get_weapons()\n for weapon in weapons:\n\t print(weapon.name) # Prints weapon name\n\t print(weapon.rarity) # Prints weapon rarity\n\t print(weapon.head_damage) # Prints weapon headshot damage\n\t print(weapon.body_damage) # Prints weapon bodyshot damage\n\t print(weapon.dps) # Prints weapon damage per second\n\t print(weapon.firerate) # Prints weapon firerate\n\t print(weapon.reload) # Prints weapon reaload time\n\t print(weapon.magazine) # Prints weapon magazine size\n\t print(weapon.image) # Prints link of transparent image of weapon\n\t print(weapon.background) # Prints link of image with background of weapon", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://fortniteapi.com/", "keywords": "fortnite,stats,statistics,game", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "Fortnite-API-com", "package_url": "https://pypi.org/project/Fortnite-API-com/", "platform": "", "project_url": "https://pypi.org/project/Fortnite-API-com/", "project_urls": { "Homepage": "https://fortniteapi.com/" }, "release_url": "https://pypi.org/project/Fortnite-API-com/0.0.5/", "requires_dist": null, "requires_python": "", "summary": "Simple python wrapper for https://fortniteapi.com/", "version": "0.0.5" }, "last_serial": 4920864, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "7d44f003c5df4b7d110a89d03cbf869c", "sha256": "5bd645cf5f0cc2737ab6074f41b1e9fe9e62ab4cfdc58f2c2eb3961b5a2aba2a" }, "downloads": -1, "filename": "Fortnite-API-com-0.0.1.tar.gz", "has_sig": false, "md5_digest": "7d44f003c5df4b7d110a89d03cbf869c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5750, "upload_time": "2019-03-02T19:20:04", "url": "https://files.pythonhosted.org/packages/e4/20/646a0342828e8064ec0fd0fb260c80a445e43606f2475cd15ccee89d2aef/Fortnite-API-com-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "c60e89a3f73f98bdb53eb4661975ad7b", "sha256": "9bb6797b73b4d26c550b2b904797714507043b7e0163cb452927c8e2af30fb9b" }, "downloads": -1, "filename": "Fortnite-API-com-0.0.2.tar.gz", "has_sig": false, "md5_digest": "c60e89a3f73f98bdb53eb4661975ad7b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5758, "upload_time": "2019-03-02T19:29:02", "url": "https://files.pythonhosted.org/packages/8e/11/df845cca8cd0071de4310ffce009c9b0b03d9aa9deee1adea29dc0b5be04/Fortnite-API-com-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "a0fad2cef4420e6a8414cf4428902690", "sha256": "fa23f16cc006f03ea9262e503da4ff9a60aea9fac82c9ae5cb96c84e85aeb8ea" }, "downloads": -1, "filename": "Fortnite-API-com-0.0.3.tar.gz", "has_sig": false, "md5_digest": "a0fad2cef4420e6a8414cf4428902690", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5759, "upload_time": "2019-03-02T21:22:52", "url": "https://files.pythonhosted.org/packages/4e/b0/a9e3cb26c3faa77bb513d08a185dd70187d65582e6cbdeba60bd9a25a5ee/Fortnite-API-com-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "10e5fa42c7f370da82881eb26768de99", "sha256": "163cce5f5b9504276d71258473766155e581ed56f1bee9b247214839f1565093" }, "downloads": -1, "filename": "Fortnite-API-com-0.0.4.tar.gz", "has_sig": false, "md5_digest": "10e5fa42c7f370da82881eb26768de99", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5759, "upload_time": "2019-03-02T22:09:48", "url": "https://files.pythonhosted.org/packages/c1/75/e42b5400093ac8c660b38e03825579d676a659b92d990288823e9b1d6bd8/Fortnite-API-com-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "ad12a9321fa64c4675e5c8f8cf27abdb", "sha256": "6a9f3efcf0cf0f1612e1fd95ac170d71d1917189349ba2173034b7d61fa4aa73" }, "downloads": -1, "filename": "Fortnite-API-com-0.0.5.tar.gz", "has_sig": false, "md5_digest": "ad12a9321fa64c4675e5c8f8cf27abdb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5751, "upload_time": "2019-03-10T09:29:05", "url": "https://files.pythonhosted.org/packages/bf/cc/3c6a9df3387a0f2f6bc00739f7f06ef2f53436e53bc5f28b442755df9722/Fortnite-API-com-0.0.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ad12a9321fa64c4675e5c8f8cf27abdb", "sha256": "6a9f3efcf0cf0f1612e1fd95ac170d71d1917189349ba2173034b7d61fa4aa73" }, "downloads": -1, "filename": "Fortnite-API-com-0.0.5.tar.gz", "has_sig": false, "md5_digest": "ad12a9321fa64c4675e5c8f8cf27abdb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5751, "upload_time": "2019-03-10T09:29:05", "url": "https://files.pythonhosted.org/packages/bf/cc/3c6a9df3387a0f2f6bc00739f7f06ef2f53436e53bc5f28b442755df9722/Fortnite-API-com-0.0.5.tar.gz" } ] }