Regen for myriad upstream changes from LoL 14.1

This commit is contained in:
Mingwei Samuel 2024-01-15 11:36:31 -08:00
parent 172bc84620
commit 1e136feaf3
6 changed files with 34 additions and 4 deletions

View file

@ -138,6 +138,7 @@ newtype_enum! {
/// `SION` | "Sion" | "Sion" | 14
/// `SIVIR` | "Sivir" | "Sivir" | 15
/// `SKARNER` | "Skarner" | "Skarner" | 72
/// `SMOLDER` | "Smolder" | "Smolder" | 901
/// `SONA` | "Sona" | "Sona" | 37
/// `SORAKA` | "Soraka" | "Soraka" | 16
/// `SWAIN` | "Swain" | "Swain" | 50
@ -430,6 +431,8 @@ newtype_enum! {
SIVIR = 15,
/// `72`.
SKARNER = 72,
/// `901`.
SMOLDER = 901,
/// `37`.
SONA = 37,
/// `16`.
@ -647,6 +650,7 @@ impl Champion {
Self::SION => Some("Sion"),
Self::SIVIR => Some("Sivir"),
Self::SKARNER => Some("Skarner"),
Self::SMOLDER => Some("Smolder"),
Self::SONA => Some("Sona"),
Self::SORAKA => Some("Soraka"),
Self::SWAIN => Some("Swain"),
@ -837,6 +841,7 @@ impl Champion {
Self::SION => Some("Sion"),
Self::SIVIR => Some("Sivir"),
Self::SKARNER => Some("Skarner"),
Self::SMOLDER => Some("Smolder"),
Self::SONA => Some("Sona"),
Self::SORAKA => Some("Soraka"),
Self::SWAIN => Some("Swain"),
@ -1066,6 +1071,7 @@ impl std::str::FromStr for Champion {
/* SION */ [ 'S', 'I', 'O', 'N'] => Ok(Champion::SION),
/* SIVI */ [ 'S', 'I', 'V', 'I'] => Ok(Champion::SIVIR),
/* SKAR */ [ 'S', 'K', 'A', 'R'] => Ok(Champion::SKARNER),
/* SMOL */ [ 'S', 'M', 'O', 'L'] => Ok(Champion::SMOLDER),
/* SONA */ [ 'S', 'O', 'N', 'A'] => Ok(Champion::SONA),
/* SORA */ [ 'S', 'O', 'R', 'A'] => Ok(Champion::SORAKA),
/* SWAI */ [ 'S', 'W', 'A', 'I'] => Ok(Champion::SWAIN),

View file

@ -58,6 +58,8 @@ pub enum GameMode {
SIEGE,
/// Star Guardian Invasion games
STARGUARDIAN,
/// Teamfight Tactics, used in `spectator-v4` endpoints.
TFT,
/// Tutorial games
TUTORIAL,
/// Tutorial: Welcome to League.

View file

@ -17,9 +17,18 @@ use strum_macros::{ EnumString, Display, AsRefStr, IntoStaticStr };
#[repr(u8)]
pub enum GameType {
/// Custom games
#[strum(to_string = "CUSTOM_GAME", serialize = "CUSTOM")]
#[serde(alias = "CUSTOM")]
CUSTOM_GAME,
/// all other games
#[strum(to_string = "MATCHED_GAME", serialize = "MATCHED")]
#[serde(alias = "MATCHED")]
MATCHED_GAME,
/// Tutorial games
#[strum(to_string = "TUTORIAL_GAME", serialize = "TUTORIAL")]
#[serde(alias = "TUTORIAL")]
TUTORIAL_GAME,
}
#[cfg(test)]
mod test;

View file

@ -7,7 +7,7 @@
///////////////////////////////////////////////
// http://www.mingweisamuel.com/riotapi-schema/tool/
// Version d712d94a43004a22ad9f31b9ebfbcaa9e0820305
// Version e610739a49d23996a0987245e4bb5796bcd18533
//! 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 d712d94a43004a22ad9f31b9ebfbcaa9e0820305
// Version e610739a49d23996a0987245e4bb5796bcd18533
//! Metadata about the Riot API and Riven.
//!

View file

@ -7,7 +7,7 @@
///////////////////////////////////////////////
// http://www.mingweisamuel.com/riotapi-schema/tool/
// Version d712d94a43004a22ad9f31b9ebfbcaa9e0820305
// Version e610739a49d23996a0987245e4bb5796bcd18533
#![allow(missing_docs)]
@ -1881,6 +1881,9 @@ pub mod match_v5 {
#[serde(rename = "wardTakedownsBefore20M")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ward_takedowns_before20_m: Option<f64>,
#[serde(rename = "legendaryItemUsed")]
#[serde(skip_serializing_if = "Option::is_none")]
pub legendary_item_used: Option<std::vec::Vec<i32>>,
}
/// ParticipantMissions data object.
#[derive(Clone, Debug)]
@ -2354,6 +2357,9 @@ pub mod spectator_v4 {
/// List of Game Customizations
#[serde(rename = "gameCustomizationObjects")]
pub game_customization_objects: std::vec::Vec<GameCustomizationObject>,
#[serde(rename = "puuid")]
#[serde(skip_serializing_if = "Option::is_none")]
pub puuid: Option<String>,
}
/// Perks data object.
#[derive(Clone, Debug)]
@ -2427,7 +2433,8 @@ pub mod spectator_v4 {
pub game_queue_config_id: crate::consts::Queue,
/// The game start time represented in epoch milliseconds
#[serde(rename = "gameStartTime")]
pub game_start_time: i64,
#[serde(skip_serializing_if = "Option::is_none")]
pub game_start_time: Option<i64>,
/// The participant information
#[serde(rename = "participants")]
pub participants: std::vec::Vec<Participant>,
@ -2461,6 +2468,12 @@ pub mod spectator_v4 {
/// The ID of the first summoner spell used by this participant
#[serde(rename = "spell1Id")]
pub spell1_id: i64,
#[serde(rename = "puuid")]
#[serde(skip_serializing_if = "Option::is_none")]
pub puuid: Option<String>,
#[serde(rename = "summonerId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub summoner_id: Option<String>,
}
}