Objects¶
The API has many objects that represent different parts of the Fortnite API. Below is a list of all the objects and their attributes and methods.
- class fortnite_api.Account(*, data, http)¶
Represents a Fortnite account.
This inherits from
HashableandReconstructAble.- str(x)
Returns the account’s name.
- repr(x)
Returns a representation of the account in the form of a string.
- class fortnite_api.Aes(*, data, http)¶
- Attributes
Represents the object given to the client from the AES endpoint. This inherits from
ReconstructAble.- x == y
Checks if the two Aes objects are equal.
- x != y
Checks if two Aes objects are not equal.
- hash(x)
Returns the Aes main key and build’s hash.
- repr(x)
Returns a representation of the Aes object in the form of a string.
Examples
Fetching the current AES main key and build.¶aes = await client.fetch_aes() print(aes.main_key, aes.build)
Fetching the current version of Fortnite.¶aes = await client.fetch_aes() major, minor = aes.version print(f'Fortnite on version {major}.{minor}')
- main_key¶
The main encryption key. Can be
Noneif the current versions key is not available yet.- Type:
Optional[
str]
- version¶
The current version where the Aes key refers to. This will only be
Nonein the case that the API returned an invalidbuildvalue.- Type:
Optional[
fortnite_api.Version]
- updated¶
The date where the Aes was updates.
- Type:
- dynamic_keys¶
All current dynamic keys
- Type:
List[
fortnite_api.DynamicKey]
- class fortnite_api.Version(major, minor)¶
Represents a version of a build of Fortnite.
- repr(x)
Returns a representation of the account in the form of a string.
- str(x)
Returns the version in the form of a string. “
major.:attr:minor”
- iter(x)
Returns an iterator of the version. This will yield the major version and then the minor version.
major, minor = version
- class fortnite_api.DynamicKey(*, data, http)¶
- Attributes
Represents a dynamic key.
- x == y
Checks if the two dynamic keys are equal.
- x != y
Checks if two dynamic keys are not equal.
- str(x)
Returns the dynamic key’s pak filename.
- hash(x)
Returns the dynamic key’s hash.
- repr(x)
Returns a representation of the account in the form of a string.
- class fortnite_api.CosmeticsAll(*, data, http)¶
A class that represents a request to fetch all cosmetics available in Fortnite. This inherits from
ReconstructAble.- len(x)
Returns the total amount of cosmetics available.
- iter(x)
Returns an iterator of the cosmetics, working through one unique cosmetic type before continuing onto the next. Works in the following order:
CosmeticBr,CosmeticTrack,CosmeticInstrument,CosmeticCar,VariantLego,CosmeticLegoKit.
- repr(x)
Returns a representation of the account in the form of a string.
Fetching all cosmetics in Fortnite and printing their IDs.¶# (1) Fetch all the cosmetics using the client all_cosmetics = await client.fetch_cosmetics_all() # (2) Walk through each cosmetic for cosmetic in all_cosmetics: # (3) Print out their metadata print(cosmetic.id)
- br¶
A list of all battle royale cosmetics.
- Type:
List[
fortnite_api.CosmeticBr]
- tracks¶
A list of all track cosmetics.
- Type:
- instruments¶
A list of all instrument cosmetics.
- Type:
- cars¶
A list of all car cosmetics.
- Type:
List[
fortnite_api.CosmeticCar]
- lego¶
A list of all lego cosmetic variants.
- Type:
List[
fortnite_api.VariantLego]
- lego_kits¶
A list of all lego kit cosmetics.
- Type:
- class fortnite_api.Asset(*, http, url, max_size=..., size=...)¶
- Attributes
Represents an asset given to the client. An asset can represent any image or video that has been fetched from the API.
Examples
Fetching a cosmetic and reading the icon data:¶cosmetic = await client.fetch_cosmetic_br('CID_028_Athena_Commando_F') images = cosmetic.images if images is not None and images.icon is not None: icon: bytes = await images.icon.read()
- property max_size¶
returns: The max size of the asset. If
None, there is no max size. If -1, resizing is not allowed. :rtype: Optional[int]
- resize(size)¶
Resizes the asset to the given size.
- Parameters:
size (
int) – The size to resize the asset to. This must be a power of 2.- Returns:
The resized asset.
- Return type:
- Raises:
ValueError – This asset does not support resizing.
- class fortnite_api.Banner(*, data, http)¶
- Attributes
Represents a banner within the Fortnite game.
This inherits from
HashableandReconstructAble.- repr(x)
Returns a representation of the account in the form of a string.
Examples
Fetch all banners in Fortnite.¶# (1) Fetch all the banners using the client banners = await client.fetch_banners() # (2) Walk through each banner for banner in banners: # (3) Print out their metadata print(banner.id, banner.name, banner.description)
Fetch the images of all the banners in Fortnite.¶# (1) Fetch all the banners using the client banners = await client.fetch_banners() # (2) Walk through each banner for banner in banners: # (3) Print out the image URL of the banner print(banner.images.icon.url)
- name¶
The name of the banner. Can be
Noneif the banner is not named or no information is provided by the API.- Type:
Optional[
str]
- category¶
The category the banner belongs to. Can be
Noneif this banner does not belong to any category.- Type:
Optional[
str]
- dev_name¶
The developer name of the banner, this is used internally by the Epic Games team.
- Type:
- images¶
Preview images of the banner.
- Type:
- class fortnite_api.BannerColor(*, data, http)¶
- Attributes
Represents a color of a
fortnite_api.Banner.This inherits from
HashableandReconstructAble.- repr(x)
Returns a representation of the account in the form of a string.
- class fortnite_api.CreatorCode(*, data, http)¶
Represents a Creator Code.
This inherits from
ReconstructAble.- repr(x)
Returns a representation of the account in the form of a string.
- account¶
The account associated with the creator code. Ie, the account that owns the creator code.
- Type:
- status¶
The current status of the creator code.
- verified¶
Whether the creator code is verified.
Note
From internal testing, this seems to be always
False.- Type:
- class fortnite_api.Images(*, data, http)¶
- Attributes
Represents image data passed from the API. This class is used to represent commonly provided assets for many API endpoints and object types.
This inherits from
ReconstructAble.- repr(x)
Returns a representation of the account in the form of a string.
- small_icon¶
A smaller icon asset. Typically, this is a smaller version of the main image.
- Type:
Optional[
fortnite_api.Asset]
- icon¶
An icon asset. Typically, this is the main image of the object.
- Type:
Optional[
fortnite_api.Asset]
- class fortnite_api.Map(*, data, http)¶
Represents a Fortnite map. This inherits from
ReconstructAble.- repr(x)
Returns a representation of the account in the form of a string.
Examples
Getting the images of the Fortnite map.¶map = await client.fetch_map() print(map.images.pois.url) print(map.images.blank.url)
- images¶
The images of the map.
- Type:
- pois¶
The list of POIs in the map.
- Type:
List[
fortnite_api.POI]
- class fortnite_api.MapImages(*, data, http)¶
Represents the images of a given POI map. This inherits from
ReconstructAble.- repr(x)
Returns a representation of the account in the form of a string.
- blank¶
The asset pointing to an image of the map that does not contain any POI names.
- Type:
- pois¶
The asset pointing to an image of the map that contains the POI names.
- Type:
- class fortnite_api.POI(*, data, http)¶
Represents a specific POI in a Fortnite map.
This inherits from
HashableandReconstructAble.- repr(x)
Returns a representation of the account in the form of a string.
Examples
Getting all POIs in the Fortnite map.¶# (1) Fetch the map map = await client.fetch_map() # (2) walk through all the POIs for poi in map.pois: # (3) print the name & (x, y, z) coordinates print(poi.name, tuple(poi.location))
- location¶
The location of the POI.
- Type:
- class fortnite_api.POILocation(*, data, http)¶
Holds the x, y, z coordinates of a POI in a Fortnite map. This inherits from
ReconstructAble.- repr(x)
Returns a representation of the account in the form of a string.
- iter(x)
Returns an iter of the x, y, z coordinates.
Examples
Unpacking a POI location.¶map = await client.fetch_map() poi = map.pois[0] x, y, z = poi.location print(x, y, z)
- class fortnite_api.NewCosmetic(*, type, hash=None, last_addition=None, items)¶
- Attributes
Represents a response from the new cosmetics endpoint for a given cosmetic type. You can use the
typeto help you determine whatitemswill be. Theitemswill be a list of the corresponding cosmetic type:Corresponding
itemsList of
CosmeticBrList of
CosmeticTrackList of
CosmeticInstrumentList of
CosmeticCarList of
VariantLegoList of
CosmeticLegoKit- type¶
The type of new cosmetics displayed.
- hash¶
The hash of the new cosmetics. Can be
Noneif no new cosmetics have been given for the cosmetic type.- Type:
Optional[
str]
- last_addition¶
The last addition of new cosmetics.
- Type:
- items¶
The new cosmetics. This corresponds to the type of new cosmetics. Can be empty if no new cosmetics have been given.
- Type:
List[
fortnite_api.Cosmetic]
- class fortnite_api.NewCosmetics(*, data, http)¶
Represents a response from the new cosmetics endpoint.
This class inherits from
ReconstructAble.Examples
Obtain all the new Battle Royale cosmetics.¶new_cosmetics = await client.fetch_cosmetics_new() new_br_cosmetics = new_cosmetics.br for cosmetic in new_br_cosmetics.items: print(cosmetic.name)
- date¶
The date of the new cosmetics.
- Type:
- global_last_addition¶
The last time a new cosmetic was added.
- Type:
- br¶
The new BR cosmetics.
- Type:
- tracks¶
The new track cosmetics.
- Type:
- instruments¶
The new instrument cosmetics.
- Type:
- cars¶
The new car cosmetics.
- Type:
- lego¶
The new lego cosmetic variants.
- Type:
- lego_kits¶
The new lego kit cosmetics.
- Type:
- beans¶
The new bean cosmetic variants.
- Type:
- class fortnite_api.RenderImage(*, data, http)¶
- Attributes
Represents a render image for a shop entry. A render image is an image used to visually represent a cosmetic item in the shop. This class inherits from
ReconstructAble.Changed in version v3.1.0: Renamed from
ShopEntryRenderImageto a more genericRenderImageto reflect its usage across the API.- product_tag¶
The product tag of the render image.
- Type:
- file_name¶
The internal file name of the rendered image. Refers to the name within the game files and not the :attr`image`. An example of this is
T-Featured-Pickaxes-SleepyTimePickaxe.- Type:
- image¶
The image of the render image.
- Type:
- class fortnite_api.MaterialInstanceImages(*, data, http)¶
- Attributes
Represents some images of a Material instance, as they are rendered in game. Although this class has concrete attributes, the API generates the keys dynamically. The most common keys are exposed as attributes, and all other keys are available through dictionary operations.
This class inherits from
dict, and thus, supports all the operations that a normal dictionary does, such as indexing, iteration, etc.Changed in version v3.1.0: Moved from the now-deleted
fortnite_api.materialtofortnite_api.new_display_asset.- offer_image¶
The offer image of the Material instance. This is the image that is shown in the item shop. Can be
Noneif there is no offer image for the Material instance.- Type:
Optional[
fortnite_api.Asset]
- background¶
The background of the Material instance. This is the background gradient of the material instance. Can be
Noneif there is no background for the Material instance.- Type:
Optional[
fortnite_api.Asset]
- class fortnite_api.MaterialInstanceColors(*, data)¶
- Attributes
Represents some metadata about the colors of a Material instance. Although the keys are dynamically generated in the API, the most common keys are exposed as attributes.
This class inherits from
dict, and thus, supports all the operations that a normal dictionary does, such as indexing, iteration, etc.Changed in version v3.1.0: Moved from the now-deleted
fortnite_api.materialtofortnite_api.new_display_asset.- background_color_a¶
The first background color of the Material instance, if any.
- Type:
Optional[
str]
- class fortnite_api.MaterialInstance(*, data, http)¶
- Attributes
Material instancing is a way to create a parent Material that you can use as a base to make a wide variety of different looking children (Material instances).
Fortnite takes advantage of this concept for its cosmetics. This allows developers to create a single cosmetic and then create many different versions of it using Material instances. This is used across not just skins but also extended onto lego cosmetic variants as well.
This class represents a Material instance, which is said to be a child of a bigger parent Material.
This class inherits from
HashableandReconstructAble.Changed in version v3.1.0: Moved from the now-deleted
fortnite_api.materialtofortnite_api.new_display_asset.- primary_mode¶
The primary mode of the Material instance. This denotes what the cosmetic material instance is compatible with.
- product_tag¶
The product tag of the Material instance.
- Type:
- images¶
Represents some images of the Material instance, as they are rendered in game.
- colors¶
Holds some metadata about the colors of the Material instance, such as the background color A and B, if it exists.
- Type:
Optional[
fortnite_api.MaterialInstanceColors]
- scalings¶
Some information about the scalings of the Material instance. This is a low level Unreal Engine 5 information dump that is not commonly used, but is available for those who need it. It can contain information about the material background, density, zoom, streak multipliers, and spotlights.
- Type:
- class fortnite_api.NewDisplayAsset(*, data, http)¶
- Attributes
Represents a new display asset for a shop entry. A display asset is an asset that is used to visually represent a cosmetic item in the shop. This class inherits from
ReconstructAbleandHashable.- cosmetic_id¶
The ID of the cosmetic item associated with the display asset, if any.
- Type:
Optional[
str]
- material_instances¶
A list of material instances used by the display asset.
- Type:
- render_images¶
A list of render images used by the display asset.
- Type:
List[
fortnite_api.RenderImage]
- .. versionchanged:: v3.1.0
Renamed from
ShopEntryNewDisplayAssetto a more genericNewDisplayAssetto better reflect its usage across the API.
- class fortnite_api.News(*, data, http)¶
Represents Game News. This class contains information on both Battle Royale and Save the World news.
This class inherits from
ReconstructAble.- repr(x)
Returns a representation of the account in the form of a string.
- br¶
A list of Battle Royale news.
- Type:
- stw¶
A list of Save the World news.
- Type:
- class fortnite_api.GameModeNews(*, data, http)¶
Represents News of a specific game mode. This class is handed out from the
Newsclass.This inherits from
ReconstructAble.- repr(x)
Returns a representation of the account in the form of a string.
- date¶
The date when the news was published.
- Type:
- image¶
The display image of the news, if available.
- Type:
Optional[
fortnite_api.Asset]
- motds¶
A list of Message of the Day (MOTD) for the game mode.
- Type:
List[
fortnite_api.NewsMotd]
- messages¶
A list of messages for the game mode.
- Type:
List[
fortnite_api.NewsMessage]
- class fortnite_api.NewsMotd(*, data, http)¶
An object that represents a Message of The Day in a specific game mode. This class gets handed out from the
GameModeNews.This class inherits from
HashableandReconstructAble.- repr(x)
Returns a representation of the account in the form of a string.
Whether the motd is hidden or not.
- Type:
- class fortnite_api.NewsMessage(*, data, http)¶
Represents a message in the news in a specific game mode. This class gets handed out by
GameModeNews.This inherits from
ReconstructAble.- repr(x)
Returns a representation of the account in the form of a string.
- class fortnite_api.PlaylistImages(*, data, http)¶
- Attributes
Represents images that are associated with a Fortnite Playlist. This class inherits from
ReconstructAble.- showcase¶
A showcase image for the playlist, if any.
- Type:
Optional[
fortnite_api.Asset]
- mission_icon¶
A mission icon for the playlist, if any.
- Type:
Optional[
fortnite_api.Asset]
- class fortnite_api.Playlist(*, data, http)¶
Represents a Fortnite Playlist. This class inherits from
HashableandReconstructAble.- images¶
The images associated with the playlist.
- Type:
Optional[
fortnite_api.PlaylistImages]
- added¶
The time the playlist was added.
- Type:
- class fortnite_api.ShopEntryOfferTag(*, data, http)¶
Represents a shop entry offer tag. This class inherits from
ReconstructAble.
- class fortnite_api.ShopEntryBundle(*, data, http)¶
Represents a shop entry bundle. This class inherits from
ReconstructAble.- image¶
The image of the bundle.
- Type:
- class fortnite_api.ShopEntryBanner(*, data, http)¶
- Attributes
A class to represent a shop entry banner. This class inherits from
ReconstructAble.- intensity¶
The intensity of the banner.
- class fortnite_api.ShopEntryLayout(*, data, http)¶
Represents the layout of a shop entry. This class inherits from
ReconstructAble.- background¶
The background asset of the layout, if any.
- Type:
Optional[
fortnite_api.Asset]
- class fortnite_api.ShopEntryColors(*, data, http)¶
- Attributes
Represents the colors of a shop entry. This class inherits from
ReconstructAble.
- class fortnite_api.ShopEntry(*, data, http)¶
Represents an item shop entry. Each entry in the shop contains related cosmetics that are available in the shop. This class inherits from
ReconstructAble.- len(x)
Returns the total amount of cosmetics in this entry.
shop = await client.fetch_shop() for entry in shop.entries: print(f'Entry has {len(entry)} cosmetics.')
- iter(x)
Returns an iterator of the cosmetics, working through one unique cosmetic type before continuing onto the next. Works in the following order:
CosmeticBr,CosmeticTrack,CosmeticInstrument,CosmeticCar,CosmeticLegoKit.shop = await client.fetch_shop() for entry in shop.entries: for cosmetic in entry: print(cosmetic.id, cosmetic.type)
- in_date¶
The date when this entry was added to the shop.
- Type:
- out_date¶
The date when this entry will be removed from the shop.
- Type:
- offer_tag¶
The offer tag of this entry, if any.
- Type:
Optional[
fortnite_api.ShopEntryOfferTag]
- bundle¶
The bundle that this entry belongs to, if any.
- Type:
Optional[
fortnite_api.ShopEntryBundle]
- banner¶
The banner information for this shop entry, if any.
- Type:
Optional[
fortnite_api.ShopEntryBanner]
- layout¶
The layout of this entry, if any.
- Type:
Optional[
fortnite_api.ShopEntryLayout]
- tile_size¶
The tile size of this entry.
- Type:
- new_display_asset¶
The new display asset of this entry.
- colors¶
The colors of this entry.
- br¶
The Battle Royale cosmetics in this entry.
- Type:
List[
fortnite_api.CosmeticBr]
- tracks¶
The tracks in this entry.
- Type:
- instruments¶
The instruments in this entry.
- Type:
- cars¶
The cars in this entry.
- Type:
List[
fortnite_api.CosmeticCar]
- lego_kits¶
The LEGO kits in this entry.
- Type:
- class fortnite_api.Shop(*, data, http)¶
- Attributes
Represents the Fortnite shop.
- date¶
The date when this shop was last updated.
- Type:
- vbuck_icon¶
An asset of the V-Buck icon.
- Type:
- entries¶
A list of shop entries. Each entry contains cosmetics that are available in the shop.
- Type:
List[
fortnite_api.ShopEntry]
- class fortnite_api.TileSize(*, width, height, internal)¶
- Methods
Represents the size of a tile in the shop.
- x == y
Checks if two tile sizes are equal.
- x != y
Checks if two tile sizes are not equal.
- Parameters:
- internal¶
The internal representation of the tile size. This can be the default Epic API value in the format
Size_<width>_x_<height>.- Type:
- classmethod from_value(value, /)¶
Constructs a tile size from the value provided by the API. This method parses the passed value and ensures that it is in the correct format,
Size_<width>_x_<height>. It has been exposed in the case that the user wants to construct a tile size from a custom value.- Parameters:
value (
str) – The value to parse.- Returns:
The constructed tile size.
- Return type:
- Raises:
ValueError – If the value is not in the correct format.
- class fortnite_api.BrPlayerStats(*, data, http)¶
- Attributes
Represents a Fortnite Battle Royale player’s stats. This class inherits from
ReconstructAble.Examples
Fetching a player’s total wins in the solo game mode across all input types.¶# It's helpful to compute the data in a helper function, as many attributes # will be ``None`` if the player has no stats in a given game mode or input type. def get_total_wins(stats: fortnite_api.BrPlayerStats) -> int: # Get the stats for all input types. all_inputs = stats.inputs and stats.inputs.all if all_inputs is None: # This player has no stats. return 0 # Get the stats for the solo game mode. solo = all_inputs.solo if solo is None: # This player has never played solos. return 0 # Return the total number of wins in the solo game mode. return solo.wins # Fetch the player's stats. stats = await fortnite_api_client.fetch_br_stats(name="<username>") # Compute the total wins. total_wins = get_total_wins(stats) # And print out the result. print(f'{stats.user.name} has {total_wins} total wins in the solo game mode across all platforms.')
- user¶
The account of the player whose stats are being represented.
- Type:
- battle_pass¶
The player’s battle pass level and progress, if available.
- Type:
Optional[
fortnite_api.BrBattlePass]
- image¶
The requested statistics image, if requested.
- Type:
Optional[
fortnite_api.Asset]
- inputs¶
The player’s stats for all input types. This is
Noneif the player has no stats.- Type:
Optional[
fortnite_api.BrInputs]
- class fortnite_api.BrBattlePass(*, data, http)¶
Represents a Fortnite Battle Royale player’s battle pass level and progress. This class inherits from
ReconstructAble.
- class fortnite_api.BrInputs(*, data, http)¶
- Attributes
Represents a Fortnite player’s stats for all input types. This class inherits from
ReconstructAble.Each input type has its own stats, which can be accessed through the attributes. Additionally, there is an
allattribute which represents the player’s stats for all inputs. If the player has no stats for a specific input type, the attribute will beNone. If the player has no stats at all, theallattribute will beNone.- all¶
The player’s stats for all input types. This is
Noneif the player has no stats.- Type:
Optional[
BrInputStats]
- keyboard_mouse¶
The player’s stats for keyboard and mouse input. This is
Noneif the player has no stats.- Type:
Optional[
BrInputStats]
- gamepad¶
The player’s stats for gamepad input. This is
Noneif the player has no stats.- Type:
Optional[
BrInputStats]
- touch¶
The player’s stats for touch input. This is
Noneif the player has no stats.- Type:
Optional[
BrInputStats]
- class fortnite_api.BrInputStats(*, data, http)¶
Represents a specific Fortnite player’s stats for a specific input type. This class inherits from
ReconstructAble.- overall¶
The overall stats for the player. This is
Noneif the overall stats are not available.- Type:
Optional[
BrGameModeStats]
- solo¶
The player’s stats for solo game modes. This is
Noneif the player has no stats for solo game modes.- Type:
Optional[
BrGameModeStats]
- duo¶
The player’s stats for duo game modes. This is
Noneif the player has no stats for duo game modes.- Type:
Optional[
BrGameModeStats]
- squad¶
The player’s stats for squad game modes. This is
Noneif the player has no stats for squad game modes.- Type:
Optional[
BrGameModeStats]
- class fortnite_api.BrGameModeStats(*, data, http)¶
Represents the specific stats for a Fortnite player in a specific game mode on a specific input type. This class inherits from
ReconstructAble.- score_per_min¶
The score per minute for the stats for a specific game mode. This is the score divided by the minutes played.
- Type:
- score_per_match¶
The score per match for the stats for a specific game mode. This is the score divided by the matches played.
- Type:
- top3¶
The number of times the player has placed in the top 3 (10 players left remaining) in this specific game mode. This is only available when the game mode for these stats is a
fortnite_api.BrInputStats.squadgame mode orfortnite_api.BrInputStats.overall.- Type:
Optional[
int]
- top5¶
The number of times the player has placed in the top 5 (10 players left remaining) in this specific game mode. This is only available when the game mode for these stats is a
fortnite_api.BrInputStats.duogame mode orfortnite_api.BrInputStats.overall.- Type:
Optional[
int]
- top6¶
The number of times the player has placed in the top 6 (25 players left remaining) in this specific game mode. This is only available when the game mode for these stats is a
fortnite_api.BrInputStats.squadgame mode orfortnite_api.BrInputStats.overall.- Type:
Optional[
int]
- top10¶
The number of times the player has placed in the top 10 (10 players left remaining) in this specific game mode. This is only available when the game mode for these stats is a
fortnite_api.BrInputStats.sologame mode orfortnite_api.BrInputStats.overall.- Type:
Optional[
int]
- top12¶
The number of times the player has placed in the top 12 (25 players left remaining) in this specific game mode. This is only available when the game mode for these stats is a
fortnite_api.BrInputStats.duogame mode orfortnite_api.BrInputStats.overall.- Type:
Optional[
int]
- top25¶
The number of times the player has placed in the top 25 (25 players left remaining) in this specific game mode. This is only available when the game mode for these stats is a
fortnite_api.BrInputStats.sologame mode orfortnite_api.BrInputStats.overall.- Type:
Optional[
int]
- kills_per_min¶
The kills per minute for the stats for a specific game mode. This is the kills divided by the minutes played.
- Type:
- kills_per_match¶
The kills per match for the stats for a specific game mode. This is the kills divided by the matches played.
- Type:
- kd¶
The kill/death ratio for this specific game mode. This is the kills divided by the deaths.
- Type:
- win_rate¶
The win rate for this specific game mode. This is the wins divided by the matches played.
- Type:
- last_modified¶
The date when this stat data was last updated within the Epic Games API.
- Type:
Cosmetic Objects¶
- class fortnite_api.Cosmetic(*, data, http)¶
Represents a base cosmetic. Every cosmetic type inherits from this class and adds additional attributes. View documentation for the specific cosmetic type for more information.
This class inherits from
HashableandReconstructAble.- added¶
When the cosmetic was added.
- Type:
- class fortnite_api.CosmeticTypeInfo(*, data, http)¶
- Attributes
A class that holds cosmetic type information passed from the API for a given
Cosmetic.This class inherits from
ReconstructAble.- repr(x)
Returns a representation of the account in the form of a string.
- value¶
The value of the cosmetic type.
- raw_value¶
The raw value of the cosmetic type. This value is used to construct the
valueattribute, but, is exposed through this attribute due to how commonly it is used.- Type:
- display_value¶
The display value of the cosmetic type. This is the value that is displayed to the user.
- Type:
- class fortnite_api.CosmeticRarityInfo(*, data, http)¶
- Attributes
Represents a cosmetic rarity. This class is used to hold information about the rarity of a cosmetic.
This class inherits from
ReconstructAble.- repr(x)
Returns a representation of the account in the form of a string.
- value¶
The rarity of the cosmetic.
- display_value¶
The display value of the cosmetic rarity. This is the value that is displayed to the user.
- Type:
- class fortnite_api.CosmeticSeriesInfo(*, data, http)¶
- Attributes
Represents information about the series a
Cosmeticbelongs to. This class inherits fromReconstructAble.- repr(x)
Returns a representation of the account in the form of a string.
- image¶
The image of the cosmetic series. Will be
Noneif the cosmetic series has no image.- Type:
Optional[
fortnite_api.Asset]
- class fortnite_api.CosmeticImages(*, data, http)¶
Represents the images of a cosmetic.
This inherits from
fortnite_api.Images.- repr(x)
Returns a representation of the account in the form of a string.
- featured¶
The featured image of the cosmetic, if available. Typically available off of
fortnite_api.CosmeticBrobjects.- Type:
Optional[
fortnite_api.Asset]
- lego¶
The LEGO image of the cosmetic, if available. Typically available off of
fortnite_api.CosmeticBrobjects.- Type:
Optional[
fortnite_api.Asset]
- bean¶
The bean image of the cosmetic, if available. Typically available off of
fortnite_api.CosmeticBrobjects.- Type:
Optional[
fortnite_api.Asset]
- small¶
The small image of the cosmetic. Typically available off of
fortnite_api.CosmeticInstrument,fortnite_api.CosmeticCar,fortnite_api.CosmeticLegoKit, andfortnite_api.VariantLegoobjects.- Type:
Optional[
fortnite_api.Asset]
- large¶
The large image of the cosmetic. Typically available off of
fortnite_api.CosmeticInstrument,fortnite_api.CosmeticCar,fortnite_api.CosmeticLegoKit, andfortnite_api.VariantLegoobjects.- Type:
Optional[
fortnite_api.Asset]
- wide¶
The wide image of the cosmetic. Typically available off of
fortnite_api.VariantLegoobjects.- Type:
Optional[
fortnite_api.Asset]
- class fortnite_api.CosmeticBrSet(*, data, http)¶
- Attributes
Represents a set that a given cosmetic belongs to. This class inherits from
fortnite_api.ReconstructAble.- repr(x)
Returns a representation of the account in the form of a string.
- class fortnite_api.CosmeticBrIntroduction(*, data, http)¶
- Attributes
Holds some metadata about when a cosmetic was introduced. This class inherits from
fortnite_api.ReconstructAble.- repr(x)
Returns a representation of the account in the form of a string.
- season¶
The season the cosmetic was introduced in. Can be “OG” if the cosmetic was introduced before seasons.
- Type:
- text¶
The display text of this introduction. In the form,
"Introduced in Chapter {{chapter}}, Season {{season}}."- Type:
- class fortnite_api.CosmeticBrVariant(*, data, http)¶
Represents a variant for a cosmetic. This class inherits from
fortnite_api.ReconstructAble.- repr(x)
Returns a representation of the account in the form of a string.
- options¶
The options for the variant, if any.
- Type:
- class fortnite_api.CosmeticBrVariantOption(*, data, http)¶
- Attributes
Represents a variant option for a cosmetic. This class inherits from
fortnite_api.ReconstructAble.- repr(x)
Returns a representation of the account in the form of a string.
- unlock_requirements¶
The unlock requirements of the variant option, if available.
- Type:
Optional[
str]
- image¶
The image of the variant option.
- Type:
- class fortnite_api.CosmeticBr(*, data, http)¶
- Attributes
- built_in_emote_ids
- custom_exclusive_callout
- definition_path
- description
- display_asset_path
- dynamic_pak_id
- exclusive_description
- gameplay_tags
- images
- introduction
- item_preview_hero_path
- meta_tags
- name
- path
- rarity
- search_tags
- series
- set
- shop_history
- showcase_video_id
- showcase_video_url
- type
- unlock_requirements
- variants
Methods- clsCosmeticBr.from_dict
- defto_dict
Represents a Battle Royale cosmetic.
This class inherits from
fortnite_api.Cosmetic.- repr(x)
Returns a representation of the account in the form of a string.
- custom_exclusive_callout¶
The custom exclusive callout of the cosmetic, if available.
- Type:
Optional[
str]
- type¶
The type of the cosmetic.
- Type:
Optional[
fortnite_api.CosmeticTypeInfo]
- rarity¶
The cosmetic’s rarity.
- Type:
Optional[
fortnite_api.CosmeticRarityInfo]
- series¶
The series of the cosmetic, if any.
- Type:
Optional[
fortnite_api.CosmeticSeriesInfo]
- set¶
The set that the cosmetic belongs to, if any.
- Type:
Optional[
fortnite_api.CosmeticBrSet]
- introduction¶
Metadata about when the cosmetic was introduced, if available.
- Type:
Optional[
fortnite_api.CosmeticBrIntroduction]
- images¶
The images of the cosmetic.
- Type:
Optional[
fortnite_api.CosmeticImages]
- variants¶
The variants of the cosmetic, if any.
- Type:
- gameplay_tags¶
The gameplay tags of the cosmetic.
Important
This attribute is opt-in, meaning it will be unavailable by default. You must enable the INCLUDE_GAMEPLAY_TAGS flag on the client to have access to this attribute.
See the response flags documentation for more information on what response flags are and how to use them.
- Type:
List[
str]
- item_preview_hero_path¶
The item preview hero path of the cosmetic, if available.
Important
This attribute is opt-in, meaning it will be unavailable by default. You must enable the INCLUDE_PATHS flag on the client to have access to this attribute.
See the response flags documentation for more information on what response flags are and how to use them.
- Type:
Optional[
str]
- display_asset_path¶
The display asset path of the cosmetic, if available.
Important
This attribute is opt-in, meaning it will be unavailable by default. You must enable the INCLUDE_PATHS flag on the client to have access to this attribute.
See the response flags documentation for more information on what response flags are and how to use them.
- Type:
Optional[
str]
- definition_path¶
The definition path of the cosmetic, if available.
Important
This attribute is opt-in, meaning it will be unavailable by default. You must enable the INCLUDE_PATHS flag on the client to have access to this attribute.
See the response flags documentation for more information on what response flags are and how to use them.
- Type:
Optional[
str]
- path¶
The path of the cosmetic, if available.
Important
This attribute is opt-in, meaning it will be unavailable by default. You must enable the INCLUDE_PATHS flag on the client to have access to this attribute.
See the response flags documentation for more information on what response flags are and how to use them.
- Type:
Optional[
str]
- shop_history¶
The shop history of the cosmetic.
Important
This attribute is opt-in, meaning it will be unavailable by default. You must enable the INCLUDE_SHOP_HISTORY flag on the client to have access to this attribute.
See the response flags documentation for more information on what response flags are and how to use them.
- Type:
List[
datetime.datetime]
- property showcase_video_url¶
The URL of the YouTube showcase video of the cosmetic, if any.
- Type:
Optional[
str]
- classmethod from_dict(data, *, client)¶
Reconstructs this class from a raw dictionary object. This is useful for when you store the raw data and want to reconstruct the object later on.
- Parameters:
data (Dict[Any, Any]) – The raw data to reconstruct the object from.
client (Union[
fortnite_api.Client,fortnite_api.SyncClient]) – The currently used client to reconstruct the object with. Can either be a sync or async client.
- to_dict()¶
Turns this object into a raw dictionary object. This is useful for when you want to store the raw data and reconstruct the object later on.
- Returns:
The raw data of this object. Note that this is a deep copy of the raw data, and not a reference to the underlying raw data this object was constructed with.
- Return type:
Dict[Any, Any]
- class fortnite_api.CosmeticCar(*, data, http)¶
- AttributesMethods
- clsCosmeticCar.from_dict
- defto_dict
Represents a car cosmetic in Fortnite.
This class inherits from
fortnite_api.Cosmetic.- repr(x)
Returns a representation of the account in the form of a string.
- type¶
The type of the car.
- Type:
Optional[
fortnite_api.CosmeticTypeInfo]
- rarity¶
The rarity of the car.
- Type:
Optional[
fortnite_api.CosmeticRarityInfo]
- images¶
Any car images.
- Type:
Optional[
fortnite_api.CosmeticImages]
- series¶
The series of the car.
- Type:
Optional[
fortnite_api.CosmeticSeriesInfo]
- gameplay_tags¶
The gameplay tags of the car.
Important
This attribute is opt-in, meaning it will be unavailable by default. You must enable the INCLUDE_GAMEPLAY_TAGS flag on the client to have access to this attribute.
See the response flags documentation for more information on what response flags are and how to use them.
- Type:
List[
str]
- path¶
The path of the car.
Important
This attribute is opt-in, meaning it will be unavailable by default. You must enable the INCLUDE_PATHS flag on the client to have access to this attribute.
See the response flags documentation for more information on what response flags are and how to use them.
- Type:
Optional[
str]
- shop_history¶
A list of datetimes representing the shop history of the car.
Important
This attribute is opt-in, meaning it will be unavailable by default. You must enable the INCLUDE_SHOP_HISTORY flag on the client to have access to this attribute.
See the response flags documentation for more information on what response flags are and how to use them.
- Type:
List[
datetime.datetime]
- property showcase_video_url¶
The URL of the YouTube showcase video of the cosmetic, if any.
- Type:
Optional[
str]
- classmethod from_dict(data, *, client)¶
Reconstructs this class from a raw dictionary object. This is useful for when you store the raw data and want to reconstruct the object later on.
- Parameters:
data (Dict[Any, Any]) – The raw data to reconstruct the object from.
client (Union[
fortnite_api.Client,fortnite_api.SyncClient]) – The currently used client to reconstruct the object with. Can either be a sync or async client.
- to_dict()¶
Turns this object into a raw dictionary object. This is useful for when you want to store the raw data and reconstruct the object later on.
- Returns:
The raw data of this object. Note that this is a deep copy of the raw data, and not a reference to the underlying raw data this object was constructed with.
- Return type:
Dict[Any, Any]
- class fortnite_api.CosmeticInstrument(*, data, http)¶
- AttributesMethods
Represents an instrument cosmetic in Fortnite.
This class inherits from
fortnite_api.Cosmetic.- repr(x)
Returns a representation of the account in the form of a string.
- type¶
The type of the instrument.
- Type:
Optional[
fortnite_api.CosmeticTypeInfo]
- rarity¶
The rarity of the instrument.
- Type:
Optional[
fortnite_api.CosmeticRarityInfo]
- images¶
Any instrument images.
- Type:
Optional[
fortnite_api.CosmeticImages]
- series¶
The series of the instrument.
- Type:
Optional[
fortnite_api.CosmeticSeriesInfo]
- gameplay_tags¶
The gameplay tags of the instrument.
Important
This attribute is opt-in, meaning it will be unavailable by default. You must enable the INCLUDE_GAMEPLAY_TAGS flag on the client to have access to this attribute.
See the response flags documentation for more information on what response flags are and how to use them.
- Type:
List[
str]
- path¶
The path of the instrument.
Important
This attribute is opt-in, meaning it will be unavailable by default. You must enable the INCLUDE_PATHS flag on the client to have access to this attribute.
See the response flags documentation for more information on what response flags are and how to use them.
- Type:
Optional[
str]
- shop_history¶
The shop history of the instrument.
Important
This attribute is opt-in, meaning it will be unavailable by default. You must enable the INCLUDE_SHOP_HISTORY flag on the client to have access to this attribute.
See the response flags documentation for more information on what response flags are and how to use them.
- Type:
List[
datetime.datetime]
- property showcase_video_url¶
The URL of the YouTube showcase video of the cosmetic, if any.
- Type:
Optional[
str]
- classmethod from_dict(data, *, client)¶
Reconstructs this class from a raw dictionary object. This is useful for when you store the raw data and want to reconstruct the object later on.
- Parameters:
data (Dict[Any, Any]) – The raw data to reconstruct the object from.
client (Union[
fortnite_api.Client,fortnite_api.SyncClient]) – The currently used client to reconstruct the object with. Can either be a sync or async client.
- to_dict()¶
Turns this object into a raw dictionary object. This is useful for when you want to store the raw data and reconstruct the object later on.
- Returns:
The raw data of this object. Note that this is a deep copy of the raw data, and not a reference to the underlying raw data this object was constructed with.
- Return type:
Dict[Any, Any]
- class fortnite_api.CosmeticLegoKit(*, data, http)¶
- AttributesMethods
Represents a LEGO kit cosmetic in Fortnite.
This class inherits from
fortnite_api.Cosmetic.- repr(x)
Returns a representation of the account in the form of a string.
- type¶
The type of the LEGO kit.
- Type:
Optional[
fortnite_api.CosmeticTypeInfo]
- gameplay_tags¶
The gameplay tags of the LEGO kit.
Important
This attribute is opt-in, meaning it will be unavailable by default. You must enable the INCLUDE_GAMEPLAY_TAGS flag on the client to have access to this attribute.
See the response flags documentation for more information on what response flags are and how to use them.
- Type:
List[
str]
- images¶
Any LEGO kit images.
- Type:
Optional[
fortnite_api.CosmeticImages]
- path¶
The path of the LEGO kit.
Important
This attribute is opt-in, meaning it will be unavailable by default. You must enable the INCLUDE_PATHS flag on the client to have access to this attribute.
See the response flags documentation for more information on what response flags are and how to use them.
- Type:
Optional[
str]
- shop_history¶
The shop history of the LEGO kit.
Important
This attribute is opt-in, meaning it will be unavailable by default. You must enable the INCLUDE_SHOP_HISTORY flag on the client to have access to this attribute.
See the response flags documentation for more information on what response flags are and how to use them.
- Type:
List[
datetime.datetime]
- classmethod from_dict(data, *, client)¶
Reconstructs this class from a raw dictionary object. This is useful for when you store the raw data and want to reconstruct the object later on.
- Parameters:
data (Dict[Any, Any]) – The raw data to reconstruct the object from.
client (Union[
fortnite_api.Client,fortnite_api.SyncClient]) – The currently used client to reconstruct the object with. Can either be a sync or async client.
- to_dict()¶
Turns this object into a raw dictionary object. This is useful for when you want to store the raw data and reconstruct the object later on.
- Returns:
The raw data of this object. Note that this is a deep copy of the raw data, and not a reference to the underlying raw data this object was constructed with.
- Return type:
Dict[Any, Any]
- class fortnite_api.CosmeticTrackDifficulty(*, data, http)¶
- Attributes
Represents the difficulty of a track cosmetic in Fortnite. This class inherits from
fortnite_api.ReconstructAble.- repr(x)
Returns a representation of the account in the form of a string.
- class fortnite_api.CosmeticTrack(*, data, http)¶
- AttributesMethods
Represents a track cosmetic in Fortnite.
This class inherits from
fortnite_api.Cosmetic.- repr(x)
Returns a representation of the account in the form of a string.
- difficulty¶
The difficulty of the track.
- gameplay_tags¶
The gameplay tags of the track.
Important
This attribute is opt-in, meaning it will be unavailable by default. You must enable the INCLUDE_GAMEPLAY_TAGS flag on the client to have access to this attribute.
See the response flags documentation for more information on what response flags are and how to use them.
- Type:
List[
str]
- album_art¶
The album art of the track.
- Type:
- shop_history¶
The shop history of the track.
Important
This attribute is opt-in, meaning it will be unavailable by default. You must enable the INCLUDE_SHOP_HISTORY flag on the client to have access to this attribute.
See the response flags documentation for more information on what response flags are and how to use them.
- Type:
List[
datetime.datetime]
- classmethod from_dict(data, *, client)¶
Reconstructs this class from a raw dictionary object. This is useful for when you store the raw data and want to reconstruct the object later on.
- Parameters:
data (Dict[Any, Any]) – The raw data to reconstruct the object from.
client (Union[
fortnite_api.Client,fortnite_api.SyncClient]) – The currently used client to reconstruct the object with. Can either be a sync or async client.
- to_dict()¶
Turns this object into a raw dictionary object. This is useful for when you want to store the raw data and reconstruct the object later on.
- Returns:
The raw data of this object. Note that this is a deep copy of the raw data, and not a reference to the underlying raw data this object was constructed with.
- Return type:
Dict[Any, Any]
Cosmetic Variants¶
- class fortnite_api.VariantLego(*, data, http)¶
- AttributesMethods
- clsVariantLego.from_dict
- asyncfetch_cosmetic_br
- defto_dict
Represents a Lego cosmetic variant.
This class inherits from
fortnite_api.Cosmetic.- repr(x)
Returns a representation of the account in the form of a string.
- images¶
The images of the lego cosmetic variant.
- Type:
Optional[
fortnite_api.CosmeticImages]
- path¶
The path of the lego cosmetic variant. Will be
Noneif the API response does not contain a path.Important
This attribute is opt-in, meaning it will be unavailable by default. You must enable the INCLUDE_PATHS flag on the client to have access to this attribute.
See the response flags documentation for more information on what response flags are and how to use them.
- Type:
Optional[
str]
- classmethod from_dict(data, *, client)¶
Reconstructs this class from a raw dictionary object. This is useful for when you store the raw data and want to reconstruct the object later on.
- Parameters:
data (Dict[Any, Any]) – The raw data to reconstruct the object from.
client (Union[
fortnite_api.Client,fortnite_api.SyncClient]) – The currently used client to reconstruct the object with. Can either be a sync or async client.
- to_dict()¶
Turns this object into a raw dictionary object. This is useful for when you want to store the raw data and reconstruct the object later on.
- Returns:
The raw data of this object. Note that this is a deep copy of the raw data, and not a reference to the underlying raw data this object was constructed with.
- Return type:
Dict[Any, Any]
- fetch_cosmetic_br(*, language=None)¶
This function is a coroutine.
Fetches the Battle Royale cosmetic that this lego cosmetic variant is based on.
- Parameters:
language (Optional[
fortnite_api.GameLanguage]) – The language to fetch the cosmetic in.- Returns:
The Battle Royale cosmetic that this lego cosmetic variant is based on.
- Return type:
- class fortnite_api.VariantBean(*, data, http)¶
- AttributesMethods
- clsVariantBean.from_dict
- asyncfetch_cosmetic_br
- defto_dict
This class represents the Bean variant of a cosmetic item. This stems from the Fortnite x Fall Guys collaboration, where Fortnite cosmetics were transformed into Fall Guys beans.
This class inherits from
fortnite_api.Cosmetic.- gender¶
Denotes the gender of this bean.
- gameplay_tags¶
The gameplay tags associated with this bean.
Important
This attribute is opt-in, meaning it will be unavailable by default. You must enable the INCLUDE_GAMEPLAY_TAGS flag on the client to have access to this attribute.
See the response flags documentation for more information on what response flags are and how to use them.
- Type:
List[
str]
- images¶
Any display images of this bean in the game. Will be
Noneif there are no images.- Type:
Optional[
fortnite_api.CosmeticImages]
- path¶
The game path of this bean. Will be
Noneif there is no path in the API response.Important
This attribute is opt-in, meaning it will be unavailable by default. You must enable the INCLUDE_PATHS flag on the client to have access to this attribute.
See the response flags documentation for more information on what response flags are and how to use them.
- Type:
Optional[
str]
- classmethod from_dict(data, *, client)¶
Reconstructs this class from a raw dictionary object. This is useful for when you store the raw data and want to reconstruct the object later on.
- Parameters:
data (Dict[Any, Any]) – The raw data to reconstruct the object from.
client (Union[
fortnite_api.Client,fortnite_api.SyncClient]) – The currently used client to reconstruct the object with. Can either be a sync or async client.
- to_dict()¶
Turns this object into a raw dictionary object. This is useful for when you want to store the raw data and reconstruct the object later on.
- Returns:
The raw data of this object. Note that this is a deep copy of the raw data, and not a reference to the underlying raw data this object was constructed with.
- Return type:
Dict[Any, Any]
- fetch_cosmetic_br(*, language=None)¶
This function is a coroutine.
Fetches the Battle Royale cosmetic that this bean variant is based on.
- Parameters:
language (Optional[
fortnite_api.GameLanguage]) – The language to fetch the cosmetic in.- Returns:
The Battle Royale cosmetic that this bean variant is based on.
- Return type:
- Raises:
ValueError – The bean variant does not have a corresponding Battle Royale cosmetic. I.e. :attr`cosmetic_id` is
None.
Flags¶
- class fortnite_api.ResponseFlags(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)¶
- Methods
Denotes a “response flag” in the Fortnite API. These are toggle-able options that denote how a response from the API should be formatted and which data should be included.
- INCLUDE_NOTHING¶
Include nothing special in the response. This will only include standard data in all responses, ie, any data fields in this class prefixed with
INCLUDE_.- Type:
- INCLUDE_PATHS¶
Denotes if the response should include the
pathsfield in the response, if the endpoint contains it.- Type:
- INCLUDE_GAMEPLAY_TAGS¶
Denotes if the response should include the
gameplay_tagsfield in the response, if the endpoint contains it.- Type:
- INCLUDE_SHOP_HISTORY¶
Denotes if the response should include the
shop_historyfield in the response, if the endpoint contains it.- Type:
- classmethod all()¶
ResponseFlags: Returns a flag that includes all flags.
Enumerations¶
- class fortnite_api.KeyFormat(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)¶
Represents a return format type for the AES endpoint.
- HEX¶
Return the AES keys in hexadecimal format.
- BASE64¶
Return the AES keys in base64 format.
- class fortnite_api.GameLanguage(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)¶
Represents a language that Fortnite supports. This can be used to change the return language of many API calls.
- ARABIC¶
Arabic language.
- GERMAN¶
German language.
- ENGLISH¶
English language.
- SPANISH¶
Spanish language.
- SPANISH_LATIN¶
Latin Spanish language.
- FRENCH¶
French language.
- ITALIAN¶
Italian language.
- JAPANESE¶
Japanese language.
- KOREAN¶
Korean language.
- POLISH¶
Polish language.
- PORTUGUESE_BRASIL¶
Portuguese (Brasil) language.
- RUSSIAN¶
Russian language.
- TURKISH¶
Turkish language.
- CHINESE_SIMPLIFIED¶
Simplified Chinese language.
- CHINESE_TRADITIONAL¶
Traditional Chinese language.
- class fortnite_api.MatchMethod(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)¶
Represents a string matching method for some search methods in the API.
- FULL¶
Match the full string.
- CONTAINS¶
Match if the string contains the search string.
- STARTS¶
Match if the string starts with the search string.
- ENDS¶
Match if the string ends with the search string.
- class fortnite_api.CosmeticCategory(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)¶
Represents the internal names for the types of a cosmetics in Fortnite.
- BR¶
Type of a
fortnite_api.CosmeticBrcosmetic.
- TRACKS¶
Type of a
fortnite_api.CosmeticTrackcosmetic.
- INSTRUMENTS¶
Type of a
fortnite_api.CosmeticInstrumentcosmetic.
- CARS¶
Type of a
fortnite_api.CosmeticCarcosmetic.
- LEGO¶
Type of a
fortnite_api.VariantLegocosmetic variant.
- LEGO_KITS¶
Type of a
fortnite_api.CosmeticLegoKitcosmetic.
- BEANS¶
Type of a
fortnite_api.VariantBeancosmetic variant.
- class fortnite_api.CosmeticRarity(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)¶
Represents a rarity of a
Cosmeticobject.- FROZEN¶
- LAVA¶
- LEGENDARY¶
- GAMING_LEGENDS¶
- DARK¶
- STARWARS¶
- MARVEL¶
- DC¶
- ICON_SERIES¶
- SHADOW¶
- SLURP¶
- EPIC¶
- LAMBORGHINI¶
- RARE¶
- UNCOMMON¶
- COMMON¶
- class fortnite_api.CosmeticType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)¶
Represents a type of a
fortnite_api.CosmeticBrcosmetic.- OUTFIT¶
- BACKPACK¶
- PET¶
- PET_CARRIER¶
- PICKAXE¶
- GLIDER¶
- CONTRAIL¶
- AURA¶
- EMOTE¶
- EMOJI¶
- SPRAY¶
- TOY¶
- WRAP¶
- BANNER¶
- MUSIC¶
- LOADING_SCREEN¶
- GUITAR¶
- BASS¶
- DRUMS¶
- MICROPHONE¶
- KEYTAR¶
- CAR_BODY¶
- DECAL¶
- WHEELS¶
- TRAIL¶
- BOOST¶
- JAM_TRACK¶
- LEGO_BUILD¶
- LEGO_DECOR_BUNDLE¶
- SHOUT¶
- class fortnite_api.AccountType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)¶
Represents the type of a
fortnite_api.account.Account.- EPIC¶
Epic Games account.
- PSN¶
PlayStation Network account.
- XBL¶
Xbox Live account.
- class fortnite_api.TimeWindow(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)¶
Represents a time window for statistics in the API.
- SEASON¶
Denotes that the results should only be for the current season.
- LIFETIME¶
Denotes that the results should be for the lifetime of an account.
- class fortnite_api.StatsImageType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)¶
Represents the type of image that should be returned from the stats image endpoint.
- ALL¶
Return an image that has statistics for all input types.
- KEYBOARD_MOUSE¶
Return an image that has statistics for only keyboard and mouse input types.
- GAMEPAD¶
Return an image that has statistics for only gamepad (controller) input types.
- TOUCH¶
Return an image that has statistics for only touch input types.
- NONE¶
No image should be returned.
- class fortnite_api.CreatorCodeStatus(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)¶
Represents the status of a creator code.
- ACTIVE¶
The creator code is active.
- DISABLED¶
The creator code is disabled.
- class fortnite_api.CosmeticCompatibleMode(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)¶
A class that represents the compatibility of a cosmetic
fortnite_api.MaterialInstancewith other modes.- BATTLE_ROYALE¶
The material instance is compatible with Battle Royale.
- LEGO¶
The material instance is compatible with LEGO.
- ROCKET_RACING¶
The material instance is compatible with Rocket Racing.
- FESTIVAL¶
The material instance is compatible with Festival.
- ALL¶
The material instance is compatible with all modes.
- class fortnite_api.BannerIntensity(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)¶
Denotes the intensity of a
fortnite_api.ShopEntryBanner.- LOW¶
Low intensity.
- HIGH¶
High intensity.
- class fortnite_api.CustomGender(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)¶
Denotes the gender of a character in Fortnite.
At the moment, this is only used on the
fortnite_api.VariantBeanclass.- FEMALE¶
A female character.
- MALE¶
A male character.
- class fortnite_api.ProductTag(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)¶
A class that represents the tag of a product.
- BATTLE_ROYALE¶
The product is for Battle Royale.
- LEGO¶
The product is for LEGO.
- ROCKET_RACING¶
The product is for Rocket Racing.
- FESTIVAL¶
The product is for Festival.
- ALL¶
The product is for all modes.
Helper Utilities¶
- class fortnite_api.proxies.TransformerListProxy(raw_data, /, transform_data)¶
- Methods
A proxy for a list that allows for half-created type T objects to be stored in the list. This is an internal optimization that allows objects to be created only as-needed when the list is accessed.
This class has been exposed to the documentation because it may be useful for some high level users. However, you can consider this as just a
List[T]unless needed otherwise.It is important to note that this class is not thread-safe, so it should not be accessed concurrently from multiple threads. If you wish to access this class concurrently, you should use a lock to ensure that only one thread is accessing the class at a time.
This class holds the invariant that when any public method is called, the list will be transformed into a list of type T. This means that when the list is accessed, the data will be transformed into the correct type. This is done to ensure that the data is always in a consistent state.
- transform_all()¶
A method that transforms all the data in the list to type
T.