forked from mirror/Riven
1
0
Fork 0

Running srcgen for new clash endpoint

users/mingwei/surf
Mingwei Samuel 2020-03-31 12:07:13 -07:00
parent 1745ac0541
commit 7f1b9534a9
3 changed files with 960 additions and 781 deletions

View File

@ -24,14 +24,14 @@ pub enum Queue {
/// 5v5 Blind Pick games games on Summoner's Rift.
/// <br>Deprecated in patch 7.19 in favor of queueId 430
#[deprecated(note="Deprecated in patch 7.19 in favor of queueId 430")]
SUMMONERS_RIFT_5V5_BLIND_PICK_GAMES_DEPRECATED = 2,
SUMMONERS_RIFT_5V5_BLIND_PICK_GAMES_DEPRECATED_2 = 2,
/// 5v5 Blind Pick games games on Summoner's Rift.
SUMMONERS_RIFT_5V5_BLIND_PICK_GAMES = 430,
/// 5v5 Ranked Solo games games on Summoner's Rift.
/// <br>Deprecated in favor of queueId 420
#[deprecated(note="Deprecated in favor of queueId 420")]
SUMMONERS_RIFT_5V5_RANKED_SOLO_GAMES_DEPRECATED = 4,
SUMMONERS_RIFT_5V5_RANKED_SOLO_GAMES_DEPRECATED_4 = 4,
/// 5v5 Ranked Solo games games on Summoner's Rift.
SUMMONERS_RIFT_5V5_RANKED_SOLO_GAMES = 420,
@ -53,14 +53,16 @@ pub enum Queue {
/// 3v3 Ranked Flex games games on Twisted Treeline.
/// <br>Deprecated in patch 7.19 in favor of queueId 470
#[deprecated(note="Deprecated in patch 7.19 in favor of queueId 470")]
TWISTED_TREELINE_3V3_RANKED_FLEX_GAMES_DEPRECATED = 9,
TWISTED_TREELINE_3V3_RANKED_FLEX_GAMES_DEPRECATED_9 = 9,
/// 3v3 Ranked Flex games games on Twisted Treeline.
TWISTED_TREELINE_3V3_RANKED_FLEX_GAMES = 470,
/// <br>Deprecated in patch 9.23
#[deprecated(note="Deprecated in patch 9.23")]
TWISTED_TREELINE_3V3_RANKED_FLEX_GAMES_DEPRECATED_470 = 470,
/// 5v5 Draft Pick games games on Summoner's Rift.
/// <br>Deprecated in favor of queueId 400
#[deprecated(note="Deprecated in favor of queueId 400")]
SUMMONERS_RIFT_5V5_DRAFT_PICK_GAMES_DEPRECATED = 14,
SUMMONERS_RIFT_5V5_DRAFT_PICK_GAMES_DEPRECATED_14 = 14,
/// 5v5 Draft Pick games games on Summoner's Rift.
SUMMONERS_RIFT_5V5_DRAFT_PICK_GAMES = 400,
@ -82,21 +84,21 @@ pub enum Queue {
/// Co-op vs AI Intro Bot games games on Summoner's Rift.
/// <br>Deprecated in patch 7.19 in favor of queueId 830
#[deprecated(note="Deprecated in patch 7.19 in favor of queueId 830")]
SUMMONERS_RIFT_CO_OP_VS_AI_INTRO_BOT_GAMES_DEPRECATED = 31,
SUMMONERS_RIFT_CO_OP_VS_AI_INTRO_BOT_GAMES_DEPRECATED_31 = 31,
/// Co-op vs. AI Intro Bot games games on Summoner's Rift.
SUMMONERS_RIFT_CO_OP_VS_AI_INTRO_BOT_GAMES = 830,
/// Co-op vs AI Beginner Bot games games on Summoner's Rift.
/// <br>Deprecated in patch 7.19 in favor of queueId 840
#[deprecated(note="Deprecated in patch 7.19 in favor of queueId 840")]
SUMMONERS_RIFT_CO_OP_VS_AI_BEGINNER_BOT_GAMES_DEPRECATED = 32,
SUMMONERS_RIFT_CO_OP_VS_AI_BEGINNER_BOT_GAMES_DEPRECATED_32 = 32,
/// Co-op vs. AI Beginner Bot games games on Summoner's Rift.
SUMMONERS_RIFT_CO_OP_VS_AI_BEGINNER_BOT_GAMES = 840,
/// Co-op vs AI Intermediate Bot games games on Summoner's Rift.
/// <br>Deprecated in patch 7.19 in favor of queueId 850
#[deprecated(note="Deprecated in patch 7.19 in favor of queueId 850")]
SUMMONERS_RIFT_CO_OP_VS_AI_INTERMEDIATE_BOT_GAMES_DEPRECATED = 33,
SUMMONERS_RIFT_CO_OP_VS_AI_INTERMEDIATE_BOT_GAMES_DEPRECATED_33 = 33,
/// Co-op vs. AI Intermediate Bot games games on Summoner's Rift.
SUMMONERS_RIFT_CO_OP_VS_AI_INTERMEDIATE_BOT_GAMES = 850,
@ -123,7 +125,7 @@ pub enum Queue {
/// 5v5 ARAM games games on Howling Abyss.
/// <br>Deprecated in patch 7.19 in favor of queueId 450
#[deprecated(note="Deprecated in patch 7.19 in favor of queueId 450")]
HOWLING_ABYSS_5V5_ARAM_GAMES_DEPRECATED = 65,
HOWLING_ABYSS_5V5_ARAM_GAMES_DEPRECATED_65 = 65,
/// 5v5 ARAM games games on Howling Abyss.
HOWLING_ABYSS_5V5_ARAM_GAMES = 450,
@ -135,7 +137,7 @@ pub enum Queue {
/// One for All games games on Summoner's Rift.
/// <br>Deprecated in patch 8.6 in favor of queueId 1020
#[deprecated(note="Deprecated in patch 8.6 in favor of queueId 1020")]
SUMMONERS_RIFT_ONE_FOR_ALL_GAMES_DEPRECATED = 70,
SUMMONERS_RIFT_ONE_FOR_ALL_GAMES_DEPRECATED_70 = 70,
/// One for All games games on Summoner's Rift.
SUMMONERS_RIFT_ONE_FOR_ALL_GAMES = 1020,
@ -175,7 +177,7 @@ pub enum Queue {
/// Ascension games games on Crystal Scar.
/// <br>Deprecated in patch 7.19 in favor of queueId 910
#[deprecated(note="Deprecated in patch 7.19 in favor of queueId 910")]
CRYSTAL_SCAR_ASCENSION_GAMES_DEPRECATED = 96,
CRYSTAL_SCAR_ASCENSION_GAMES_DEPRECATED_96 = 96,
/// Ascension games games on Crystal Scar.
CRYSTAL_SCAR_ASCENSION_GAMES = 910,
@ -188,7 +190,7 @@ pub enum Queue {
/// Legend of the Poro King games games on Howling Abyss.
/// <br>Deprecated in patch 7.19 in favor of queueId 920
#[deprecated(note="Deprecated in patch 7.19 in favor of queueId 920")]
HOWLING_ABYSS_LEGEND_OF_THE_PORO_KING_GAMES_DEPRECATED = 300,
HOWLING_ABYSS_LEGEND_OF_THE_PORO_KING_GAMES_DEPRECATED_300 = 300,
/// Legend of the Poro King games games on Howling Abyss.
HOWLING_ABYSS_LEGEND_OF_THE_PORO_KING_GAMES = 920,
@ -201,7 +203,7 @@ pub enum Queue {
/// Nexus Siege games games on Summoner's Rift.
/// <br>Deprecated in patch 7.19 in favor of queueId 940
#[deprecated(note="Deprecated in patch 7.19 in favor of queueId 940")]
SUMMONERS_RIFT_NEXUS_SIEGE_GAMES_DEPRECATED = 315,
SUMMONERS_RIFT_NEXUS_SIEGE_GAMES_DEPRECATED_315 = 315,
/// Nexus Siege games games on Summoner's Rift.
SUMMONERS_RIFT_NEXUS_SIEGE_GAMES = 940,
@ -225,6 +227,8 @@ pub enum Queue {
SUMMONERS_RIFT_5V5_RANKED_FLEX_GAMES = 440,
/// 3v3 Blind Pick games games on Twisted Treeline.
/// <br>Deprecated in patch 9.23
#[deprecated(note="Deprecated in patch 9.23")]
TWISTED_TREELINE_3V3_BLIND_PICK_GAMES = 460,
/// Blood Hunt Assassin games games on Summoner's Rift.
@ -237,9 +241,13 @@ pub enum Queue {
SUMMONERS_RIFT_CLASH_GAMES = 700,
/// Co-op vs. AI Intermediate Bot games games on Twisted Treeline.
/// <br>Deprecated in patch 9.23
#[deprecated(note="Deprecated in patch 9.23")]
TWISTED_TREELINE_CO_OP_VS_AI_INTERMEDIATE_BOT_GAMES = 800,
/// Co-op vs. AI Intro Bot games games on Twisted Treeline.
/// <br>Deprecated in patch 9.23
#[deprecated(note="Deprecated in patch 9.23")]
TWISTED_TREELINE_CO_OP_VS_AI_INTRO_BOT_GAMES = 810,
/// Co-op vs. AI Beginner Bot games games on Twisted Treeline.
@ -287,6 +295,9 @@ pub enum Queue {
/// Ranked Teamfight Tactics games games on Convergence.
CONVERGENCE_RANKED_TEAMFIGHT_TACTICS_GAMES = 1100,
/// Teamfight Tactics Tutorial games games on Convergence.
CONVERGENCE_TEAMFIGHT_TACTICS_TUTORIAL_GAMES = 1110,
/// Nexus Blitz games games on Nexus Blitz.
/// <br>Deprecated in patch 9.2
#[deprecated(note="Deprecated in patch 9.2")]

View File

@ -7,7 +7,7 @@
///////////////////////////////////////////////
// http://www.mingweisamuel.com/riotapi-schema/tool/
// Version e22fa894666bc6e13ce9daac7c0c9272c1ff3aaa
// Version 71bb788ab92c0b03d5dd284402d9514b625fe2a4
//! Automatically generated endpoint handles.
@ -41,6 +41,15 @@ impl RiotApi {
pub fn champion_v3(&self) -> ChampionV3 {
ChampionV3 { base: self }
}
/// Returns a handle for accessing [ClashV1](crate::endpoints::ClashV1) endpoints.
/// # Riot Developer API Reference
/// <a href="https://developer.riotgames.com/apis#clash-v1" target="_blank">`clash-v1`</a>
///
/// Note: this method is automatically generated.
#[inline]
pub fn clash_v1(&self) -> ClashV1 {
ClashV1 { base: self }
}
/// Returns a handle for accessing [LeagueExpV4](crate::endpoints::LeagueExpV4) endpoints.
/// # Riot Developer API Reference
/// <a href="https://developer.riotgames.com/apis#league-exp-v4" target="_blank">`league-exp-v4`</a>
@ -242,6 +251,91 @@ impl<'a> ChampionV3<'a> {
}
/// ClashV1 endpoints handle, accessed by calling [`clash_v1()`](crate::RiotApi::clash_v1) on a [`RiotApi`](crate::RiotApi) instance.
/// # Riot Developer API Reference
/// <a href="https://developer.riotgames.com/apis#clash-v1" target="_blank">`clash-v1`</a>
///
/// Note: this struct is automatically generated.
pub struct ClashV1<'a> {
base: &'a RiotApi,
}
impl<'a> ClashV1<'a> {
/// Get players by summoner ID.
/// # Parameters
/// * `region` - Region to query.
/// * `summonerId`
/// # Riot Developer API Reference
/// <a href="https://developer.riotgames.com/api-methods/#clash-v1/GET_getPlayersBySummoner" target="_blank">`clash-v1.getPlayersBySummoner`</a>
///
/// Note: this method is automatically generated.
pub fn get_players_by_summoner(&self, region: Region, summoner_id: &str)
-> impl Future<Output = Result<Vec<clash_v1::Player>>> + 'a
{
let path_string = format!("/lol/clash/v1/players/by-summoner/{}", summoner_id);
self.base.get::<Vec<clash_v1::Player>>("clash-v1.getPlayersBySummoner", region.into(), path_string, None)
}
/// Get team by ID.
/// # Parameters
/// * `region` - Region to query.
/// * `teamId`
/// # Riot Developer API Reference
/// <a href="https://developer.riotgames.com/api-methods/#clash-v1/GET_getTeamById" target="_blank">`clash-v1.getTeamById`</a>
///
/// Note: this method is automatically generated.
pub fn get_team_by_id(&self, region: Region, team_id: &str)
-> impl Future<Output = Result<Option<clash_v1::Team>>> + 'a
{
let path_string = format!("/lol/clash/v1/teams/{}", team_id);
self.base.get_optional::<clash_v1::Team>("clash-v1.getTeamById", region.into(), path_string, None)
}
/// Get all active or upcoming tournaments.
/// # Parameters
/// * `region` - Region to query.
/// # Riot Developer API Reference
/// <a href="https://developer.riotgames.com/api-methods/#clash-v1/GET_getTournaments" target="_blank">`clash-v1.getTournaments`</a>
///
/// Note: this method is automatically generated.
pub fn get_tournaments(&self, region: Region)
-> impl Future<Output = Result<Vec<clash_v1::Tournament>>> + 'a
{
let path_string = "/lol/clash/v1/tournaments".to_owned();
self.base.get::<Vec<clash_v1::Tournament>>("clash-v1.getTournaments", region.into(), path_string, None)
}
/// Get tournament by team ID.
/// # Parameters
/// * `region` - Region to query.
/// * `teamId`
/// # Riot Developer API Reference
/// <a href="https://developer.riotgames.com/api-methods/#clash-v1/GET_getTournamentByTeam" target="_blank">`clash-v1.getTournamentByTeam`</a>
///
/// Note: this method is automatically generated.
pub fn get_tournament_by_team(&self, region: Region, team_id: &str)
-> impl Future<Output = Result<Option<clash_v1::Tournament>>> + 'a
{
let path_string = format!("/lol/clash/v1/tournaments/by-team/{}", team_id);
self.base.get_optional::<clash_v1::Tournament>("clash-v1.getTournamentByTeam", region.into(), path_string, None)
}
/// Get tournament by ID.
/// # Parameters
/// * `region` - Region to query.
/// * `tournamentId`
/// # Riot Developer API Reference
/// <a href="https://developer.riotgames.com/api-methods/#clash-v1/GET_getTournamentById" target="_blank">`clash-v1.getTournamentById`</a>
///
/// Note: this method is automatically generated.
pub fn get_tournament_by_id(&self, region: Region, tournament_id: i32)
-> impl Future<Output = Result<Option<clash_v1::Tournament>>> + 'a
{
let path_string = format!("/lol/clash/v1/tournaments/{}", tournament_id);
self.base.get_optional::<clash_v1::Tournament>("clash-v1.getTournamentById", region.into(), path_string, None)
}
}
/// LeagueExpV4 endpoints handle, accessed by calling [`league_exp_v4()`](crate::RiotApi::league_exp_v4) on a [`RiotApi`](crate::RiotApi) instance.
/// # Riot Developer API Reference
/// <a href="https://developer.riotgames.com/apis#league-exp-v4" target="_blank">`league-exp-v4`</a>
@ -770,7 +864,7 @@ impl<'a> TftMatchV1<'a> {
/// Get a list of match ids by PUUID.
/// # Parameters
/// * `region` - Region to query.
/// * `puuid` (optional)
/// * `puuid`
/// * `count` (optional)
/// # Riot Developer API Reference
/// <a href="https://developer.riotgames.com/api-methods/#tft-match-v1/GET_getMatchIdsByPUUID" target="_blank">`tft-match-v1.getMatchIdsByPUUID`</a>

File diff suppressed because it is too large Load Diff