mirror of https://github.com/MingweiSamuel/Riven
fix endpoint.rs indentation
parent
5f5a32d753
commit
bc996a34e0
718
src/endpoints.rs
718
src/endpoints.rs
|
@ -7,7 +7,7 @@
|
||||||
///////////////////////////////////////////////
|
///////////////////////////////////////////////
|
||||||
|
|
||||||
// http://www.mingweisamuel.com/riotapi-schema/tool/
|
// http://www.mingweisamuel.com/riotapi-schema/tool/
|
||||||
// Version b2fb0513c3cdb6baa0ba78bd2a50b43670161980
|
// Version 85da12632b552f2033d1708c17b04306e90b935e
|
||||||
|
|
||||||
//! Automatically generated endpoint handles and data transfer structs.
|
//! Automatically generated endpoint handles and data transfer structs.
|
||||||
|
|
||||||
|
@ -110,45 +110,45 @@ pub struct ChampionMasteryV4<'a> {
|
||||||
base: &'a RiotApi,
|
base: &'a RiotApi,
|
||||||
}
|
}
|
||||||
impl<'a> ChampionMasteryV4<'a> {
|
impl<'a> ChampionMasteryV4<'a> {
|
||||||
/// Get all champion mastery entries sorted by number of champion points descending,
|
/// Get all champion mastery entries sorted by number of champion points descending,
|
||||||
///
|
///
|
||||||
/// <a href="https://developer.riotgames.com/api-methods/#champion-mastery-v4/GET_getAllChampionMasteries">Official API Reference</a>
|
/// <a href="https://developer.riotgames.com/api-methods/#champion-mastery-v4/GET_getAllChampionMasteries">Official API Reference</a>
|
||||||
/// # Parameters
|
/// # Parameters
|
||||||
/// * `region` - Region to query.
|
/// * `region` - Region to query.
|
||||||
/// * `encryptedSummonerId` - Summoner ID associated with the player
|
/// * `encryptedSummonerId` - Summoner ID associated with the player
|
||||||
pub fn get_all_champion_masteries(&self, region: Region, encrypted_summoner_id: &str)
|
pub fn get_all_champion_masteries(&self, region: Region, encrypted_summoner_id: &str)
|
||||||
-> impl Future<Output = Result<Option<Vec<champion_mastery_v4::ChampionMastery>>>> + 'a
|
-> impl Future<Output = Result<Option<Vec<champion_mastery_v4::ChampionMastery>>>> + 'a
|
||||||
{
|
{
|
||||||
let path_string = format!("/lol/champion-mastery/v4/champion-masteries/by-summoner/{}", encrypted_summoner_id);
|
let path_string = format!("/lol/champion-mastery/v4/champion-masteries/by-summoner/{}", encrypted_summoner_id);
|
||||||
self.base.get::<Vec<champion_mastery_v4::ChampionMastery>>("champion-mastery-v4.getAllChampionMasteries", region, path_string, None)
|
self.base.get::<Vec<champion_mastery_v4::ChampionMastery>>("champion-mastery-v4.getAllChampionMasteries", region, path_string, None)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get a champion mastery by player ID and champion ID.
|
/// Get a champion mastery by player ID and champion ID.
|
||||||
///
|
///
|
||||||
/// <a href="https://developer.riotgames.com/api-methods/#champion-mastery-v4/GET_getChampionMastery">Official API Reference</a>
|
/// <a href="https://developer.riotgames.com/api-methods/#champion-mastery-v4/GET_getChampionMastery">Official API Reference</a>
|
||||||
/// # Parameters
|
/// # Parameters
|
||||||
/// * `region` - Region to query.
|
/// * `region` - Region to query.
|
||||||
/// * `championId` - Champion ID to retrieve Champion Mastery for
|
/// * `championId` - Champion ID to retrieve Champion Mastery for
|
||||||
/// * `encryptedSummonerId` - Summoner ID associated with the player
|
/// * `encryptedSummonerId` - Summoner ID associated with the player
|
||||||
pub fn get_champion_mastery(&self, region: Region, encrypted_summoner_id: &str, champion_id: crate::consts::Champion)
|
pub fn get_champion_mastery(&self, region: Region, encrypted_summoner_id: &str, champion_id: crate::consts::Champion)
|
||||||
-> impl Future<Output = Result<Option<champion_mastery_v4::ChampionMastery>>> + 'a
|
-> impl Future<Output = Result<Option<champion_mastery_v4::ChampionMastery>>> + 'a
|
||||||
{
|
{
|
||||||
let path_string = format!("/lol/champion-mastery/v4/champion-masteries/by-summoner/{}/by-champion/{}", encrypted_summoner_id, champion_id);
|
let path_string = format!("/lol/champion-mastery/v4/champion-masteries/by-summoner/{}/by-champion/{}", encrypted_summoner_id, champion_id);
|
||||||
self.base.get::<champion_mastery_v4::ChampionMastery>("champion-mastery-v4.getChampionMastery", region, path_string, None)
|
self.base.get::<champion_mastery_v4::ChampionMastery>("champion-mastery-v4.getChampionMastery", region, path_string, None)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get a player's total champion mastery score, which is the sum of individual champion mastery levels.
|
/// Get a player's total champion mastery score, which is the sum of individual champion mastery levels.
|
||||||
///
|
///
|
||||||
/// <a href="https://developer.riotgames.com/api-methods/#champion-mastery-v4/GET_getChampionMasteryScore">Official API Reference</a>
|
/// <a href="https://developer.riotgames.com/api-methods/#champion-mastery-v4/GET_getChampionMasteryScore">Official API Reference</a>
|
||||||
/// # Parameters
|
/// # Parameters
|
||||||
/// * `region` - Region to query.
|
/// * `region` - Region to query.
|
||||||
/// * `encryptedSummonerId` - Summoner ID associated with the player
|
/// * `encryptedSummonerId` - Summoner ID associated with the player
|
||||||
pub fn get_champion_mastery_score(&self, region: Region, encrypted_summoner_id: &str)
|
pub fn get_champion_mastery_score(&self, region: Region, encrypted_summoner_id: &str)
|
||||||
-> impl Future<Output = Result<Option<i32>>> + 'a
|
-> impl Future<Output = Result<Option<i32>>> + 'a
|
||||||
{
|
{
|
||||||
let path_string = format!("/lol/champion-mastery/v4/scores/by-summoner/{}", encrypted_summoner_id);
|
let path_string = format!("/lol/champion-mastery/v4/scores/by-summoner/{}", encrypted_summoner_id);
|
||||||
self.base.get::<i32>("champion-mastery-v4.getChampionMasteryScore", region, path_string, None)
|
self.base.get::<i32>("champion-mastery-v4.getChampionMasteryScore", region, path_string, None)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -159,17 +159,17 @@ pub struct ChampionV3<'a> {
|
||||||
base: &'a RiotApi,
|
base: &'a RiotApi,
|
||||||
}
|
}
|
||||||
impl<'a> ChampionV3<'a> {
|
impl<'a> ChampionV3<'a> {
|
||||||
/// Returns champion rotations, including free-to-play and low-level free-to-play rotations (REST)
|
/// Returns champion rotations, including free-to-play and low-level free-to-play rotations (REST)
|
||||||
///
|
///
|
||||||
/// <a href="https://developer.riotgames.com/api-methods/#champion-v3/GET_getChampionInfo">Official API Reference</a>
|
/// <a href="https://developer.riotgames.com/api-methods/#champion-v3/GET_getChampionInfo">Official API Reference</a>
|
||||||
/// # Parameters
|
/// # Parameters
|
||||||
/// * `region` - Region to query.
|
/// * `region` - Region to query.
|
||||||
pub fn get_champion_info(&self, region: Region)
|
pub fn get_champion_info(&self, region: Region)
|
||||||
-> impl Future<Output = Result<Option<champion_v3::ChampionInfo>>> + 'a
|
-> impl Future<Output = Result<Option<champion_v3::ChampionInfo>>> + 'a
|
||||||
{
|
{
|
||||||
let path_string = "/lol/platform/v3/champion-rotations".to_owned();
|
let path_string = "/lol/platform/v3/champion-rotations".to_owned();
|
||||||
self.base.get::<champion_v3::ChampionInfo>("champion-v3.getChampionInfo", region, path_string, None)
|
self.base.get::<champion_v3::ChampionInfo>("champion-v3.getChampionInfo", region, path_string, None)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -180,24 +180,24 @@ pub struct LeagueExpV4<'a> {
|
||||||
base: &'a RiotApi,
|
base: &'a RiotApi,
|
||||||
}
|
}
|
||||||
impl<'a> LeagueExpV4<'a> {
|
impl<'a> LeagueExpV4<'a> {
|
||||||
/// Get all the league entries.
|
/// Get all the league entries.
|
||||||
///
|
///
|
||||||
/// <a href="https://developer.riotgames.com/api-methods/#league-exp-v4/GET_getLeagueEntries">Official API Reference</a>
|
/// <a href="https://developer.riotgames.com/api-methods/#league-exp-v4/GET_getLeagueEntries">Official API Reference</a>
|
||||||
/// # Parameters
|
/// # Parameters
|
||||||
/// * `region` - Region to query.
|
/// * `region` - Region to query.
|
||||||
/// * `queue` - Note that the queue value must be a valid ranked queue.
|
/// * `queue` - Note that the queue value must be a valid ranked queue.
|
||||||
/// * `tier`
|
/// * `tier`
|
||||||
/// * `division`
|
/// * `division`
|
||||||
/// * `page` (optional) - Starts with page 1.
|
/// * `page` (optional) - Starts with page 1.
|
||||||
pub fn get_league_entries(&self, region: Region, division: crate::consts::Division, tier: crate::consts::Tier, queue: crate::consts::QueueType, page: Option<i32>)
|
pub fn get_league_entries(&self, region: Region, division: crate::consts::Division, tier: crate::consts::Tier, queue: crate::consts::QueueType, page: Option<i32>)
|
||||||
-> impl Future<Output = Result<Option<Vec<league_exp_v4::LeagueEntry>>>> + 'a
|
-> impl Future<Output = Result<Option<Vec<league_exp_v4::LeagueEntry>>>> + 'a
|
||||||
{
|
{
|
||||||
let mut query_params = Serializer::new(String::new());
|
let mut query_params = Serializer::new(String::new());
|
||||||
if let Some(page) = page { query_params.append_pair("page", &*page.to_string()); };
|
if let Some(page) = page { query_params.append_pair("page", &*page.to_string()); };
|
||||||
let query_string = query_params.finish();
|
let query_string = query_params.finish();
|
||||||
let path_string = format!("/lol/league-exp/v4/entries/{}/{}/{}", division, tier, queue);
|
let path_string = format!("/lol/league-exp/v4/entries/{}/{}/{}", division, tier, queue);
|
||||||
self.base.get::<Vec<league_exp_v4::LeagueEntry>>("league-exp-v4.getLeagueEntries", region, path_string, Some(query_string))
|
self.base.get::<Vec<league_exp_v4::LeagueEntry>>("league-exp-v4.getLeagueEntries", region, path_string, Some(query_string))
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -208,89 +208,89 @@ pub struct LeagueV4<'a> {
|
||||||
base: &'a RiotApi,
|
base: &'a RiotApi,
|
||||||
}
|
}
|
||||||
impl<'a> LeagueV4<'a> {
|
impl<'a> LeagueV4<'a> {
|
||||||
/// Get the challenger league for given queue.
|
/// Get the challenger league for given queue.
|
||||||
///
|
///
|
||||||
/// <a href="https://developer.riotgames.com/api-methods/#league-v4/GET_getChallengerLeague">Official API Reference</a>
|
/// <a href="https://developer.riotgames.com/api-methods/#league-v4/GET_getChallengerLeague">Official API Reference</a>
|
||||||
/// # Parameters
|
/// # Parameters
|
||||||
/// * `region` - Region to query.
|
/// * `region` - Region to query.
|
||||||
/// * `queue`
|
/// * `queue`
|
||||||
pub fn get_challenger_league(&self, region: Region, queue: crate::consts::QueueType)
|
pub fn get_challenger_league(&self, region: Region, queue: crate::consts::QueueType)
|
||||||
-> impl Future<Output = Result<Option<league_v4::LeagueList>>> + 'a
|
-> impl Future<Output = Result<Option<league_v4::LeagueList>>> + 'a
|
||||||
{
|
{
|
||||||
let path_string = format!("/lol/league/v4/challengerleagues/by-queue/{}", queue);
|
let path_string = format!("/lol/league/v4/challengerleagues/by-queue/{}", queue);
|
||||||
self.base.get::<league_v4::LeagueList>("league-v4.getChallengerLeague", region, path_string, None)
|
self.base.get::<league_v4::LeagueList>("league-v4.getChallengerLeague", region, path_string, None)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get league entries in all queues for a given summoner ID.
|
/// Get league entries in all queues for a given summoner ID.
|
||||||
///
|
///
|
||||||
/// <a href="https://developer.riotgames.com/api-methods/#league-v4/GET_getLeagueEntriesForSummoner">Official API Reference</a>
|
/// <a href="https://developer.riotgames.com/api-methods/#league-v4/GET_getLeagueEntriesForSummoner">Official API Reference</a>
|
||||||
/// # Parameters
|
/// # Parameters
|
||||||
/// * `region` - Region to query.
|
/// * `region` - Region to query.
|
||||||
/// * `encryptedSummonerId`
|
/// * `encryptedSummonerId`
|
||||||
pub fn get_league_entries_for_summoner(&self, region: Region, encrypted_summoner_id: &str)
|
pub fn get_league_entries_for_summoner(&self, region: Region, encrypted_summoner_id: &str)
|
||||||
-> impl Future<Output = Result<Option<Vec<league_v4::LeagueEntry>>>> + 'a
|
-> impl Future<Output = Result<Option<Vec<league_v4::LeagueEntry>>>> + 'a
|
||||||
{
|
{
|
||||||
let path_string = format!("/lol/league/v4/entries/by-summoner/{}", encrypted_summoner_id);
|
let path_string = format!("/lol/league/v4/entries/by-summoner/{}", encrypted_summoner_id);
|
||||||
self.base.get::<Vec<league_v4::LeagueEntry>>("league-v4.getLeagueEntriesForSummoner", region, path_string, None)
|
self.base.get::<Vec<league_v4::LeagueEntry>>("league-v4.getLeagueEntriesForSummoner", region, path_string, None)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get all the league entries.
|
/// Get all the league entries.
|
||||||
///
|
///
|
||||||
/// <a href="https://developer.riotgames.com/api-methods/#league-v4/GET_getLeagueEntries">Official API Reference</a>
|
/// <a href="https://developer.riotgames.com/api-methods/#league-v4/GET_getLeagueEntries">Official API Reference</a>
|
||||||
/// # Parameters
|
/// # Parameters
|
||||||
/// * `region` - Region to query.
|
/// * `region` - Region to query.
|
||||||
/// * `division`
|
/// * `division`
|
||||||
/// * `tier`
|
/// * `tier`
|
||||||
/// * `queue` - Note that the queue value must be a valid ranked queue.
|
/// * `queue` - Note that the queue value must be a valid ranked queue.
|
||||||
/// * `page` (optional) - Starts with page 1.
|
/// * `page` (optional) - Starts with page 1.
|
||||||
pub fn get_league_entries(&self, region: Region, queue: crate::consts::QueueType, tier: crate::consts::Tier, division: crate::consts::Division, page: Option<i32>)
|
pub fn get_league_entries(&self, region: Region, queue: crate::consts::QueueType, tier: crate::consts::Tier, division: crate::consts::Division, page: Option<i32>)
|
||||||
-> impl Future<Output = Result<Option<Vec<league_v4::LeagueEntry>>>> + 'a
|
-> impl Future<Output = Result<Option<Vec<league_v4::LeagueEntry>>>> + 'a
|
||||||
{
|
{
|
||||||
let mut query_params = Serializer::new(String::new());
|
let mut query_params = Serializer::new(String::new());
|
||||||
if let Some(page) = page { query_params.append_pair("page", &*page.to_string()); };
|
if let Some(page) = page { query_params.append_pair("page", &*page.to_string()); };
|
||||||
let query_string = query_params.finish();
|
let query_string = query_params.finish();
|
||||||
let path_string = format!("/lol/league/v4/entries/{}/{}/{}", queue, tier, division);
|
let path_string = format!("/lol/league/v4/entries/{}/{}/{}", queue, tier, division);
|
||||||
self.base.get::<Vec<league_v4::LeagueEntry>>("league-v4.getLeagueEntries", region, path_string, Some(query_string))
|
self.base.get::<Vec<league_v4::LeagueEntry>>("league-v4.getLeagueEntries", region, path_string, Some(query_string))
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get the grandmaster league of a specific queue.
|
/// Get the grandmaster league of a specific queue.
|
||||||
///
|
///
|
||||||
/// <a href="https://developer.riotgames.com/api-methods/#league-v4/GET_getGrandmasterLeague">Official API Reference</a>
|
/// <a href="https://developer.riotgames.com/api-methods/#league-v4/GET_getGrandmasterLeague">Official API Reference</a>
|
||||||
/// # Parameters
|
/// # Parameters
|
||||||
/// * `region` - Region to query.
|
/// * `region` - Region to query.
|
||||||
/// * `queue`
|
/// * `queue`
|
||||||
pub fn get_grandmaster_league(&self, region: Region, queue: crate::consts::QueueType)
|
pub fn get_grandmaster_league(&self, region: Region, queue: crate::consts::QueueType)
|
||||||
-> impl Future<Output = Result<Option<league_v4::LeagueList>>> + 'a
|
-> impl Future<Output = Result<Option<league_v4::LeagueList>>> + 'a
|
||||||
{
|
{
|
||||||
let path_string = format!("/lol/league/v4/grandmasterleagues/by-queue/{}", queue);
|
let path_string = format!("/lol/league/v4/grandmasterleagues/by-queue/{}", queue);
|
||||||
self.base.get::<league_v4::LeagueList>("league-v4.getGrandmasterLeague", region, path_string, None)
|
self.base.get::<league_v4::LeagueList>("league-v4.getGrandmasterLeague", region, path_string, None)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get league with given ID, including inactive entries.
|
/// Get league with given ID, including inactive entries.
|
||||||
///
|
///
|
||||||
/// <a href="https://developer.riotgames.com/api-methods/#league-v4/GET_getLeagueById">Official API Reference</a>
|
/// <a href="https://developer.riotgames.com/api-methods/#league-v4/GET_getLeagueById">Official API Reference</a>
|
||||||
/// # Parameters
|
/// # Parameters
|
||||||
/// * `region` - Region to query.
|
/// * `region` - Region to query.
|
||||||
/// * `leagueId` - The UUID of the league.
|
/// * `leagueId` - The UUID of the league.
|
||||||
pub fn get_league_by_id(&self, region: Region, league_id: &str)
|
pub fn get_league_by_id(&self, region: Region, league_id: &str)
|
||||||
-> impl Future<Output = Result<Option<league_v4::LeagueList>>> + 'a
|
-> impl Future<Output = Result<Option<league_v4::LeagueList>>> + 'a
|
||||||
{
|
{
|
||||||
let path_string = format!("/lol/league/v4/leagues/{}", league_id);
|
let path_string = format!("/lol/league/v4/leagues/{}", league_id);
|
||||||
self.base.get::<league_v4::LeagueList>("league-v4.getLeagueById", region, path_string, None)
|
self.base.get::<league_v4::LeagueList>("league-v4.getLeagueById", region, path_string, None)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get the master league for given queue.
|
/// Get the master league for given queue.
|
||||||
///
|
///
|
||||||
/// <a href="https://developer.riotgames.com/api-methods/#league-v4/GET_getMasterLeague">Official API Reference</a>
|
/// <a href="https://developer.riotgames.com/api-methods/#league-v4/GET_getMasterLeague">Official API Reference</a>
|
||||||
/// # Parameters
|
/// # Parameters
|
||||||
/// * `region` - Region to query.
|
/// * `region` - Region to query.
|
||||||
/// * `queue`
|
/// * `queue`
|
||||||
pub fn get_master_league(&self, region: Region, queue: crate::consts::QueueType)
|
pub fn get_master_league(&self, region: Region, queue: crate::consts::QueueType)
|
||||||
-> impl Future<Output = Result<Option<league_v4::LeagueList>>> + 'a
|
-> impl Future<Output = Result<Option<league_v4::LeagueList>>> + 'a
|
||||||
{
|
{
|
||||||
let path_string = format!("/lol/league/v4/masterleagues/by-queue/{}", queue);
|
let path_string = format!("/lol/league/v4/masterleagues/by-queue/{}", queue);
|
||||||
self.base.get::<league_v4::LeagueList>("league-v4.getMasterLeague", region, path_string, None)
|
self.base.get::<league_v4::LeagueList>("league-v4.getMasterLeague", region, path_string, None)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -301,19 +301,19 @@ pub struct LolStatusV3<'a> {
|
||||||
base: &'a RiotApi,
|
base: &'a RiotApi,
|
||||||
}
|
}
|
||||||
impl<'a> LolStatusV3<'a> {
|
impl<'a> LolStatusV3<'a> {
|
||||||
/// Get League of Legends status for the given shard.
|
/// Get League of Legends status for the given shard.
|
||||||
/// ## Rate Limit Notes
|
/// ## Rate Limit Notes
|
||||||
/// Requests to this API are not counted against the application Rate Limits.
|
/// Requests to this API are not counted against the application Rate Limits.
|
||||||
///
|
///
|
||||||
/// <a href="https://developer.riotgames.com/api-methods/#lol-status-v3/GET_getShardData">Official API Reference</a>
|
/// <a href="https://developer.riotgames.com/api-methods/#lol-status-v3/GET_getShardData">Official API Reference</a>
|
||||||
/// # Parameters
|
/// # Parameters
|
||||||
/// * `region` - Region to query.
|
/// * `region` - Region to query.
|
||||||
pub fn get_shard_data(&self, region: Region)
|
pub fn get_shard_data(&self, region: Region)
|
||||||
-> impl Future<Output = Result<Option<lol_status_v3::ShardStatus>>> + 'a
|
-> impl Future<Output = Result<Option<lol_status_v3::ShardStatus>>> + 'a
|
||||||
{
|
{
|
||||||
let path_string = "/lol/status/v3/shard-data".to_owned();
|
let path_string = "/lol/status/v3/shard-data".to_owned();
|
||||||
self.base.get::<lol_status_v3::ShardStatus>("lol-status-v3.getShardData", region, path_string, None)
|
self.base.get::<lol_status_v3::ShardStatus>("lol-status-v3.getShardData", region, path_string, None)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -324,95 +324,95 @@ pub struct MatchV4<'a> {
|
||||||
base: &'a RiotApi,
|
base: &'a RiotApi,
|
||||||
}
|
}
|
||||||
impl<'a> MatchV4<'a> {
|
impl<'a> MatchV4<'a> {
|
||||||
/// Get match IDs by tournament code.
|
/// Get match IDs by tournament code.
|
||||||
///
|
///
|
||||||
/// <a href="https://developer.riotgames.com/api-methods/#match-v4/GET_getMatchIdsByTournamentCode">Official API Reference</a>
|
/// <a href="https://developer.riotgames.com/api-methods/#match-v4/GET_getMatchIdsByTournamentCode">Official API Reference</a>
|
||||||
/// # Parameters
|
/// # Parameters
|
||||||
/// * `region` - Region to query.
|
/// * `region` - Region to query.
|
||||||
/// * `tournamentCode` - The tournament code.
|
/// * `tournamentCode` - The tournament code.
|
||||||
pub fn get_match_ids_by_tournament_code(&self, region: Region, tournament_code: &str)
|
pub fn get_match_ids_by_tournament_code(&self, region: Region, tournament_code: &str)
|
||||||
-> impl Future<Output = Result<Option<Vec<i64>>>> + 'a
|
-> impl Future<Output = Result<Option<Vec<i64>>>> + 'a
|
||||||
{
|
{
|
||||||
let path_string = format!("/lol/match/v4/matches/by-tournament-code/{}/ids", tournament_code);
|
let path_string = format!("/lol/match/v4/matches/by-tournament-code/{}/ids", tournament_code);
|
||||||
self.base.get::<Vec<i64>>("match-v4.getMatchIdsByTournamentCode", region, path_string, None)
|
self.base.get::<Vec<i64>>("match-v4.getMatchIdsByTournamentCode", region, path_string, None)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get match by match ID.
|
/// Get match by match ID.
|
||||||
///
|
///
|
||||||
/// <a href="https://developer.riotgames.com/api-methods/#match-v4/GET_getMatch">Official API Reference</a>
|
/// <a href="https://developer.riotgames.com/api-methods/#match-v4/GET_getMatch">Official API Reference</a>
|
||||||
/// # Parameters
|
/// # Parameters
|
||||||
/// * `region` - Region to query.
|
/// * `region` - Region to query.
|
||||||
/// * `matchId` - The match ID.
|
/// * `matchId` - The match ID.
|
||||||
pub fn get_match(&self, region: Region, match_id: i64)
|
pub fn get_match(&self, region: Region, match_id: i64)
|
||||||
-> impl Future<Output = Result<Option<match_v4::Match>>> + 'a
|
-> impl Future<Output = Result<Option<match_v4::Match>>> + 'a
|
||||||
{
|
{
|
||||||
let path_string = format!("/lol/match/v4/matches/{}", match_id);
|
let path_string = format!("/lol/match/v4/matches/{}", match_id);
|
||||||
self.base.get::<match_v4::Match>("match-v4.getMatch", region, path_string, None)
|
self.base.get::<match_v4::Match>("match-v4.getMatch", region, path_string, None)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get match by match ID and tournament code.
|
/// Get match by match ID and tournament code.
|
||||||
///
|
///
|
||||||
/// <a href="https://developer.riotgames.com/api-methods/#match-v4/GET_getMatchByTournamentCode">Official API Reference</a>
|
/// <a href="https://developer.riotgames.com/api-methods/#match-v4/GET_getMatchByTournamentCode">Official API Reference</a>
|
||||||
/// # Parameters
|
/// # Parameters
|
||||||
/// * `region` - Region to query.
|
/// * `region` - Region to query.
|
||||||
/// * `tournamentCode` - The tournament code.
|
/// * `tournamentCode` - The tournament code.
|
||||||
/// * `matchId` - The match ID.
|
/// * `matchId` - The match ID.
|
||||||
pub fn get_match_by_tournament_code(&self, region: Region, match_id: i64, tournament_code: &str)
|
pub fn get_match_by_tournament_code(&self, region: Region, match_id: i64, tournament_code: &str)
|
||||||
-> impl Future<Output = Result<Option<match_v4::Match>>> + 'a
|
-> impl Future<Output = Result<Option<match_v4::Match>>> + 'a
|
||||||
{
|
{
|
||||||
let path_string = format!("/lol/match/v4/matches/{}/by-tournament-code/{}", match_id, tournament_code);
|
let path_string = format!("/lol/match/v4/matches/{}/by-tournament-code/{}", match_id, tournament_code);
|
||||||
self.base.get::<match_v4::Match>("match-v4.getMatchByTournamentCode", region, path_string, None)
|
self.base.get::<match_v4::Match>("match-v4.getMatchByTournamentCode", region, path_string, None)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get matchlist for games played on given account ID and platform ID and filtered using given filter parameters, if any.
|
/// Get matchlist for games played on given account ID and platform ID and filtered using given filter parameters, if any.
|
||||||
/// ## Implementation Notes
|
/// ## Implementation Notes
|
||||||
/// A number of optional parameters are provided for filtering. It is up to the caller to ensure that the combination of filter parameters provided is valid for the requested account, otherwise, no matches may be returned.
|
/// A number of optional parameters are provided for filtering. It is up to the caller to ensure that the combination of filter parameters provided is valid for the requested account, otherwise, no matches may be returned.
|
||||||
///
|
///
|
||||||
/// If beginIndex is specified, but not endIndex, then endIndex defaults to beginIndex+100. If endIndex is specified, but not beginIndex, then beginIndex defaults to 0. If both are specified, then endIndex must be greater than beginIndex. The maximum range allowed is 100, otherwise a 400 error code is returned.
|
/// If beginIndex is specified, but not endIndex, then endIndex defaults to beginIndex+100. If endIndex is specified, but not beginIndex, then beginIndex defaults to 0. If both are specified, then endIndex must be greater than beginIndex. The maximum range allowed is 100, otherwise a 400 error code is returned.
|
||||||
///
|
///
|
||||||
/// If beginTime is specified, but not endTime, then endTime defaults to the the current unix timestamp in milliseconds (the maximum time range limitation is not observed in this specific case). If endTime is specified, but not beginTime, then beginTime defaults to the start of the account's match history returning a 400 due to the maximum time range limitation. If both are specified, then endTime should be greater than beginTime. The maximum time range allowed is one week, otherwise a 400 error code is returned.
|
/// If beginTime is specified, but not endTime, then endTime defaults to the the current unix timestamp in milliseconds (the maximum time range limitation is not observed in this specific case). If endTime is specified, but not beginTime, then beginTime defaults to the start of the account's match history returning a 400 due to the maximum time range limitation. If both are specified, then endTime should be greater than beginTime. The maximum time range allowed is one week, otherwise a 400 error code is returned.
|
||||||
///
|
///
|
||||||
/// <a href="https://developer.riotgames.com/api-methods/#match-v4/GET_getMatchlist">Official API Reference</a>
|
/// <a href="https://developer.riotgames.com/api-methods/#match-v4/GET_getMatchlist">Official API Reference</a>
|
||||||
/// # Parameters
|
/// # Parameters
|
||||||
/// * `region` - Region to query.
|
/// * `region` - Region to query.
|
||||||
/// * `encryptedAccountId` - The account ID.
|
/// * `encryptedAccountId` - The account ID.
|
||||||
/// * `champion` (optional) - Set of champion IDs for filtering the matchlist.
|
/// * `champion` (optional) - Set of champion IDs for filtering the matchlist.
|
||||||
/// * `queue` (optional) - Set of queue IDs for filtering the matchlist.
|
/// * `queue` (optional) - Set of queue IDs for filtering the matchlist.
|
||||||
/// * `season` (optional) - Set of season IDs for filtering the matchlist.
|
/// * `season` (optional) - Set of season IDs for filtering the matchlist.
|
||||||
/// * `endTime` (optional) - The end time to use for filtering matchlist specified as epoch milliseconds. If beginTime is specified, but not endTime, then endTime defaults to the the current unix timestamp in milliseconds (the maximum time range limitation is not observed in this specific case). If endTime is specified, but not beginTime, then beginTime defaults to the start of the account's match history returning a 400 due to the maximum time range limitation. If both are specified, then endTime should be greater than beginTime. The maximum time range allowed is one week, otherwise a 400 error code is returned.
|
/// * `endTime` (optional) - The end time to use for filtering matchlist specified as epoch milliseconds. If beginTime is specified, but not endTime, then endTime defaults to the the current unix timestamp in milliseconds (the maximum time range limitation is not observed in this specific case). If endTime is specified, but not beginTime, then beginTime defaults to the start of the account's match history returning a 400 due to the maximum time range limitation. If both are specified, then endTime should be greater than beginTime. The maximum time range allowed is one week, otherwise a 400 error code is returned.
|
||||||
/// * `beginTime` (optional) - The begin time to use for filtering matchlist specified as epoch milliseconds. If beginTime is specified, but not endTime, then endTime defaults to the the current unix timestamp in milliseconds (the maximum time range limitation is not observed in this specific case). If endTime is specified, but not beginTime, then beginTime defaults to the start of the account's match history returning a 400 due to the maximum time range limitation. If both are specified, then endTime should be greater than beginTime. The maximum time range allowed is one week, otherwise a 400 error code is returned.
|
/// * `beginTime` (optional) - The begin time to use for filtering matchlist specified as epoch milliseconds. If beginTime is specified, but not endTime, then endTime defaults to the the current unix timestamp in milliseconds (the maximum time range limitation is not observed in this specific case). If endTime is specified, but not beginTime, then beginTime defaults to the start of the account's match history returning a 400 due to the maximum time range limitation. If both are specified, then endTime should be greater than beginTime. The maximum time range allowed is one week, otherwise a 400 error code is returned.
|
||||||
/// * `endIndex` (optional) - The end index to use for filtering matchlist. If beginIndex is specified, but not endIndex, then endIndex defaults to beginIndex+100. If endIndex is specified, but not beginIndex, then beginIndex defaults to 0. If both are specified, then endIndex must be greater than beginIndex. The maximum range allowed is 100, otherwise a 400 error code is returned.
|
/// * `endIndex` (optional) - The end index to use for filtering matchlist. If beginIndex is specified, but not endIndex, then endIndex defaults to beginIndex+100. If endIndex is specified, but not beginIndex, then beginIndex defaults to 0. If both are specified, then endIndex must be greater than beginIndex. The maximum range allowed is 100, otherwise a 400 error code is returned.
|
||||||
/// * `beginIndex` (optional) - The begin index to use for filtering matchlist. If beginIndex is specified, but not endIndex, then endIndex defaults to beginIndex+100. If endIndex is specified, but not beginIndex, then beginIndex defaults to 0. If both are specified, then endIndex must be greater than beginIndex. The maximum range allowed is 100, otherwise a 400 error code is returned.
|
/// * `beginIndex` (optional) - The begin index to use for filtering matchlist. If beginIndex is specified, but not endIndex, then endIndex defaults to beginIndex+100. If endIndex is specified, but not beginIndex, then beginIndex defaults to 0. If both are specified, then endIndex must be greater than beginIndex. The maximum range allowed is 100, otherwise a 400 error code is returned.
|
||||||
pub fn get_matchlist(&self, region: Region, encrypted_account_id: &str, champion: Option<std::vec::Vec<i32>>, queue: Option<std::vec::Vec<i32>>, season: Option<std::vec::Vec<i32>>, end_time: Option<i64>, begin_time: Option<i64>, end_index: Option<i32>, begin_index: Option<i32>)
|
pub fn get_matchlist(&self, region: Region, encrypted_account_id: &str, champion: Option<std::vec::Vec<crate::consts::Champion>>, queue: Option<std::vec::Vec<crate::consts::Queue>>, season: Option<std::vec::Vec<crate::consts::Season>>, end_time: Option<i64>, begin_time: Option<i64>, end_index: Option<i32>, begin_index: Option<i32>)
|
||||||
-> impl Future<Output = Result<Option<match_v4::Matchlist>>> + 'a
|
-> impl Future<Output = Result<Option<match_v4::Matchlist>>> + 'a
|
||||||
{
|
{
|
||||||
let mut query_params = Serializer::new(String::new());
|
let mut query_params = Serializer::new(String::new());
|
||||||
if let Some(champion) = champion { query_params.extend_pairs(champion.iter().map(|w| ("champion", w.to_string()))); };
|
if let Some(champion) = champion { query_params.extend_pairs(champion.iter().map(|w| ("champion", w.to_string()))); };
|
||||||
if let Some(queue) = queue { query_params.extend_pairs(queue.iter().map(|w| ("queue", w.to_string()))); };
|
if let Some(queue) = queue { query_params.extend_pairs(queue.iter().map(|w| ("queue", w.to_string()))); };
|
||||||
if let Some(season) = season { query_params.extend_pairs(season.iter().map(|w| ("season", w.to_string()))); };
|
if let Some(season) = season { query_params.extend_pairs(season.iter().map(|w| ("season", w.to_string()))); };
|
||||||
if let Some(end_time) = end_time { query_params.append_pair("endTime", &*end_time.to_string()); };
|
if let Some(end_time) = end_time { query_params.append_pair("endTime", &*end_time.to_string()); };
|
||||||
if let Some(begin_time) = begin_time { query_params.append_pair("beginTime", &*begin_time.to_string()); };
|
if let Some(begin_time) = begin_time { query_params.append_pair("beginTime", &*begin_time.to_string()); };
|
||||||
if let Some(end_index) = end_index { query_params.append_pair("endIndex", &*end_index.to_string()); };
|
if let Some(end_index) = end_index { query_params.append_pair("endIndex", &*end_index.to_string()); };
|
||||||
if let Some(begin_index) = begin_index { query_params.append_pair("beginIndex", &*begin_index.to_string()); };
|
if let Some(begin_index) = begin_index { query_params.append_pair("beginIndex", &*begin_index.to_string()); };
|
||||||
let query_string = query_params.finish();
|
let query_string = query_params.finish();
|
||||||
let path_string = format!("/lol/match/v4/matchlists/by-account/{}", encrypted_account_id);
|
let path_string = format!("/lol/match/v4/matchlists/by-account/{}", encrypted_account_id);
|
||||||
self.base.get::<match_v4::Matchlist>("match-v4.getMatchlist", region, path_string, Some(query_string))
|
self.base.get::<match_v4::Matchlist>("match-v4.getMatchlist", region, path_string, Some(query_string))
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get match timeline by match ID.
|
/// Get match timeline by match ID.
|
||||||
/// ## Implementation Notes
|
/// ## Implementation Notes
|
||||||
/// Not all matches have timeline data.
|
/// Not all matches have timeline data.
|
||||||
///
|
///
|
||||||
/// <a href="https://developer.riotgames.com/api-methods/#match-v4/GET_getMatchTimeline">Official API Reference</a>
|
/// <a href="https://developer.riotgames.com/api-methods/#match-v4/GET_getMatchTimeline">Official API Reference</a>
|
||||||
/// # Parameters
|
/// # Parameters
|
||||||
/// * `region` - Region to query.
|
/// * `region` - Region to query.
|
||||||
/// * `matchId` - The match ID.
|
/// * `matchId` - The match ID.
|
||||||
pub fn get_match_timeline(&self, region: Region, match_id: i64)
|
pub fn get_match_timeline(&self, region: Region, match_id: i64)
|
||||||
-> impl Future<Output = Result<Option<match_v4::MatchTimeline>>> + 'a
|
-> impl Future<Output = Result<Option<match_v4::MatchTimeline>>> + 'a
|
||||||
{
|
{
|
||||||
let path_string = format!("/lol/match/v4/timelines/by-match/{}", match_id);
|
let path_string = format!("/lol/match/v4/timelines/by-match/{}", match_id);
|
||||||
self.base.get::<match_v4::MatchTimeline>("match-v4.getMatchTimeline", region, path_string, None)
|
self.base.get::<match_v4::MatchTimeline>("match-v4.getMatchTimeline", region, path_string, None)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -423,30 +423,30 @@ pub struct SpectatorV4<'a> {
|
||||||
base: &'a RiotApi,
|
base: &'a RiotApi,
|
||||||
}
|
}
|
||||||
impl<'a> SpectatorV4<'a> {
|
impl<'a> SpectatorV4<'a> {
|
||||||
/// Get current game information for the given summoner ID.
|
/// Get current game information for the given summoner ID.
|
||||||
///
|
///
|
||||||
/// <a href="https://developer.riotgames.com/api-methods/#spectator-v4/GET_getCurrentGameInfoBySummoner">Official API Reference</a>
|
/// <a href="https://developer.riotgames.com/api-methods/#spectator-v4/GET_getCurrentGameInfoBySummoner">Official API Reference</a>
|
||||||
/// # Parameters
|
/// # Parameters
|
||||||
/// * `region` - Region to query.
|
/// * `region` - Region to query.
|
||||||
/// * `encryptedSummonerId` - The ID of the summoner.
|
/// * `encryptedSummonerId` - The ID of the summoner.
|
||||||
pub fn get_current_game_info_by_summoner(&self, region: Region, encrypted_summoner_id: &str)
|
pub fn get_current_game_info_by_summoner(&self, region: Region, encrypted_summoner_id: &str)
|
||||||
-> impl Future<Output = Result<Option<spectator_v4::CurrentGameInfo>>> + 'a
|
-> impl Future<Output = Result<Option<spectator_v4::CurrentGameInfo>>> + 'a
|
||||||
{
|
{
|
||||||
let path_string = format!("/lol/spectator/v4/active-games/by-summoner/{}", encrypted_summoner_id);
|
let path_string = format!("/lol/spectator/v4/active-games/by-summoner/{}", encrypted_summoner_id);
|
||||||
self.base.get::<spectator_v4::CurrentGameInfo>("spectator-v4.getCurrentGameInfoBySummoner", region, path_string, None)
|
self.base.get::<spectator_v4::CurrentGameInfo>("spectator-v4.getCurrentGameInfoBySummoner", region, path_string, None)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get list of featured games.
|
/// Get list of featured games.
|
||||||
///
|
///
|
||||||
/// <a href="https://developer.riotgames.com/api-methods/#spectator-v4/GET_getFeaturedGames">Official API Reference</a>
|
/// <a href="https://developer.riotgames.com/api-methods/#spectator-v4/GET_getFeaturedGames">Official API Reference</a>
|
||||||
/// # Parameters
|
/// # Parameters
|
||||||
/// * `region` - Region to query.
|
/// * `region` - Region to query.
|
||||||
pub fn get_featured_games(&self, region: Region)
|
pub fn get_featured_games(&self, region: Region)
|
||||||
-> impl Future<Output = Result<Option<spectator_v4::FeaturedGames>>> + 'a
|
-> impl Future<Output = Result<Option<spectator_v4::FeaturedGames>>> + 'a
|
||||||
{
|
{
|
||||||
let path_string = "/lol/spectator/v4/featured-games".to_owned();
|
let path_string = "/lol/spectator/v4/featured-games".to_owned();
|
||||||
self.base.get::<spectator_v4::FeaturedGames>("spectator-v4.getFeaturedGames", region, path_string, None)
|
self.base.get::<spectator_v4::FeaturedGames>("spectator-v4.getFeaturedGames", region, path_string, None)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -457,57 +457,57 @@ pub struct SummonerV4<'a> {
|
||||||
base: &'a RiotApi,
|
base: &'a RiotApi,
|
||||||
}
|
}
|
||||||
impl<'a> SummonerV4<'a> {
|
impl<'a> SummonerV4<'a> {
|
||||||
/// Get a summoner by account ID.
|
/// Get a summoner by account ID.
|
||||||
///
|
///
|
||||||
/// <a href="https://developer.riotgames.com/api-methods/#summoner-v4/GET_getByAccountId">Official API Reference</a>
|
/// <a href="https://developer.riotgames.com/api-methods/#summoner-v4/GET_getByAccountId">Official API Reference</a>
|
||||||
/// # Parameters
|
/// # Parameters
|
||||||
/// * `region` - Region to query.
|
/// * `region` - Region to query.
|
||||||
/// * `encryptedAccountId`
|
/// * `encryptedAccountId`
|
||||||
pub fn get_by_account_id(&self, region: Region, encrypted_account_id: &str)
|
pub fn get_by_account_id(&self, region: Region, encrypted_account_id: &str)
|
||||||
-> impl Future<Output = Result<Option<summoner_v4::Summoner>>> + 'a
|
-> impl Future<Output = Result<Option<summoner_v4::Summoner>>> + 'a
|
||||||
{
|
{
|
||||||
let path_string = format!("/lol/summoner/v4/summoners/by-account/{}", encrypted_account_id);
|
let path_string = format!("/lol/summoner/v4/summoners/by-account/{}", encrypted_account_id);
|
||||||
self.base.get::<summoner_v4::Summoner>("summoner-v4.getByAccountId", region, path_string, None)
|
self.base.get::<summoner_v4::Summoner>("summoner-v4.getByAccountId", region, path_string, None)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get a summoner by summoner name.
|
/// Get a summoner by summoner name.
|
||||||
///
|
///
|
||||||
/// <a href="https://developer.riotgames.com/api-methods/#summoner-v4/GET_getBySummonerName">Official API Reference</a>
|
/// <a href="https://developer.riotgames.com/api-methods/#summoner-v4/GET_getBySummonerName">Official API Reference</a>
|
||||||
/// # Parameters
|
/// # Parameters
|
||||||
/// * `region` - Region to query.
|
/// * `region` - Region to query.
|
||||||
/// * `summonerName` - Summoner Name
|
/// * `summonerName` - Summoner Name
|
||||||
pub fn get_by_summoner_name(&self, region: Region, summoner_name: &str)
|
pub fn get_by_summoner_name(&self, region: Region, summoner_name: &str)
|
||||||
-> impl Future<Output = Result<Option<summoner_v4::Summoner>>> + 'a
|
-> impl Future<Output = Result<Option<summoner_v4::Summoner>>> + 'a
|
||||||
{
|
{
|
||||||
let path_string = format!("/lol/summoner/v4/summoners/by-name/{}", summoner_name);
|
let path_string = format!("/lol/summoner/v4/summoners/by-name/{}", summoner_name);
|
||||||
self.base.get::<summoner_v4::Summoner>("summoner-v4.getBySummonerName", region, path_string, None)
|
self.base.get::<summoner_v4::Summoner>("summoner-v4.getBySummonerName", region, path_string, None)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get a summoner by PUUID.
|
/// Get a summoner by PUUID.
|
||||||
///
|
///
|
||||||
/// <a href="https://developer.riotgames.com/api-methods/#summoner-v4/GET_getByPUUID">Official API Reference</a>
|
/// <a href="https://developer.riotgames.com/api-methods/#summoner-v4/GET_getByPUUID">Official API Reference</a>
|
||||||
/// # Parameters
|
/// # Parameters
|
||||||
/// * `region` - Region to query.
|
/// * `region` - Region to query.
|
||||||
/// * `encryptedPUUID` - Summoner ID
|
/// * `encryptedPUUID` - Summoner ID
|
||||||
pub fn get_by_puuid(&self, region: Region, encrypted_puuid: &str)
|
pub fn get_by_puuid(&self, region: Region, encrypted_puuid: &str)
|
||||||
-> impl Future<Output = Result<Option<summoner_v4::Summoner>>> + 'a
|
-> impl Future<Output = Result<Option<summoner_v4::Summoner>>> + 'a
|
||||||
{
|
{
|
||||||
let path_string = format!("/lol/summoner/v4/summoners/by-puuid/{}", encrypted_puuid);
|
let path_string = format!("/lol/summoner/v4/summoners/by-puuid/{}", encrypted_puuid);
|
||||||
self.base.get::<summoner_v4::Summoner>("summoner-v4.getByPUUID", region, path_string, None)
|
self.base.get::<summoner_v4::Summoner>("summoner-v4.getByPUUID", region, path_string, None)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get a summoner by summoner ID.
|
/// Get a summoner by summoner ID.
|
||||||
///
|
///
|
||||||
/// <a href="https://developer.riotgames.com/api-methods/#summoner-v4/GET_getBySummonerId">Official API Reference</a>
|
/// <a href="https://developer.riotgames.com/api-methods/#summoner-v4/GET_getBySummonerId">Official API Reference</a>
|
||||||
/// # Parameters
|
/// # Parameters
|
||||||
/// * `region` - Region to query.
|
/// * `region` - Region to query.
|
||||||
/// * `encryptedSummonerId` - Summoner ID
|
/// * `encryptedSummonerId` - Summoner ID
|
||||||
pub fn get_by_summoner_id(&self, region: Region, encrypted_summoner_id: &str)
|
pub fn get_by_summoner_id(&self, region: Region, encrypted_summoner_id: &str)
|
||||||
-> impl Future<Output = Result<Option<summoner_v4::Summoner>>> + 'a
|
-> impl Future<Output = Result<Option<summoner_v4::Summoner>>> + 'a
|
||||||
{
|
{
|
||||||
let path_string = format!("/lol/summoner/v4/summoners/{}", encrypted_summoner_id);
|
let path_string = format!("/lol/summoner/v4/summoners/{}", encrypted_summoner_id);
|
||||||
self.base.get::<summoner_v4::Summoner>("summoner-v4.getBySummonerId", region, path_string, None)
|
self.base.get::<summoner_v4::Summoner>("summoner-v4.getBySummonerId", region, path_string, None)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -518,18 +518,18 @@ pub struct ThirdPartyCodeV4<'a> {
|
||||||
base: &'a RiotApi,
|
base: &'a RiotApi,
|
||||||
}
|
}
|
||||||
impl<'a> ThirdPartyCodeV4<'a> {
|
impl<'a> ThirdPartyCodeV4<'a> {
|
||||||
/// Get third party code for a given summoner ID.
|
/// Get third party code for a given summoner ID.
|
||||||
///
|
///
|
||||||
/// <a href="https://developer.riotgames.com/api-methods/#third-party-code-v4/GET_getThirdPartyCodeBySummonerId">Official API Reference</a>
|
/// <a href="https://developer.riotgames.com/api-methods/#third-party-code-v4/GET_getThirdPartyCodeBySummonerId">Official API Reference</a>
|
||||||
/// # Parameters
|
/// # Parameters
|
||||||
/// * `region` - Region to query.
|
/// * `region` - Region to query.
|
||||||
/// * `encryptedSummonerId`
|
/// * `encryptedSummonerId`
|
||||||
pub fn get_third_party_code_by_summoner_id(&self, region: Region, encrypted_summoner_id: &str)
|
pub fn get_third_party_code_by_summoner_id(&self, region: Region, encrypted_summoner_id: &str)
|
||||||
-> impl Future<Output = Result<Option<String>>> + 'a
|
-> impl Future<Output = Result<Option<String>>> + 'a
|
||||||
{
|
{
|
||||||
let path_string = format!("/lol/platform/v4/third-party-code/by-summoner/{}", encrypted_summoner_id);
|
let path_string = format!("/lol/platform/v4/third-party-code/by-summoner/{}", encrypted_summoner_id);
|
||||||
self.base.get::<String>("third-party-code-v4.getThirdPartyCodeBySummonerId", region, path_string, None)
|
self.base.get::<String>("third-party-code-v4.getThirdPartyCodeBySummonerId", region, path_string, None)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -540,18 +540,18 @@ pub struct TournamentStubV4<'a> {
|
||||||
base: &'a RiotApi,
|
base: &'a RiotApi,
|
||||||
}
|
}
|
||||||
impl<'a> TournamentStubV4<'a> {
|
impl<'a> TournamentStubV4<'a> {
|
||||||
/// Gets a mock list of lobby events by tournament code.
|
/// Gets a mock list of lobby events by tournament code.
|
||||||
///
|
///
|
||||||
/// <a href="https://developer.riotgames.com/api-methods/#tournament-stub-v4/GET_getLobbyEventsByCode">Official API Reference</a>
|
/// <a href="https://developer.riotgames.com/api-methods/#tournament-stub-v4/GET_getLobbyEventsByCode">Official API Reference</a>
|
||||||
/// # Parameters
|
/// # Parameters
|
||||||
/// * `region` - Region to query.
|
/// * `region` - Region to query.
|
||||||
/// * `tournamentCode` - The short code to look up lobby events for
|
/// * `tournamentCode` - The short code to look up lobby events for
|
||||||
pub fn get_lobby_events_by_code(&self, region: Region, tournament_code: &str)
|
pub fn get_lobby_events_by_code(&self, region: Region, tournament_code: &str)
|
||||||
-> impl Future<Output = Result<Option<tournament_stub_v4::LobbyEventWrapper>>> + 'a
|
-> impl Future<Output = Result<Option<tournament_stub_v4::LobbyEventWrapper>>> + 'a
|
||||||
{
|
{
|
||||||
let path_string = format!("/lol/tournament-stub/v4/lobby-events/by-code/{}", tournament_code);
|
let path_string = format!("/lol/tournament-stub/v4/lobby-events/by-code/{}", tournament_code);
|
||||||
self.base.get::<tournament_stub_v4::LobbyEventWrapper>("tournament-stub-v4.getLobbyEventsByCode", region, path_string, None)
|
self.base.get::<tournament_stub_v4::LobbyEventWrapper>("tournament-stub-v4.getLobbyEventsByCode", region, path_string, None)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -562,30 +562,30 @@ pub struct TournamentV4<'a> {
|
||||||
base: &'a RiotApi,
|
base: &'a RiotApi,
|
||||||
}
|
}
|
||||||
impl<'a> TournamentV4<'a> {
|
impl<'a> TournamentV4<'a> {
|
||||||
/// Returns the tournament code DTO associated with a tournament code string.
|
/// Returns the tournament code DTO associated with a tournament code string.
|
||||||
///
|
///
|
||||||
/// <a href="https://developer.riotgames.com/api-methods/#tournament-v4/GET_getTournamentCode">Official API Reference</a>
|
/// <a href="https://developer.riotgames.com/api-methods/#tournament-v4/GET_getTournamentCode">Official API Reference</a>
|
||||||
/// # Parameters
|
/// # Parameters
|
||||||
/// * `region` - Region to query.
|
/// * `region` - Region to query.
|
||||||
/// * `tournamentCode` - The tournament code string.
|
/// * `tournamentCode` - The tournament code string.
|
||||||
pub fn get_tournament_code(&self, region: Region, tournament_code: &str)
|
pub fn get_tournament_code(&self, region: Region, tournament_code: &str)
|
||||||
-> impl Future<Output = Result<Option<tournament_v4::TournamentCode>>> + 'a
|
-> impl Future<Output = Result<Option<tournament_v4::TournamentCode>>> + 'a
|
||||||
{
|
{
|
||||||
let path_string = format!("/lol/tournament/v4/codes/{}", tournament_code);
|
let path_string = format!("/lol/tournament/v4/codes/{}", tournament_code);
|
||||||
self.base.get::<tournament_v4::TournamentCode>("tournament-v4.getTournamentCode", region, path_string, None)
|
self.base.get::<tournament_v4::TournamentCode>("tournament-v4.getTournamentCode", region, path_string, None)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Gets a list of lobby events by tournament code.
|
/// Gets a list of lobby events by tournament code.
|
||||||
///
|
///
|
||||||
/// <a href="https://developer.riotgames.com/api-methods/#tournament-v4/GET_getLobbyEventsByCode">Official API Reference</a>
|
/// <a href="https://developer.riotgames.com/api-methods/#tournament-v4/GET_getLobbyEventsByCode">Official API Reference</a>
|
||||||
/// # Parameters
|
/// # Parameters
|
||||||
/// * `region` - Region to query.
|
/// * `region` - Region to query.
|
||||||
/// * `tournamentCode` - The short code to look up lobby events for
|
/// * `tournamentCode` - The short code to look up lobby events for
|
||||||
pub fn get_lobby_events_by_code(&self, region: Region, tournament_code: &str)
|
pub fn get_lobby_events_by_code(&self, region: Region, tournament_code: &str)
|
||||||
-> impl Future<Output = Result<Option<tournament_v4::LobbyEventWrapper>>> + 'a
|
-> impl Future<Output = Result<Option<tournament_v4::LobbyEventWrapper>>> + 'a
|
||||||
{
|
{
|
||||||
let path_string = format!("/lol/tournament/v4/lobby-events/by-code/{}", tournament_code);
|
let path_string = format!("/lol/tournament/v4/lobby-events/by-code/{}", tournament_code);
|
||||||
self.base.get::<tournament_v4::LobbyEventWrapper>("tournament-v4.getLobbyEventsByCode", region, path_string, None)
|
self.base.get::<tournament_v4::LobbyEventWrapper>("tournament-v4.getLobbyEventsByCode", region, path_string, None)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
///////////////////////////////////////////////
|
///////////////////////////////////////////////
|
||||||
|
|
||||||
// http://www.mingweisamuel.com/riotapi-schema/tool/
|
// http://www.mingweisamuel.com/riotapi-schema/tool/
|
||||||
// Version b2fb0513c3cdb6baa0ba78bd2a50b43670161980
|
// Version 85da12632b552f2033d1708c17b04306e90b935e
|
||||||
|
|
||||||
// champion-mastery-v4
|
// champion-mastery-v4
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
|
|
|
@ -112,43 +112,43 @@ impl<'a> {{= endpoint }}<'a> {
|
||||||
for (var descLine of descArr)
|
for (var descLine of descArr)
|
||||||
{
|
{
|
||||||
}}
|
}}
|
||||||
///{{= descLine ? ' ' + descLine : '' }}
|
///{{= descLine ? ' ' + descLine : '' }}
|
||||||
{{
|
{{
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
///
|
///
|
||||||
/// <a href="{{= get.externalDocs.url }}">{{= get.externalDocs.description }}</a>
|
/// <a href="{{= get.externalDocs.url }}">{{= get.externalDocs.description }}</a>
|
||||||
/// # Parameters
|
/// # Parameters
|
||||||
/// * `region` - Region to query.
|
/// * `region` - Region to query.
|
||||||
{{
|
{{
|
||||||
if (allParams)
|
if (allParams)
|
||||||
{
|
{
|
||||||
for (let param of allParams)
|
for (let param of allParams)
|
||||||
{
|
{
|
||||||
}}
|
}}
|
||||||
/// * `{{= param.name }}`{{= param.required ? '' : ' (optional)' }}{{= param.description ? ' - ' + param.description : ''}}
|
/// * `{{= param.name }}`{{= param.required ? '' : ' (optional)' }}{{= param.description ? ' - ' + param.description : ''}}
|
||||||
{{
|
{{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
pub fn {{= method }}(&self, region: Region{{= argBuilder.join('') }})
|
pub fn {{= method }}(&self, region: Region{{= argBuilder.join('') }})
|
||||||
-> impl Future<Output = Result<Option<{{= returnType }}>>> + 'a
|
-> impl Future<Output = Result<Option<{{= returnType }}>>> + 'a
|
||||||
{
|
{
|
||||||
{{? queryParams.length }}
|
{{? queryParams.length }}
|
||||||
let mut query_params = Serializer::new(String::new());
|
let mut query_params = Serializer::new(String::new());
|
||||||
{{
|
{{
|
||||||
for (let queryParam of queryParams)
|
for (let queryParam of queryParams)
|
||||||
{
|
{
|
||||||
}}
|
}}
|
||||||
{{= dotUtils.formatAddQueryParam(queryParam) }};
|
{{= dotUtils.formatAddQueryParam(queryParam) }};
|
||||||
{{
|
{{
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
let query_string = query_params.finish();
|
let query_string = query_params.finish();
|
||||||
{{?}}
|
{{?}}
|
||||||
let path_string = {{= routeArgument }};
|
let path_string = {{= routeArgument }};
|
||||||
self.base.get::<{{= returnType }}>("{{= operationId }}", region, path_string, {{= queryParams.length ? 'Some(query_string)' : 'None' }})
|
self.base.get::<{{= returnType }}>("{{= operationId }}", region, path_string, {{= queryParams.length ? 'Some(query_string)' : 'None' }})
|
||||||
}
|
}
|
||||||
|
|
||||||
{{
|
{{
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue