Skip to main content

A python wrapper for Fortnite-API.com

Project description

Sync/Async Python wrapper for Fortnite-API.com

GitHub issues PyPI - Downloads PyPI PyPI - Python Version Support

This library offers a complete sync and async wrapper around the endpoints of Fortnite-API.com

Installation

pip install fortnite-api

Documentation

Here is a quick overview how to start.

First we need to import the api and initialize client.

import fortnite_api

fortnite_client = fortnite_api.FortniteAPI()
Parameters
  • api_key [str] (Optional) - Enter the API key you will get if you requested a higher rate limit
  • run_async [bool] (Optional) - Specify if the API should run async. Default is set to false
Attributes
  • cosmetics - All cosmetic endpoints
  • shop - All shop endpoints
  • news - All news endpoints



Now we can use the client:

Cosmetics

api.cosmetics.fetch_all()

Get all Br cosmetics.

Parameters
  • language [GameLanguage] (Optional) - Specify the language of the shop. Default is set to english
Returns

Returns a list of BrCosmetic objects.


api.cosmetics.search_by_id()

Search one o multiple items by their id.

Parameters
  • *cosmetic_id - One or multiple cosmetic ids.
  • language [GameLanguage] (Optional) - Specify the language of the shop. Default is set to english
Returns

Returns a list of BrCosmetic objects. None if not found.


api.cosmetics.search_all()

Search all cosmetics which fit to the search parameters

Parameters
  • **search_parameters - All search parameters are listed on the Fortnite-API.com Docs. Remember that Python does not use a camel case. So e.g. searchLanguage becomes search_language
  • language [GameLanguage] (Optional) - Specify the language of the shop. Default is set to english
Returns

Returns a list of BrCosmetic objects. None if not found.


api.cosmetics.search_first()

Search the first cosmetics which fit to the search parameters

Parameters
  • **search_parameters (Optional) - All search parameters are listed on the Fortnite-API.com Docs. Remember that Python does not use a camel case. So e.g. searchLanguage becomes search_language
  • language [GameLanguage] (Optional) - Specify the language of the shop. Default is set to english
Returns

Returns a BrCosmetic objects. None if not found.


Shop

api.shop.fetch()

Get the latest Fortnite shop.

Parameters
  • language [GameLanguage] (Optional) - Specify the language of the shop. Default is set to english
Returns

Returns a Shop object.


News

api.news.fetch()

Get the latest Fortnite news of all game modes.

Parameters
  • language [GameLanguage] (Optional) - Specify the language of the shop. Default is set to english
Returns

Returns a News object.


api.news.fetch_by_type()

Get the latest Fortnite news of a specified game mode.

Parameters
  • news_type [NewsType] - Specify the news type.
  • language [GameLanguage] (Optional) - Specify the language of the shop. Default is set to english
Returns

Returns a GameModeNews object.

Contribute

Every type of contribution is appreciated!

License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fortnite-api-1.0.0.post3.tar.gz (8.4 kB view details)

Uploaded Source

File details

Details for the file fortnite-api-1.0.0.post3.tar.gz.

File metadata

  • Download URL: fortnite-api-1.0.0.post3.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.8.0

File hashes

Hashes for fortnite-api-1.0.0.post3.tar.gz
Algorithm Hash digest
SHA256 030ad3f384023597bc03adba1592dcf42cfafa5cd4e51e187e53e5309c821d02
MD5 5c899b7e9fc202dc61c05131a3e59107
BLAKE2b-256 bd7b93679ba626d04e5a7c5393fa957229198c7e44e3034d8cc0c7e01ce6c2ff

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page