Title: | Clash Royale API |
---|---|
Description: | R interface to the official API for Clash Royale <https://developer.clashroyale.com/#/>. |
Authors: | Christopher T. Kenny [aut, cre]
|
Maintainer: | Christopher T. Kenny <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.0.1 |
Built: | 2024-08-28 03:48:48 UTC |
Source: | https://github.com/christopherkenny/royale |
Get Battle Log
cr_get_battle_log(tag = "JYJQC88", key = cr_get_key())
cr_get_battle_log(tag = "JYJQC88", key = cr_get_key())
tag |
Required. The player to return. Default: JYJQC88 |
key |
Required. API key. See https://developer.clashroyale.com/#/documentation
Default: |
tibble of player info
cr_get_battle_log('JYJQC88')
cr_get_battle_log('JYJQC88')
Get card details
cr_get_cards(limit = NULL, after = NULL, before = NULL, key = cr_get_key())
cr_get_cards(limit = NULL, after = NULL, before = NULL, key = cr_get_key())
limit |
number of items returned in the response. |
after |
return only items that occur after this marker. |
before |
return only items that occur before this marker. |
key |
Required. API key. See https://developer.clashroyale.com/#/documentation
Default: |
tibble of card info
cr_get_cards()
cr_get_cards()
Get Challenges
cr_get_challenges( limit = NULL, after = NULL, before = NULL, key = cr_get_key() )
cr_get_challenges( limit = NULL, after = NULL, before = NULL, key = cr_get_key() )
limit |
number of items returned in the response. |
after |
return only items that occur after this marker. |
before |
return only items that occur before this marker. |
key |
Required. API key. See https://developer.clashroyale.com/#/documentation
Default: |
tibble of card info
cr_get_challenges()
cr_get_challenges()
Gets full clan details
cr_get_clan(clan = "99R2PQVR", key = cr_get_key())
cr_get_clan(clan = "99R2PQVR", key = cr_get_key())
clan |
Required. Clan tag. Default: 99R2PQVR |
key |
Required. API key. See https://developer.clashroyale.com/#/documentation Default: cr_get_key |
a tibble
with each row as a player
cr_get_clan('99R2PQVR')
cr_get_clan('99R2PQVR')
Get current clan members
cr_get_clan_members( clan = "99R2PQVR", limit = NULL, after = NULL, before = NULL, key = cr_get_key() )
cr_get_clan_members( clan = "99R2PQVR", limit = NULL, after = NULL, before = NULL, key = cr_get_key() )
clan |
Required. Clan tag. Default: 99R2PQVR |
limit |
number of items returned in the response. |
after |
return only items that occur after this marker. |
before |
return only items that occur before this marker. |
key |
Required. Clash Royale API key. See https://developer.clashroyale.com/#/documentation Default: cr_get_key |
tibble
with list columns for clan, clans, and history.
cr_get_clan_members('99R2PQVR')
cr_get_clan_members('99R2PQVR')
Search Clans
cr_get_clan_search( name = NULL, location_id = NULL, min_members = NULL, max_members = NULL, min_score = NULL, limit = NULL, after = NULL, before = NULL, key = cr_get_key() )
cr_get_clan_search( name = NULL, location_id = NULL, min_members = NULL, max_members = NULL, min_score = NULL, limit = NULL, after = NULL, before = NULL, key = cr_get_key() )
name |
Search clans by name |
location_id |
Filter by clan location identifier |
min_members |
Filter by minimum number of clan members |
max_members |
Filter by maximum number of clan members |
min_score |
Filter by minimum amount of clan score |
limit |
number of items returned in the response. |
after |
return only items that occur after this marker. |
before |
return only items that occur before this marker. |
key |
Required. API key. See https://developer.clashroyale.com/#/documentation Default: cr_get_key |
a tibble
with each row as a player
cr_get_clan_search('Legend Dynasty!')
cr_get_clan_search('Legend Dynasty!')
Get Global Player Path of Legend Rankings
cr_get_global_path_of_legend_players( season, limit = NULL, after = NULL, before = NULL, key = cr_get_key() )
cr_get_global_path_of_legend_players( season, limit = NULL, after = NULL, before = NULL, key = cr_get_key() )
season |
Required. Season ID, such as '2022-09' |
limit |
number of items returned in the response. |
after |
return only items that occur after this marker. |
before |
return only items that occur before this marker. |
key |
Required. API key. See https://developer.clashroyale.com/#/documentation
Default: |
tibble of card info
cr_get_global_path_of_legend_players('2023-02', limit = 10)
cr_get_global_path_of_legend_players('2023-02', limit = 10)
Get Global Player Rankings for a Season
cr_get_global_ranking_players( season, limit = NULL, after = NULL, before = NULL, key = cr_get_key() )
cr_get_global_ranking_players( season, limit = NULL, after = NULL, before = NULL, key = cr_get_key() )
season |
Required. Season ID, such as '2022-09' |
limit |
number of items returned in the response. |
after |
return only items that occur after this marker. |
before |
return only items that occur before this marker. |
key |
Required. API key. See https://developer.clashroyale.com/#/documentation
Default: |
tibble of card info
cr_get_global_ranking_players('2022-09', limit = 10)
cr_get_global_ranking_players('2022-09', limit = 10)
Get Global Tournament Rankings
cr_get_global_ranking_tournament( tournament, limit = NULL, after = NULL, before = NULL, key = cr_get_key() )
cr_get_global_ranking_tournament( tournament, limit = NULL, after = NULL, before = NULL, key = cr_get_key() )
tournament |
Tournament tag. Required. |
limit |
number of items returned in the response. |
after |
return only items that occur after this marker. |
before |
return only items that occur before this marker. |
key |
Required. API key. See https://developer.clashroyale.com/#/documentation
Default: |
tibble of card info
# needs an ongoing tournament at time of request try({cr_get_global_ranking_tournament('URP8YYUU0')})
# needs an ongoing tournament at time of request try({cr_get_global_ranking_tournament('URP8YYUU0')})
This returns the current season if it's a valid season.
cr_get_global_season( season, limit = NULL, after = NULL, before = NULL, key = cr_get_key() )
cr_get_global_season( season, limit = NULL, after = NULL, before = NULL, key = cr_get_key() )
season |
Required. Season ID, such as '2022-09' |
limit |
number of items returned in the response. |
after |
return only items that occur after this marker. |
before |
return only items that occur before this marker. |
key |
Required. API key. See https://developer.clashroyale.com/#/documentation
Default: |
tibble of global seasons
cr_get_global_season('2022-09')
cr_get_global_season('2022-09')
Get Global Seasons
cr_get_global_seasons( season, limit = NULL, after = NULL, before = NULL, key = cr_get_key() )
cr_get_global_seasons( season, limit = NULL, after = NULL, before = NULL, key = cr_get_key() )
season |
Required. Season ID, such as '2022-09' |
limit |
number of items returned in the response. |
after |
return only items that occur after this marker. |
before |
return only items that occur before this marker. |
key |
Required. API key. See https://developer.clashroyale.com/#/documentation
Default: |
tibble of card info
cr_get_global_seasons()
cr_get_global_seasons()
Get Global Tournament details
cr_get_global_tournaments( limit = NULL, after = NULL, before = NULL, key = cr_get_key() )
cr_get_global_tournaments( limit = NULL, after = NULL, before = NULL, key = cr_get_key() )
limit |
number of items returned in the response. |
after |
return only items that occur after this marker. |
before |
return only items that occur before this marker. |
key |
Required. API key. See https://developer.clashroyale.com/#/documentation
Default: |
tibble of card info
cr_get_global_tournaments()
cr_get_global_tournaments()
Get Player Path of Legend Rankings for a Location
cr_get_local_path_of_legend_players( location, limit = NULL, after = NULL, before = NULL, key = cr_get_key() )
cr_get_local_path_of_legend_players( location, limit = NULL, after = NULL, before = NULL, key = cr_get_key() )
location |
Required. Location ID from |
limit |
number of items returned in the response. |
after |
return only items that occur after this marker. |
before |
return only items that occur before this marker. |
key |
Required. API key. See https://developer.clashroyale.com/#/documentation
Default: |
tibble of card info
cr_get_local_path_of_legend_players(location = 57000249, limit = 10)
cr_get_local_path_of_legend_players(location = 57000249, limit = 10)
Get Clan Rankings for a Location
cr_get_local_ranking_clans( location, limit = NULL, after = NULL, before = NULL, key = cr_get_key() )
cr_get_local_ranking_clans( location, limit = NULL, after = NULL, before = NULL, key = cr_get_key() )
location |
Required. Location ID from |
limit |
number of items returned in the response. |
after |
return only items that occur after this marker. |
before |
return only items that occur before this marker. |
key |
Required. API key. See https://developer.clashroyale.com/#/documentation
Default: |
tibble of card info
cr_get_local_ranking_clans(57000001, limit = 10)
cr_get_local_ranking_clans(57000001, limit = 10)
Get Player Rankings for a Location
cr_get_local_ranking_players( location, limit = NULL, after = NULL, before = NULL, key = cr_get_key() )
cr_get_local_ranking_players( location, limit = NULL, after = NULL, before = NULL, key = cr_get_key() )
location |
Required. Location ID from |
limit |
number of items returned in the response. |
after |
return only items that occur after this marker. |
before |
return only items that occur before this marker. |
key |
Required. API key. See https://developer.clashroyale.com/#/documentation
Default: |
tibble of card info
cr_get_local_ranking_players(57000249, limit = 10)
cr_get_local_ranking_players(57000249, limit = 10)
Get One Location
cr_get_location(location, key = cr_get_key())
cr_get_location(location, key = cr_get_key())
location |
Required. Location ID from |
key |
Required. API key. See https://developer.clashroyale.com/#/documentation
Default: |
tibble of card info
cr_get_location(57000001)
cr_get_location(57000001)
Get Locations
cr_get_locations(limit = NULL, after = NULL, before = NULL, key = cr_get_key())
cr_get_locations(limit = NULL, after = NULL, before = NULL, key = cr_get_key())
limit |
number of items returned in the response. |
after |
return only items that occur after this marker. |
before |
return only items that occur before this marker. |
key |
Required. API key. See https://developer.clashroyale.com/#/documentation
Default: |
tibble of locations
cr_get_locations()
cr_get_locations()
Gets the player details for one player.
cr_get_player(tag = "JYJQC88", key = cr_get_key())
cr_get_player(tag = "JYJQC88", key = cr_get_key())
tag |
Required. The player to return. Default: JYJQC88 |
key |
Required. API key. See https://developer.clashroyale.com/#/documentation
Default: |
tibble of player info
cr_get_player('JYJQC88')
cr_get_player('JYJQC88')
Get current River Race
cr_get_riverrace_current( clan = "99R2PQVR", limit = NULL, after = NULL, before = NULL, key = cr_get_key() )
cr_get_riverrace_current( clan = "99R2PQVR", limit = NULL, after = NULL, before = NULL, key = cr_get_key() )
clan |
Required. Clan tag. Default: 99R2PQVR |
limit |
number of items returned in the response. |
after |
return only items that occur after this marker. |
before |
return only items that occur before this marker. |
key |
Required. Clash Royale API key. See https://developer.clashroyale.com/#/documentation Default: cr_get_key |
tibble
with list columns for clan, clans, and history.
cr_get_riverrace_current('99R2PQVR')
cr_get_riverrace_current('99R2PQVR')
Get River Race Log
cr_get_riverrace_log( clan = "99R2PQVR", limit = NULL, after = NULL, before = NULL, key = cr_get_key() )
cr_get_riverrace_log( clan = "99R2PQVR", limit = NULL, after = NULL, before = NULL, key = cr_get_key() )
clan |
Required. Clan tag. Default: 99R2PQVR |
limit |
number of items returned in the response. |
after |
return only items that occur after this marker. |
before |
return only items that occur before this marker. |
key |
Required. Clash Royale API key. See https://developer.clashroyale.com/#/documentation Default: cr_get_key |
tibble
with list columns for clan, clans, and history.
cr_get_riverrace_log('99R2PQVR')
cr_get_riverrace_log('99R2PQVR')
This returns the current season if it's a valid season.
cr_get_seasons(key = cr_get_key())
cr_get_seasons(key = cr_get_key())
key |
Required. API key. See https://developer.clashroyale.com/#/documentation
Default: |
a tibble
of season info
cr_get_seasons()
cr_get_seasons()
Get Tournament
cr_get_tournament(tournament, key = cr_get_key())
cr_get_tournament(tournament, key = cr_get_key())
tournament |
Tournament tag. Required. |
key |
Required. API key. See https://developer.clashroyale.com/#/documentation Default: cr_get_key |
a tibble
with each row as a player
tournament <- cr_get_tournament_search('a')$tag[1] cr_get_tournament(tournament)
tournament <- cr_get_tournament_search('a')$tag[1] cr_get_tournament(tournament)
Search Tournaments
cr_get_tournament_search( name = NULL, limit = NULL, after = NULL, before = NULL, key = cr_get_key() )
cr_get_tournament_search( name = NULL, limit = NULL, after = NULL, before = NULL, key = cr_get_key() )
name |
Search clans by name |
limit |
number of items returned in the response. |
after |
return only items that occur after this marker. |
before |
return only items that occur before this marker. |
key |
Required. API key. See https://developer.clashroyale.com/#/documentation Default: cr_get_key |
a tibble
with each row as a player
cr_get_tournament_search('clash')
cr_get_tournament_search('clash')
Get Upcoming Chests
cr_get_upcoming_chests(tag = "JYJQC88", key = cr_get_key())
cr_get_upcoming_chests(tag = "JYJQC88", key = cr_get_key())
tag |
Required. The player to return. Default: JYJQC88 |
key |
Required. API key. See https://developer.clashroyale.com/#/documentation
Default: |
tibble of player info
cr_get_upcoming_chests('JYJQC88')
cr_get_upcoming_chests('JYJQC88')
Sets your Clash Royale API key for default use.
cr_set_key(key, overwrite = FALSE, install = FALSE)
cr_set_key(key, overwrite = FALSE, install = FALSE)
key |
Required. Your Clash Royale API key. See https://developer.clashroyale.com/#/getting-started. |
overwrite |
Defaults to FALSE. Boolean. Should existing |
install |
Defaults to FALSE. Boolean. Should this be added '~/.Renviron' file? |
key, invisibly
## Not run: cr_set_key('1234') ## End(Not run)
## Not run: cr_set_key('1234') ## End(Not run)
Retrieves Clash Royale API key set by cr_set_key()
if cr_get_key()
or indicates if
one is set if cr_has_key()
.
cr_get_key() cr_has_key()
cr_get_key() cr_has_key()
string key, invisibly otherwise logical
cr_has_key()
cr_has_key()