织梦CMS - 轻松建站从此开始!

欧博ABG-会员注册-官网网址

欧博allbetAPI Reference — clashroyale 4.0.0 do

时间:2025-10-13 03:30来源: 作者:admin 点击: 3 次
RoyaleAPI class clashroyale.royaleapi.Client(token, session=None, is_async=False, **options)   A client that requests data from royaleapi.com.

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.

Parameters:  
classmethod Async(token, session=None, **options)  

Returns the client in async mode.

 
get_1k_tournaments(**params)  

Get a list of tournaments that have at least 1000 max players

**open: Optional[int] = 0   Set to 1 to filter tournaments that are open   **full: Optional[int] = 0   Set to 1 to filter tournaments that are full   **inprep: Optional[int] = 0   Set to 1 to filter tournaments that are in preperation   **joinable: Optional[int] = 0   Set to 1 to filter tournaments that are joinable   **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_clan(*tags, **params)  

Get a clan information

Parameters:

*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_clan_battles(*tags, **params)  

Get the battle log from everyone in the clan

Parameters:

*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_clan_history(*tags, **params)  

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

Parameters:

*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_clan_tracking(*tags, **params)  

Returns if the clan is currently being tracked by the API by having either cr-api.com or royaleapi.com in the clan description

Parameters:

*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_clan_war(tag: clashroyale.royaleapi.utils.crtag, **params)  

Get inforamtion about a clan’s current clan war

Parameters:

*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_clan_war_log(tag: clashroyale.royaleapi.utils.crtag, **params)  

Get a clan’s war log

Parameters:

*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_constants(**params)  

Get the CR Constants

Parameters:

**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_endpoints()  

Gets a list of endpoints available in RoyaleAPI

 
get_full_tournaments(**params)  

Get a list of tournaments that are full

**1k: Optional[int] = 0   Set to 1 to filter tournaments that have at least 1000 max players   **open: Optional[int] = 0   Set to 1 to filter tournaments that are open   **inprep: Optional[int] = 0   Set to 1 to filter tournaments that are in preperation   **joinable: Optional[int] = 0   Set to 1 to filter tournaments that are joinable   **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_joinable_tournaments(**params)  

Get a list of tournaments that are joinable

**1k: Optional[int] = 0   Set to 1 to filter tournaments that have at least 1000 max players   **open: Optional[int] = 0   Set to 1 to filter tournaments that are open   **full: Optional[int] = 0   Set to 1 to filter tournaments that are full   **inprep: Optional[int] = 0   Set to 1 to filter tournaments that are in preperation   **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_known_tournaments(**params)  

Get a list of queried tournaments

**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_open_tournaments(**params)  

Get a list of open tournaments

**1k: Optional[int] = 0   Set to 1 to filter tournaments that have at least 1000 max players   **full: Optional[int] = 0   Set to 1 to filter tournaments that are full   **inprep: Optional[int] = 0   Set to 1 to filter tournaments that are in preperation   **joinable: Optional[int] = 0   Set to 1 to filter tournaments that are joinable   **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_player(*tags, **params)  

Get a player information

Parameters:

*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_player_battles(*tags, **params)  

Get a player’s battle log

Parameters:

*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_player_chests(*tags, **params)  

Get information about a player’s chest cycle

Parameters:

*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_player_verify(tag: clashroyale.royaleapi.utils.crtag, apikey: str, **params)  

Check the API Key of a player. This endpoint has been restricted to certain members of the community

Parameters:

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_popular_clans(**params)  

Get a list of most queried clans

**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_popular_decks(**params)  

Get a list of most queried decks

**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_popular_players(**params)  

Get a list of most queried players

**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_popular_tournaments(**params)  

Get a list of most queried tournaments

**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_prep_tournaments(**params)  

Get a list of tournaments that are in preperation

**1k: Optional[int] = 0   Set to 1 to filter tournaments that have at least 1000 max players   **open: Optional[int] = 0   Set to 1 to filter tournaments that are open   **full: Optional[int] = 0   Set to 1 to filter tournaments that are full   **joinable: Optional[int] = 0   Set to 1 to filter tournaments that are joinable   **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_top_clans(country_key='all', **params)  

