Regen for new queue enums, bugged LeagueEntry values

pull/37/head
Mingwei Samuel 2021-11-19 18:53:32 -08:00
parent fd892b1451
commit 40edebf78b
5 changed files with 25 additions and 9 deletions

View File

@ -299,6 +299,12 @@ newtype_enum! {
/// `1090`.
/// Teamfight Tactics games on Convergence
CONVERGENCE_TEAMFIGHT_TACTICS = 1090,
/// `1091`.
/// Teamfight Tactics 1v0 games on Convergence
CONVERGENCE_TEAMFIGHT_TACTICS_1V0 = 1091,
/// `1092`.
/// Teamfight Tactics 2v0 games on Convergence
CONVERGENCE_TEAMFIGHT_TACTICS_2V0 = 1092,
/// `1100`.
/// Ranked Teamfight Tactics games on Convergence
CONVERGENCE_RANKED_TEAMFIGHT_TACTICS = 1100,
@ -306,8 +312,14 @@ newtype_enum! {
/// Teamfight Tactics Tutorial games on Convergence
CONVERGENCE_TEAMFIGHT_TACTICS_TUTORIAL = 1110,
/// `1111`.
/// Teamfight Tactics 1v0 testing games on Convergence
CONVERGENCE_TEAMFIGHT_TACTICS_1V0_TESTING = 1111,
/// Teamfight Tactics Simluation games on Convergence
CONVERGENCE_TEAMFIGHT_TACTICS_SIMLUATION = 1111,
/// `1130`.
/// Ranked Teamfight Tactics (Hyper Roll) games on Convergence
CONVERGENCE_RANKED_TEAMFIGHT_TACTICS_HYPER_ROLL_ = 1130,
/// `1150`.
/// Ranked Teamfight Tactics (Double Up Beta) games on Convergence
CONVERGENCE_RANKED_TEAMFIGHT_TACTICS_DOUBLE_UP_BETA_ = 1150,
/// `1200`.
/// Nexus Blitz games on Nexus Blitz
/// Deprecated in patch 9.2 in favor of queueId 1300

View File

@ -7,7 +7,7 @@
///////////////////////////////////////////////
// http://www.mingweisamuel.com/riotapi-schema/tool/
// Version f7d7b8c90243fcb043ffe81c5b08b0925be83bdf
// Version 5998519c2eb30a8c3f88edf1dcf88e2c6f091ba1
//! Automatically generated endpoint handles.
#![allow(clippy::let_and_return, clippy::too_many_arguments)]

View File

@ -7,7 +7,7 @@
///////////////////////////////////////////////
// http://www.mingweisamuel.com/riotapi-schema/tool/
// Version f7d7b8c90243fcb043ffe81c5b08b0925be83bdf
// Version 5998519c2eb30a8c3f88edf1dcf88e2c6f091ba1
//! Metadata about the Riot API and Riven.
//!

View File

@ -7,7 +7,7 @@
///////////////////////////////////////////////
// http://www.mingweisamuel.com/riotapi-schema/tool/
// Version f7d7b8c90243fcb043ffe81c5b08b0925be83bdf
// Version 5998519c2eb30a8c3f88edf1dcf88e2c6f091ba1
//! Data transfer structs.
//!
@ -312,7 +312,8 @@ pub mod league_v4 {
#[derive(serde::Serialize, serde::Deserialize)]
pub struct LeagueEntry {
#[serde(rename = "leagueId")]
pub league_id: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub league_id: Option<String>,
/// Player's encrypted summonerId.
#[serde(rename = "summonerId")]
pub summoner_id: String,
@ -321,10 +322,12 @@ pub mod league_v4 {
#[serde(rename = "queueType")]
pub queue_type: crate::consts::QueueType,
#[serde(rename = "tier")]
pub tier: crate::consts::Tier,
#[serde(skip_serializing_if = "Option::is_none")]
pub tier: Option<crate::consts::Tier>,
/// The player's division within a tier.
#[serde(rename = "rank")]
pub rank: crate::consts::Division,
#[serde(skip_serializing_if = "Option::is_none")]
pub rank: Option<crate::consts::Division>,
#[serde(rename = "leaguePoints")]
pub league_points: i32,
/// Winning team on Summoners Rift.

View File

@ -53,7 +53,8 @@ async_tests!{
let summoner = summoner_fut.await.map_err(|e| e.to_string())?.ok_or_else(|| "Failed to get \"TheNicoNi\"".to_owned())?;
let league_fut = RIOT_API.league_v4().get_league_entries_for_summoner(ROUTE, &*summoner.id);
let league = league_fut.await.map_err(|e| e.to_string())?;
let _ = league;
rassert_eq!(1, league.len()); // BRITTLE!
rassert_eq!(league[0].queue_type, QueueType::RANKED_TFT_PAIRS);
Ok(())
},