diff --git a/riven/src/consts/champion.rs b/riven/src/consts/champion.rs index 862dfff..59bca22 100644 --- a/riven/src/consts/champion.rs +++ b/riven/src/consts/champion.rs @@ -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), diff --git a/riven/src/consts/game_mode.rs b/riven/src/consts/game_mode.rs index 01c0618..1a43324 100644 --- a/riven/src/consts/game_mode.rs +++ b/riven/src/consts/game_mode.rs @@ -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. diff --git a/riven/src/consts/game_type.rs b/riven/src/consts/game_type.rs index cf24bdb..82263d9 100644 --- a/riven/src/consts/game_type.rs +++ b/riven/src/consts/game_type.rs @@ -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; diff --git a/riven/src/endpoints.rs b/riven/src/endpoints.rs index 707c595..5fa0986 100644 --- a/riven/src/endpoints.rs +++ b/riven/src/endpoints.rs @@ -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)] diff --git a/riven/src/meta.rs b/riven/src/meta.rs index 8c76862..1b72243 100644 --- a/riven/src/meta.rs +++ b/riven/src/meta.rs @@ -7,7 +7,7 @@ /////////////////////////////////////////////// // http://www.mingweisamuel.com/riotapi-schema/tool/ -// Version d712d94a43004a22ad9f31b9ebfbcaa9e0820305 +// Version e610739a49d23996a0987245e4bb5796bcd18533 //! Metadata about the Riot API and Riven. //! diff --git a/riven/src/models.rs b/riven/src/models.rs index 78bb2a6..764ab12 100644 --- a/riven/src/models.rs +++ b/riven/src/models.rs @@ -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, + #[serde(rename = "legendaryItemUsed")] + #[serde(skip_serializing_if = "Option::is_none")] + pub legendary_item_used: Option>, } /// 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, + #[serde(rename = "puuid")] + #[serde(skip_serializing_if = "Option::is_none")] + pub puuid: Option, } /// 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, /// The participant information #[serde(rename = "participants")] pub participants: std::vec::Vec, @@ -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, + #[serde(rename = "summonerId")] + #[serde(skip_serializing_if = "Option::is_none")] + pub summoner_id: Option, } }