Get a list of top clans by trophy

location_id: Optional[str] = ‘’   A location ID or ‘’ (global) See https://github.com/RoyaleAPI/cr-api-data/blob/master/json/regions.json for a list of acceptable location IDs   **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_top_players(country_key='all', **params)  

Get a list of top players

location_id: Optional[str] = ‘’   A location ID or ‘’ (global) See https://github.com/RoyaleAPI/cr-api-data/blob/master/json/regions.json for a list of acceptable location IDs   **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_top_war_clans(country_key='all', **params)  

Get a list of top clans by war

location_id: Optional[str] = ‘’   A location ID or ‘’ (global) See https://github.com/RoyaleAPI/cr-api-data/blob/master/json/regions.json for a list of acceptable location IDs   **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_tournament(tag: clashroyale.royaleapi.utils.crtag, **params)  

Get a tournament information

Parameters:

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_tracking_clans(**params)  

Get a list of clans that are being tracked by having either cr-api.com or royaleapi.com in the description

Parameters:

**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_version()  

Gets the version of RoyaleAPI. Returns a string

 
search_clans(**params)  

Search for a clan. At least one of the filters must be present

Parameters:

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_tournaments(**params)  

Search for a tournament

Parameters:

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.

raw_data  

The raw data in the form of a dictionary being used

Type:dict  
 
cached  

Whether or not the data being used is cached data from the cache database.

Type:bool  
 
last_updated  

When the data which is currently being used was last updated.

Type:datetime.datetime  
 
response  

Response object containing headers and more information. Returns None if cached

Type:requests.Response or aiohttp.ClientResponse or None  
 
 
class clashroyale.royaleapi.models.Refreshable(client, data, response, cached=False, ts=None)  

Mixin class for re requesting data from the api for the specific model.

refresh()  

(a)sync refresh the data.

 
 
class clashroyale.royaleapi.models.PartialTournament(client, data, response, cached=False, ts=None)    
class clashroyale.royaleapi.models.PartialClan(client, data, response, cached=False, ts=None)   get_clan()  

(a)sync function to return clan.

 
 
class clashroyale.royaleapi.models.PartialPlayer(client, data, response, cached=False, ts=None)   get_player()  

(a)sync function to return player.

 
 
class clashroyale.royaleapi.models.PartialPlayerClan(client, data, response, cached=False, ts=None)  

Brief player model, does not contain full data, non refreshable.

get_clan()  

(a)sync function to return clan.

 
get_player()  

(a)sync function to return player.

 
 
class clashroyale.royaleapi.models.Member(clan, data, response)  

A clan member model, keeps a reference to the clan object it came from.

get_player()  

(a)sync function to return player.

 
 
class clashroyale.royaleapi.models.FullPlayer(client, data, response, cached=False, ts=None)  

A clash royale player model.

get_clan()  

(a)sync function to return clan.

 
refresh()  

(a)sync refresh the data.

 
 
class clashroyale.royaleapi.models.FullClan(client, data, response, cached=False, ts=None)  

A clash royale clan model, full data + refreshable.

refresh()  

(a)sync refresh the data.

 
 
class clashroyale.royaleapi.models.rlist(client, data, cached, ts, response)   append()  

Append object to the end of the list.

 
clear()  

Remove all items from list.

 
copy()  

Return a shallow copy of the list.

 
count()  

Return number of occurrences of value.

 
extend()  

Extend list by appending elements from the iterable.

 
index()  

Return first index of value.

Raises ValueError if the value is not present.

 
insert()  

Insert object before index.

 
pop()  

Remove and return item at index (default last).

Raises IndexError if list is empty or index is out of range.

 
refresh()  

(a)sync refresh the data.

 
remove()  

Remove first occurrence of value.

Raises ValueError if the value is not present.

 
reverse()  

Reverse IN PLACE.

 
sort()  

Stable sort IN PLACE.

(责任编辑:)
------分隔线----------------------------
发表评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
表情:
用户名: 验证码:
发布者资料
查看详细资料 发送留言 加为好友 用户等级: 注册时间:2025-10-13 23:10 最后登录:2025-10-13 23:10
栏目列表
推荐内容