forked from mirror/Riven
1
0
Fork 0

Updating from schemas

users/mingwei/surf
Mingwei Samuel 2019-12-02 09:22:13 -08:00
parent a50fb77fde
commit 2233be4dcb
5 changed files with 25 additions and 11 deletions

View File

@ -40,6 +40,8 @@ pub enum Champion {
#[strum(to_string="Anivia", serialize="Anivia")] Anivia = 34,
/// Annie (`Annie`, 1).
#[strum(to_string="Annie", serialize="Annie")] Annie = 1,
/// Aphelios (`Aphelios`, 523).
#[strum(to_string="Aphelios", serialize="Aphelios")] Aphelios = 523,
/// Ashe (`Ashe`, 22).
#[strum(to_string="Ashe", serialize="Ashe")] Ashe = 22,
/// Aurelion Sol (`AurelionSol`, 136).
@ -353,6 +355,7 @@ impl Champion {
Self::Amumu => "Amumu",
Self::Anivia => "Anivia",
Self::Annie => "Annie",
Self::Aphelios => "Aphelios",
Self::Ashe => "Ashe",
Self::AurelionSol => "AurelionSol",
Self::Azir => "Azir",

View File

@ -291,4 +291,13 @@ pub enum Queue {
/// <br>Deprecated in patch 9.2
#[deprecated(note="Deprecated in patch 9.2")]
NEXUS_BLITZ_NEXUS_BLITZ_GAMES = 1200,
/// Tutorial 1 games on Summoner's Rift.
SUMMONERS_RIFT_TUTORIAL1 = 2000,
/// Tutorial 2 games on Summoner's Rift.
SUMMONERS_RIFT_TUTORIAL2 = 2010,
/// Tutorial 3 games on Summoner's Rift.
SUMMONERS_RIFT_TUTORIAL3 = 2020,
}

View File

@ -23,7 +23,7 @@ pub enum Season {
SEASON_2014 = 3,
PRESEASON_2015 = 4,
SEASON_2015 = 5,
PRESEASON_2106 = 6,
PRESEASON_2016 = 6,
SEASON_2016 = 7,
PRESEASON_2017 = 8,
SEASON_2017 = 9,

View File

@ -7,7 +7,7 @@
///////////////////////////////////////////////
// http://www.mingweisamuel.com/riotapi-schema/tool/
// Version 3bd5ca30e5a7aa15963ca4366e3b6be89defe567
// Version 8de91254196abf157d29b578bfe2d3d49b29ba8a
//! Automatically generated endpoint handles.
@ -398,12 +398,11 @@ impl<'a> MatchV4<'a> {
/// * `encryptedAccountId` - The account ID.
/// * `champion` (optional) - Set of champion 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.
/// * `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.
/// * `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.
pub fn get_matchlist(&self, region: Region, encrypted_account_id: &str, begin_time: Option<i64>, begin_index: Option<i32>, champion: Option<std::vec::Vec<crate::consts::Champion>>, end_time: Option<i64>, end_index: Option<i32>, queue: Option<std::vec::Vec<crate::consts::Queue>>, season: Option<std::vec::Vec<crate::consts::Season>>)
pub fn get_matchlist(&self, region: Region, encrypted_account_id: &str, begin_time: Option<i64>, begin_index: Option<i32>, champion: Option<std::vec::Vec<crate::consts::Champion>>, end_time: Option<i64>, end_index: Option<i32>, queue: Option<std::vec::Vec<crate::consts::Queue>>)
-> impl Future<Output = Result<Option<match_v4::Matchlist>>> + 'a
{
let mut query_params = Serializer::new(String::new());
@ -413,7 +412,6 @@ impl<'a> MatchV4<'a> {
if let Some(end_time) = end_time { query_params.append_pair("endTime", &*end_time.to_string()); };
if let Some(end_index) = end_index { query_params.append_pair("endIndex", &*end_index.to_string()); };
if let Some(queue) = queue { query_params.extend_pairs(queue.iter().map(|w| ("queue", Into::<u16>::into(*w).to_string()))); };
if let Some(season) = season { query_params.extend_pairs(season.iter().map(|w| ("season", Into::<u8>::into(*w).to_string()))); };
let query_string = query_params.finish();
let path_string = format!("/lol/match/v4/matchlists/by-account/{}", encrypted_account_id);
self.base.get_optional::<match_v4::Matchlist>("match-v4.getMatchlist", region.into(), path_string, Some(query_string))
@ -632,12 +630,16 @@ impl<'a> TftMatchV1<'a> {
/// <a href="https://developer.riotgames.com/api-methods/#tft-match-v1/GET_getMatchIdsByPUUID">Official API Reference</a>
/// # Parameters
/// * `region` - Region to query.
/// * `encryptedPUUID` (optional)
pub fn get_match_ids_by_puuid(&self, region: Region, encrypted_puuid: &str)
/// * `puuid` (optional)
/// * `count` (optional)
pub fn get_match_ids_by_puuid(&self, region: Region, puuid: &str, count: Option<i32>)
-> impl Future<Output = Result<Vec<String>>> + 'a
{
let path_string = format!("/tft/match/v1/matches/by-puuid/{}/ids", encrypted_puuid);
self.base.get::<Vec<String>>("tft-match-v1.getMatchIdsByPUUID", region.into(), path_string, None)
let mut query_params = Serializer::new(String::new());
if let Some(count) = count { query_params.append_pair("count", &*count.to_string()); };
let query_string = query_params.finish();
let path_string = format!("/tft/match/v1/matches/by-puuid/{}/ids", puuid);
self.base.get::<Vec<String>>("tft-match-v1.getMatchIdsByPUUID", region.into(), path_string, Some(query_string))
}
/// Get a match by match id.

View File

@ -7,7 +7,7 @@
///////////////////////////////////////////////
// http://www.mingweisamuel.com/riotapi-schema/tool/
// Version 3bd5ca30e5a7aa15963ca4366e3b6be89defe567
// Version 8de91254196abf157d29b578bfe2d3d49b29ba8a
//! Automatically generated data transfer structs.
@ -959,7 +959,7 @@ pub mod spectator_v4 {
pub game_length: i64,
/// The queue type (queue types are documented on the Game Constants page)
#[serde(rename = "gameQueueConfigId")]
pub game_queue_config_id: crate::consts::Queue,
pub game_queue_config_id: Option<crate::consts::Queue>,
}
/// BannedChampion data object. This struct is automatically generated.
#[derive(Debug)]