RoyaleAPI
class clashroyale.royaleapi.Client(token, session=None, is_async=False, **options)
A client that requests data from royaleapi.com. This class can
either be async or non async. Returns the client in async mode. Get a list of tournaments that have at least 1000
max players Get a clan information *tags (str) – Valid clan tags. Minimum length: 3
Valid characters: 0289PYLQGRJCUV **keys (Optional[list] = None) – Filter which keys should be included in the
response **exclude (Optional[list] = None) – Filter which keys should be excluded from the
response **timeout (Optional[int] = None) – Custom timeout that overwrites Client.timeout Get the battle log from everyone in the clan *tags (str) – Valid player tags. Minimum length: 3
Valid characters: 0289PYLQGRJCUV **type (str) – Filters what kind of battles. Pick from:
:all:, :war:, :clanMate: **keys (Optional[list] = None) – Filter which keys should be included in the
response **exclude (Optional[list] = None) – Filter which keys should be excluded from the
response **max (Optional[int] = None) – Limit the number of items returned in the response **page (Optional[int] = None) – Works with max, the zero-based page of the
items **timeout (Optional[int] = None) – Custom timeout that overwrites Client.timeout Get the clan history. Only works if the clan is being tracked
by having either cr-api.com or royaleapi.com in the clan’s
description *tags (str) – Valid clan tags. Minimum length: 3
Valid characters: 0289PYLQGRJCUV **keys (Optional[list] = None) – Filter which keys should be included in the
response **exclude (Optional[list] = None) – Filter which keys should be excluded from the
response **max (Optional[int] = None) – Limit the number of items returned in the response **page (Optional[int] = None) – Works with max, the zero-based page of the
items **timeout (Optional[int] = None) – Custom timeout that overwrites Client.timeout Returns if the clan is currently being tracked
by the API by having either cr-api.com or royaleapi.com
in the clan description *tags (str) – Valid clan tags. Minimum length: 3
Valid characters: 0289PYLQGRJCUV **keys (Optional[list] = None) – Filter which keys should be included in the
response **exclude (Optional[list] = None) – Filter which keys should be excluded from the
response **timeout (Optional[int] = None) – Custom timeout that overwrites Client.timeout Get inforamtion about a clan’s current clan war *tag (str) – A valid clan tag. Minimum length: 3
Valid characters: 0289PYLQGRJCUV **keys (Optional[list] = None) – Filter which keys should be included in the
response **exclude (Optional[list] = None) – Filter which keys should be excluded from the
response **timeout (Optional[int] = None) – Custom timeout that overwrites Client.timeout Get a clan’s war log *tags (str) – Valid clan tags. Minimum length: 3
Valid characters: 0289PYLQGRJCUV **keys (Optional[list] = None) – Filter which keys should be included in the
response **exclude (Optional[list] = None) – Filter which keys should be excluded from the
response **max (Optional[int] = None) – Limit the number of items returned in the response **page (Optional[int] = None) – Works with max, the zero-based page of the
items **timeout (Optional[int] = None) – Custom timeout that overwrites Client.timeout Get the CR Constants **keys (Optional[list] = None) – Filter which keys should be included in the
response **exclude (Optional[list] = None) – Filter which keys should be excluded from the
response **timeout (Optional[int] = None) – Custom timeout that overwrites Client.timeout Gets a list of endpoints available in RoyaleAPI Get a list of tournaments that are full Get a list of tournaments that are joinable Get a list of queried tournaments Get a list of open tournaments Get a player information *tags (str) – Valid player tags. Minimum length: 3
Valid characters: 0289PYLQGRJCUV **keys (Optional[list] = None) – Filter which keys should be included in the
response **exclude (Optional[list] = None) – Filter which keys should be excluded from the
response **timeout (Optional[int] = None) – Custom timeout that overwrites Client.timeout Get a player’s battle log *tags (str) – Valid player tags. Minimum length: 3
Valid characters: 0289PYLQGRJCUV **keys (Optional[list] = None) – Filter which keys should be included in the
response **exclude (Optional[list] = None) – Filter which keys should be excluded from the
response **max (Optional[int] = None) – Limit the number of items returned in the response **page (Optional[int] = None) – Works with max, the zero-based page of the
items **timeout (Optional[int] = None) – Custom timeout that overwrites Client.timeout Get information about a player’s chest cycle *tags (str) – Valid player tags. Minimum length: 3
Valid characters: 0289PYLQGRJCUV **keys (Optional[list] = None) – Filter which keys should be included in the
response **exclude (Optional[list] = None) – Filter which keys should be excluded from the
response **timeout (Optional[int] = None) – Custom timeout that overwrites Client.timeout Check the API Key of a player.
This endpoint has been restricted to
certain members of the community tag (str) – A valid tournament tag. Minimum length: 3
Valid characters: 0289PYLQGRJCUV apikey (str) – The API Key in the player’s settings **keys (Optional[list] = None) – Filter which keys should be included in the
response **exclude (Optional[list] = None) – Filter which keys should be excluded from the
response **timeout (Optional[int] = None) – Custom timeout that overwrites Client.timeout Get a list of most queried clans Get a list of most queried decks Get a list of most queried players Get a list of most queried tournaments Get a list of tournaments that are in preperation Get a list of top clans by trophy Get a list of top players Get a list of top clans by war Get a tournament information tag (str) – A valid tournament tag. Minimum length: 3
Valid characters: 0289PYLQGRJCUV **keys (Optional[list] = None) – Filter which keys should be included in the
response **exclude (Optional[list] = None) – Filter which keys should be excluded from the
response **timeout (Optional[int] = None) – Custom timeout that overwrites Client.timeout Get a list of clans that are being
tracked by having either cr-api.com or
royaleapi.com in the description **keys (Optional[list] = None) – Filter which keys should be included in the
response **exclude (Optional[list] = None) – Filter which keys should be excluded from the
response **max (Optional[int] = None) – Limit the number of items returned in the response **page (Optional[int] = None) – Works with max, the zero-based page of the
items **timeout (Optional[int] = None) – Custom timeout that overwrites Client.timeout Gets the version of RoyaleAPI. Returns a string Search for a clan. At least one
of the filters must be present name (Optional[str]) – The name of a clan minMembers (Optional[int]) – The minimum member count
of a clan maxMembers (Optional[int]) – The maximum member count
of a clan score (Optional[int]) – The minimum trophy score of
a clan **keys (Optional[list] = None) – Filter which keys should be included in the
response **exclude (Optional[list] = None) – Filter which keys should be excluded from the
response **max (Optional[int] = None) – Limit the number of items returned in the response **page (Optional[int] = None) – Works with max, the zero-based page of the
items **timeout (Optional[int] = None) – Custom timeout that overwrites Client.timeout Search for a tournament name (str) – The name of the tournament **keys (Optional[list] = None) – Filter which keys should be included in the
response **exclude (Optional[list] = None) – Filter which keys should be excluded from the
response **max (Optional[int] = None) – Limit the number of items returned in the response **page (Optional[int] = None) – Works with max, the zero-based page of the
items **timeout (Optional[int] = None) – Custom timeout that overwrites Client.timeout
Data Models
class clashroyale.royaleapi.models.BaseAttrDict(client, data, response, cached=False, ts=None)
This class is the base class for all models, its a
wrapper around the python-box which allows access to data
via dot notation, in this case, API data will be accessed
using this class. This class shouldnt normally be used by the
user since its a base class for the actual models returned from
the client. Example Accessing data via dot notation: This functionality allows this library to present API
data in a clean dynamic way. The raw data in the form of a dictionary being used Whether or not the data being used is cached data from
the cache database. When the data which is currently being used was last updated. Response object containing headers and more information. Returns None if cached Mixin class for re requesting data from
the api for the specific model. (a)sync refresh the data. (a)sync function to return clan. (a)sync function to return player. Brief player model,
does not contain full data, non refreshable. (a)sync function to return clan. (a)sync function to return player. A clan member model,
keeps a reference to the clan object it came from. (a)sync function to return player. A clash royale player model. (a)sync function to return clan. (a)sync refresh the data. A clash royale clan model, full data + refreshable. (a)sync refresh the data. Append object to the end of the list. Remove all items from list. Return a shallow copy of the list. Return number of occurrences of value. Extend list by appending elements from the iterable. Return first index of value. Raises ValueError if the value is not present. Insert object before index. Remove and return item at index (default last). Raises IndexError if list is empty or index is out of range. (a)sync refresh the data. Remove first occurrence of value. Raises ValueError if the value is not present. Reverse IN PLACE. Stable sort IN PLACE. |