forked from mirror/Riven
1
0
Fork 0

Regen for Milio and new undocumented TFT fields

https://github.com/RiotGames/developer-relations/issues/749
users/mingwei/lints
Mingwei Samuel 2023-03-08 13:21:41 -08:00
parent 9f5b12cd1b
commit 563f9e84a7
5 changed files with 29 additions and 5 deletions

View File

@ -93,6 +93,7 @@ newtype_enum! {
/// `MALZAHAR` | "Malzahar" | "Malzahar" | 90 /// `MALZAHAR` | "Malzahar" | "Malzahar" | 90
/// `MAOKAI` | "Maokai" | "Maokai" | 57 /// `MAOKAI` | "Maokai" | "Maokai" | 57
/// `MASTER_YI` | "Master Yi" | "MasterYi" | 11 /// `MASTER_YI` | "Master Yi" | "MasterYi" | 11
/// `MILIO` | "Milio" | "Milio" | 902
/// `MISS_FORTUNE` | "Miss Fortune" | "MissFortune" | 21 /// `MISS_FORTUNE` | "Miss Fortune" | "MissFortune" | 21
/// `MORDEKAISER` | "Mordekaiser" | "Mordekaiser" | 82 /// `MORDEKAISER` | "Mordekaiser" | "Mordekaiser" | 82
/// `MORGANA` | "Morgana" | "Morgana" | 25 /// `MORGANA` | "Morgana" | "Morgana" | 25
@ -336,6 +337,8 @@ newtype_enum! {
MAOKAI = 57, MAOKAI = 57,
/// `11`. /// `11`.
MASTER_YI = 11, MASTER_YI = 11,
/// `902`.
MILIO = 902,
/// `21`. /// `21`.
MISS_FORTUNE = 21, MISS_FORTUNE = 21,
/// `82`. /// `82`.
@ -590,6 +593,7 @@ impl Champion {
Self::MALZAHAR => Some("Malzahar"), Self::MALZAHAR => Some("Malzahar"),
Self::MAOKAI => Some("Maokai"), Self::MAOKAI => Some("Maokai"),
Self::MASTER_YI => Some("Master Yi"), Self::MASTER_YI => Some("Master Yi"),
Self::MILIO => Some("Milio"),
Self::MISS_FORTUNE => Some("Miss Fortune"), Self::MISS_FORTUNE => Some("Miss Fortune"),
Self::MORDEKAISER => Some("Mordekaiser"), Self::MORDEKAISER => Some("Mordekaiser"),
Self::MORGANA => Some("Morgana"), Self::MORGANA => Some("Morgana"),
@ -776,6 +780,7 @@ impl Champion {
Self::MALZAHAR => Some("Malzahar"), Self::MALZAHAR => Some("Malzahar"),
Self::MAOKAI => Some("Maokai"), Self::MAOKAI => Some("Maokai"),
Self::MASTER_YI => Some("MasterYi"), Self::MASTER_YI => Some("MasterYi"),
Self::MILIO => Some("Milio"),
Self::MISS_FORTUNE => Some("MissFortune"), Self::MISS_FORTUNE => Some("MissFortune"),
Self::MORDEKAISER => Some("Mordekaiser"), Self::MORDEKAISER => Some("Mordekaiser"),
Self::MORGANA => Some("Morgana"), Self::MORGANA => Some("Morgana"),
@ -1000,6 +1005,7 @@ impl std::str::FromStr for Champion {
/* MALZ */ [ 'M', 'A', 'L', 'Z'] => Ok(Champion::MALZAHAR), /* MALZ */ [ 'M', 'A', 'L', 'Z'] => Ok(Champion::MALZAHAR),
/* MAOK */ [ 'M', 'A', 'O', 'K'] => Ok(Champion::MAOKAI), /* MAOK */ [ 'M', 'A', 'O', 'K'] => Ok(Champion::MAOKAI),
/* MAST */ [ 'M', 'A', 'S', 'T'] => Ok(Champion::MASTER_YI), /* MAST */ [ 'M', 'A', 'S', 'T'] => Ok(Champion::MASTER_YI),
/* MILI */ [ 'M', 'I', 'L', 'I'] => Ok(Champion::MILIO),
/* MISS */ [ 'M', 'I', 'S', 'S'] => Ok(Champion::MISS_FORTUNE), /* MISS */ [ 'M', 'I', 'S', 'S'] => Ok(Champion::MISS_FORTUNE),
/* MORD */ [ 'M', 'O', 'R', 'D'] => Ok(Champion::MORDEKAISER), /* MORD */ [ 'M', 'O', 'R', 'D'] => Ok(Champion::MORDEKAISER),
/* MORG */ [ 'M', 'O', 'R', 'G'] => Ok(Champion::MORGANA), /* MORG */ [ 'M', 'O', 'R', 'G'] => Ok(Champion::MORGANA),

View File

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

View File

@ -59,7 +59,7 @@
//! .get_all_champion_masteries(PlatformRoute::NA1, &summoner.id).await //! .get_all_champion_masteries(PlatformRoute::NA1, &summoner.id).await
//! .expect("Get champion masteries failed."); //! .expect("Get champion masteries failed.");
//! //!
//! // Print champioon masteries. //! // Print champion masteries.
//! for (i, mastery) in masteries.iter().take(10).enumerate() { //! for (i, mastery) in masteries.iter().take(10).enumerate() {
//! println!("{: >2}) {: <9} {: >7} ({})", i + 1, //! println!("{: >2}) {: <9} {: >7} ({})", i + 1,
//! mastery.champion_id.name().unwrap_or("UNKNOWN"), //! mastery.champion_id.name().unwrap_or("UNKNOWN"),

View File

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

View File

@ -7,7 +7,7 @@
/////////////////////////////////////////////// ///////////////////////////////////////////////
// http://www.mingweisamuel.com/riotapi-schema/tool/ // http://www.mingweisamuel.com/riotapi-schema/tool/
// Version d9133c31439c2d38263002fad5fa824f2ea0cb8b // Version f3bb2db3eef1ffd9fa3bb8ce0fdaf1c167dc6ae2
#![allow(missing_docs)] #![allow(missing_docs)]
@ -2419,7 +2419,7 @@ pub mod tft_league_v1 {
#[serde(rename = "tier")] #[serde(rename = "tier")]
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
pub tier: Option<crate::consts::Tier>, pub tier: Option<crate::consts::Tier>,
/// A player's division within a tier. Not included for the RANKED_TFT_TURBO queueType. /// The player's division within a tier. Not included for the RANKED_TFT_TURBO queueType.
#[serde(rename = "rank")] #[serde(rename = "rank")]
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
pub rank: Option<crate::consts::Division>, pub rank: Option<crate::consts::Division>,
@ -2513,6 +2513,12 @@ pub mod tft_match_v1 {
#[derive(serde::Serialize, serde::Deserialize)] #[derive(serde::Serialize, serde::Deserialize)]
#[cfg_attr(feature = "deny-unknown-fields", serde(deny_unknown_fields))] #[cfg_attr(feature = "deny-unknown-fields", serde(deny_unknown_fields))]
pub struct Info { pub struct Info {
#[serde(rename = "tft_game_type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tft_game_type: Option<String>,
#[serde(rename = "tft_set_core_name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tft_set_core_name: Option<String>,
/// Unix timestamp. /// Unix timestamp.
#[serde(rename = "game_datetime")] #[serde(rename = "game_datetime")]
pub game_datetime: i64, pub game_datetime: i64,
@ -2540,6 +2546,12 @@ pub mod tft_match_v1 {
#[derive(serde::Serialize, serde::Deserialize)] #[derive(serde::Serialize, serde::Deserialize)]
#[cfg_attr(feature = "deny-unknown-fields", serde(deny_unknown_fields))] #[cfg_attr(feature = "deny-unknown-fields", serde(deny_unknown_fields))]
pub struct Participant { pub struct Participant {
#[serde(rename = "augments")]
#[serde(skip_serializing_if = "Option::is_none")]
pub augments: Option<std::vec::Vec<String>>,
#[serde(rename = "partner_group_id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub partner_group_id: Option<i32>,
/// Participant's companion. /// Participant's companion.
#[serde(rename = "companion")] #[serde(rename = "companion")]
pub companion: Companion, pub companion: Companion,
@ -2601,6 +2613,9 @@ pub mod tft_match_v1 {
#[derive(serde::Serialize, serde::Deserialize)] #[derive(serde::Serialize, serde::Deserialize)]
#[cfg_attr(feature = "deny-unknown-fields", serde(deny_unknown_fields))] #[cfg_attr(feature = "deny-unknown-fields", serde(deny_unknown_fields))]
pub struct Unit { pub struct Unit {
#[serde(rename = "itemNames")]
#[serde(skip_serializing_if = "Option::is_none")]
pub item_names: Option<std::vec::Vec<String>>,
/// A list of the unit's items. Please refer to the Teamfight Tactics documentation for item ids. /// A list of the unit's items. Please refer to the Teamfight Tactics documentation for item ids.
#[serde(rename = "items")] #[serde(rename = "items")]
pub items: std::vec::Vec<i32>, pub items: std::vec::Vec<i32>,
@ -2626,6 +2641,9 @@ pub mod tft_match_v1 {
#[derive(serde::Serialize, serde::Deserialize)] #[derive(serde::Serialize, serde::Deserialize)]
#[cfg_attr(feature = "deny-unknown-fields", serde(deny_unknown_fields))] #[cfg_attr(feature = "deny-unknown-fields", serde(deny_unknown_fields))]
pub struct Companion { pub struct Companion {
#[serde(rename = "item_ID")]
#[serde(skip_serializing_if = "Option::is_none")]
pub item_id: Option<i32>,
#[serde(rename = "skin_ID")] #[serde(rename = "skin_ID")]
pub skin_id: i32, pub skin_id: i32,
#[serde(rename = "content_ID")] #[serde(rename = "content_ID")]