fortnite-api


Namefortnite-api JSON
Version 2.6.7 PyPI version JSON
download
home_pagehttps://github.com/Fortnite-API/py-wrapper
SummaryA python wrapper for Fortnite-API.com
upload_time2024-05-03 19:48:10
maintainerNone
docs_urlNone
authorLuc1412
requires_python>=3.6.15
licenseMIT
keywords fortnite fortnite-api.com shop cosmetics fortnite api fortnite shop
VCS
bugtrack_url
requirements requests aiohttp
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Sync/Async Python wrapper for [Fortnite-API.com](https://fortnite-api.com)
![GitHub issues](https://img.shields.io/github/issues/Fortnite-API/py-wrapper?logo=github)
[![PyPI - Downloads](https://img.shields.io/pypi/dm/fortnite-api)](https://pypi.org/project/fortnite-api)
[![PyPI](https://img.shields.io/pypi/v/fortnite-api)](https://pypi.org/project/fortnite-api)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/fortnite-api?label=python%20version&logo=python&logoColor=yellow)
[![Support](https://discordapp.com/api/guilds/621452110558527502/widget.png?style=shield)](https://discord.gg/T4tyYDK)
<br><br>
This library offers a complete **sync** and **async** wrapper around the endpoints of [Fortnite-API.com](https://fortnite-api.com)

## Installation
```
pip install fortnite-api
```
- Get a API key on https://dash.fortnite-api.com/account

## Documentation
Here is a quick overview how to start.<br><br>
First we need to import the api and initialize client.
```
import fortnite_api

api = fortnite_api.FortniteAPI()
```
###### Parameters
- `api_key` [str] (Optional) - Insert your API key from https://dash.fortnite-api.com/account
- `run_async` [bool] (Optional) - Specify if the API should run async. Default value is `False`
###### Attributes
- `cosmetics` - All cosmetic endpoints
- `shop` - All shop endpoints
- `news` - All news endpoints

<br><br>
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.fetch_new()
```
Get all new Br cosmetics.
###### Parameters
- `language` [GameLanguage] (Optional) - Specify the language of the shop. Default is set to english
###### Returns
Returns a `NewBrCosmetics` object.

___

```
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.

___

```
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](https://fortnite-api.com/documentation). 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.

___

```
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](https://fortnite-api.com/documentation). 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.

___

### Playlist
```
api.playlists.fetch_all()
```
Get all Br playlists.
###### Parameters
- `language` [GameLanguage] (Optional) - Specify the language of the playlists. Default is set to english
###### Returns
Returns a list of `Playlist` objects.

```
api.cosmetics.fetch_by_id()
```
Get a playlist by id.
###### Parameters
- `id` [str] - Specify the playlist id.
- `language` [GameLanguage] (Optional) - Specify the language of the shop. Default is set to english
###### Returns
Returns a `Playlist` object.

___


### Shop 
```
api.shop.fetch()
```
Get the latest Fortnite shop.
###### Parameters
- `language` [GameLanguage] (Optional) - Specify the language of the shop. Default is set to english
- `combined` [bool] (Optional) - Enable that `special_featured` and `special_daily` are moved into `featured` and `daily`
###### Returns
Returns a `Shop` object. 

___

### AES 
```
api.aes.fetch()
```
Get the latest Fortnite AES Key. This also include version and build information.
###### Parameters
- `key_format` [KeyFormat] (Optional) - Specify the AES key format. Default is set to HEX
###### Returns
Returns a `AES` 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.

___

### Creator Code
```
api.creator_code.fetch()
```
Get information about a creator code.
###### Parameters
- `name` [str] - Specify a creator code.
###### Returns
Returns a `CreatorCode` object.

___

```
api.creator_code.exists()
```
Check if a creator code exists.
###### Parameters
- `name` [str] - Specify a creator code.
###### Returns
Returns a `bool` object.

___


```
api.creator_code.search_all()
```
Search a creator code by name. All results are provided.
###### Parameters
- `name` [str] - Specify a creator code.
###### Returns
Returns a `list` of `CreatorCode` objects.

___


```
api.creator_code.search_first()
```
Search a creator code by name. Only the first result is provided.
###### Parameters
- `name` [str] - Specify a creator code.
###### Returns
Returns a `CreatorCode` object.

___

### BR Stats
```
api.stats.fetch_by_name()
```
Returns stats of the requested player account.
###### Parameters
- `name` [str] - Sets the account name.
- `account_type` [AccountType] (Optional) - Sets the account type.
- `time_window` [TimeWindow] (Optional) - Sets the time window.
- `image` [StatsImageType] (Optional) - Sets the image platform.
###### Returns
Returns a `BrPlayerStats` object.

___

```
api.stats.fetch_by_id()
```
Returns stats of the requested player account by its account id.
###### Parameters
- `account_id` [str] - Sets the account id.
- `time_window` [TimeWindow] (Optional) - Sets the time window.
- `image` [StatsImageType] (Optional) - Sets the image platform.
###### Returns
Returns a `BrPlayerStats` object.

### Banner
```
api.cosmetics.fetch()
```
Get all banners.
###### Parameters
- `language` [GameLanguage] (Optional) - Specify the language of the banners. Default is set to english
###### Returns
Returns a `Banner` object.

___

```
api.cosmetics.fetch_colors()
```
Get all banner colors.
###### Returns
Returns a list of `BannerColor` objects.


### Map
```
api.map.fetch()
```
Get the current map information.
###### Parameters
- `language` [GameLanguage] (Optional) - Specify the language of the map pois. Default is set to english.
###### Returns
Returns a `Map` object.

___



## Contribute
Every type of contribution is appreciated!

## License
- Fortnite-API Wrapper (MIT) [License](https://github.com/Fortnite-API/python-wrapper/blob/master/LICENSE)
- requests (Apache) [License](https://github.com/psf/requests/blob/master/LICENSE)
- aiohttp (Apache) [License](https://github.com/aio-libs/aiohttp/blob/6a5ab96bd9cb404b4abfd5160fe8f34a29d941e5/LICENSE.txt)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Fortnite-API/py-wrapper",
    "name": "fortnite-api",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6.15",
    "maintainer_email": null,
    "keywords": "fortnite, fortnite-api.com, shop, cosmetics, fortnite api, fortnite shop",
    "author": "Luc1412",
    "author_email": "Luc1412.lh@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/9b/3c/a1ae711a2a983b39df218f0f780b5a98d993e9ba1841f59c201f00ed8db5/fortnite_api-2.6.7.tar.gz",
    "platform": null,
    "description": "# Sync/Async Python wrapper for [Fortnite-API.com](https://fortnite-api.com)\n![GitHub issues](https://img.shields.io/github/issues/Fortnite-API/py-wrapper?logo=github)\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/fortnite-api)](https://pypi.org/project/fortnite-api)\n[![PyPI](https://img.shields.io/pypi/v/fortnite-api)](https://pypi.org/project/fortnite-api)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/fortnite-api?label=python%20version&logo=python&logoColor=yellow)\n[![Support](https://discordapp.com/api/guilds/621452110558527502/widget.png?style=shield)](https://discord.gg/T4tyYDK)\n<br><br>\nThis library offers a complete **sync** and **async** wrapper around the endpoints of [Fortnite-API.com](https://fortnite-api.com)\n\n## Installation\n```\npip install fortnite-api\n```\n- Get a API key on https://dash.fortnite-api.com/account\n\n## Documentation\nHere is a quick overview how to start.<br><br>\nFirst we need to import the api and initialize client.\n```\nimport fortnite_api\n\napi = fortnite_api.FortniteAPI()\n```\n###### Parameters\n- `api_key` [str] (Optional) - Insert your API key from https://dash.fortnite-api.com/account\n- `run_async` [bool] (Optional) - Specify if the API should run async. Default value is `False`\n###### Attributes\n- `cosmetics` - All cosmetic endpoints\n- `shop` - All shop endpoints\n- `news` - All news endpoints\n\n<br><br>\nNow we can use the client:\n### Cosmetics\n```\napi.cosmetics.fetch_all()\n```\nGet all Br cosmetics.\n###### Parameters\n- `language` [GameLanguage] (Optional) - Specify the language of the shop. Default is set to english\n###### Returns\nReturns a list of `BrCosmetic` objects.\n\n```\napi.cosmetics.fetch_new()\n```\nGet all new Br cosmetics.\n###### Parameters\n- `language` [GameLanguage] (Optional) - Specify the language of the shop. Default is set to english\n###### Returns\nReturns a `NewBrCosmetics` object.\n\n___\n\n```\napi.cosmetics.search_by_id()\n```\nSearch one o multiple items by their id.\n###### Parameters\n- `*cosmetic_id` - One or multiple cosmetic ids.\n- `language` [GameLanguage] (Optional) - Specify the language of the shop. Default is set to english\n###### Returns\nReturns a list of `BrCosmetic` objects.\n\n___\n\n```\napi.cosmetics.search_all()\n```\nSearch all cosmetics which fit to the search parameters\n###### Parameters\n- `**search_parameters` - All search parameters are listed on the [Fortnite-API.com Docs](https://fortnite-api.com/documentation). Remember that Python does not use a camel case. So e.g. `searchLanguage` becomes `search_language`\n- `language` [GameLanguage] (Optional) - Specify the language of the shop. Default is set to english\n###### Returns\nReturns a list of `BrCosmetic` objects.\n\n___\n\n```\napi.cosmetics.search_first()\n```\nSearch the first cosmetics which fit to the search parameters\n###### Parameters\n- `**search_parameters` (Optional) - All search parameters are listed on the [Fortnite-API.com Docs](https://fortnite-api.com/documentation). Remember that Python does not use a camel case. So e.g. `searchLanguage` becomes `search_language`\n- `language` [GameLanguage] (Optional) - Specify the language of the shop. Default is set to english\n###### Returns\nReturns a `BrCosmetic` objects.\n\n___\n\n### Playlist\n```\napi.playlists.fetch_all()\n```\nGet all Br playlists.\n###### Parameters\n- `language` [GameLanguage] (Optional) - Specify the language of the playlists. Default is set to english\n###### Returns\nReturns a list of `Playlist` objects.\n\n```\napi.cosmetics.fetch_by_id()\n```\nGet a playlist by id.\n###### Parameters\n- `id` [str] - Specify the playlist id.\n- `language` [GameLanguage] (Optional) - Specify the language of the shop. Default is set to english\n###### Returns\nReturns a `Playlist` object.\n\n___\n\n\n### Shop \n```\napi.shop.fetch()\n```\nGet the latest Fortnite shop.\n###### Parameters\n- `language` [GameLanguage] (Optional) - Specify the language of the shop. Default is set to english\n- `combined` [bool] (Optional) - Enable that `special_featured` and `special_daily` are moved into `featured` and `daily`\n###### Returns\nReturns a `Shop` object. \n\n___\n\n### AES \n```\napi.aes.fetch()\n```\nGet the latest Fortnite AES Key. This also include version and build information.\n###### Parameters\n- `key_format` [KeyFormat] (Optional) - Specify the AES key format. Default is set to HEX\n###### Returns\nReturns a `AES` object. \n\n___\n\n### News\n```\napi.news.fetch()\n```\nGet the latest Fortnite news of all game modes.\n###### Parameters\n- `language` [GameLanguage] (Optional) - Specify the language of the shop. Default is set to english\n###### Returns\nReturns a `News` object.\n\n___\n\n\n```\napi.news.fetch_by_type()\n```\nGet the latest Fortnite news of a specified game mode.\n###### Parameters\n- `news_type` [NewsType] - Specify the news type.\n- `language` [GameLanguage] (Optional) - Specify the language of the shop. Default is set to english\n###### Returns\nReturns a `GameModeNews` object.\n\n___\n\n### Creator Code\n```\napi.creator_code.fetch()\n```\nGet information about a creator code.\n###### Parameters\n- `name` [str] - Specify a creator code.\n###### Returns\nReturns a `CreatorCode` object.\n\n___\n\n```\napi.creator_code.exists()\n```\nCheck if a creator code exists.\n###### Parameters\n- `name` [str] - Specify a creator code.\n###### Returns\nReturns a `bool` object.\n\n___\n\n\n```\napi.creator_code.search_all()\n```\nSearch a creator code by name. All results are provided.\n###### Parameters\n- `name` [str] - Specify a creator code.\n###### Returns\nReturns a `list` of `CreatorCode` objects.\n\n___\n\n\n```\napi.creator_code.search_first()\n```\nSearch a creator code by name. Only the first result is provided.\n###### Parameters\n- `name` [str] - Specify a creator code.\n###### Returns\nReturns a `CreatorCode` object.\n\n___\n\n### BR Stats\n```\napi.stats.fetch_by_name()\n```\nReturns stats of the requested player account.\n###### Parameters\n- `name` [str] - Sets the account name.\n- `account_type` [AccountType] (Optional) - Sets the account type.\n- `time_window` [TimeWindow] (Optional) - Sets the time window.\n- `image` [StatsImageType] (Optional) - Sets the image platform.\n###### Returns\nReturns a `BrPlayerStats` object.\n\n___\n\n```\napi.stats.fetch_by_id()\n```\nReturns stats of the requested player account by its account id.\n###### Parameters\n- `account_id` [str] - Sets the account id.\n- `time_window` [TimeWindow] (Optional) - Sets the time window.\n- `image` [StatsImageType] (Optional) - Sets the image platform.\n###### Returns\nReturns a `BrPlayerStats` object.\n\n### Banner\n```\napi.cosmetics.fetch()\n```\nGet all banners.\n###### Parameters\n- `language` [GameLanguage] (Optional) - Specify the language of the banners. Default is set to english\n###### Returns\nReturns a `Banner` object.\n\n___\n\n```\napi.cosmetics.fetch_colors()\n```\nGet all banner colors.\n###### Returns\nReturns a list of `BannerColor` objects.\n\n\n### Map\n```\napi.map.fetch()\n```\nGet the current map information.\n###### Parameters\n- `language` [GameLanguage] (Optional) - Specify the language of the map pois. Default is set to english.\n###### Returns\nReturns a `Map` object.\n\n___\n\n\n\n## Contribute\nEvery type of contribution is appreciated!\n\n## License\n- Fortnite-API Wrapper (MIT) [License](https://github.com/Fortnite-API/python-wrapper/blob/master/LICENSE)\n- requests (Apache) [License](https://github.com/psf/requests/blob/master/LICENSE)\n- aiohttp (Apache) [License](https://github.com/aio-libs/aiohttp/blob/6a5ab96bd9cb404b4abfd5160fe8f34a29d941e5/LICENSE.txt)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A python wrapper for Fortnite-API.com",
    "version": "2.6.7",
    "project_urls": {
        "Code": "https://github.com/Fortnite-API/py-wrapper",
        "Download": "https://github.com/Fortnite-API/py-wrapper/archive/refs/tags/v2.6.7.tar.gz",
        "Homepage": "https://github.com/Fortnite-API/py-wrapper",
        "Issue tracker": "https://github.com/Fortnite-API/py-wrapper/issues"
    },
    "split_keywords": [
        "fortnite",
        " fortnite-api.com",
        " shop",
        " cosmetics",
        " fortnite api",
        " fortnite shop"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9b3ca1ae711a2a983b39df218f0f780b5a98d993e9ba1841f59c201f00ed8db5",
                "md5": "f843de02ba9101c1194c2d55d441ed09",
                "sha256": "7b8ef066ad55ac41006fa1bc4f3ee178cff379ab286275a403f12e24955a1a1b"
            },
            "downloads": -1,
            "filename": "fortnite_api-2.6.7.tar.gz",
            "has_sig": false,
            "md5_digest": "f843de02ba9101c1194c2d55d441ed09",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6.15",
            "size": 19441,
            "upload_time": "2024-05-03T19:48:10",
            "upload_time_iso_8601": "2024-05-03T19:48:10.024653Z",
            "url": "https://files.pythonhosted.org/packages/9b/3c/a1ae711a2a983b39df218f0f780b5a98d993e9ba1841f59c201f00ed8db5/fortnite_api-2.6.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-03 19:48:10",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Fortnite-API",
    "github_project": "py-wrapper",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "requests",
            "specs": [
                [
                    ">=",
                    "2.22.0"
                ]
            ]
        },
        {
            "name": "aiohttp",
            "specs": [
                [
                    ">=",
                    "3.9.0"
                ],
                [
                    "<",
                    "4.0.0"
                ]
            ]
        }
    ],
    "lcname": "fortnite-api"
}
        
Elapsed time: 0.37176s