mirror of
https://github.com/MingweiSamuel/Riven.git
synced 2024-12-26 10:56:34 +00:00
Regen for Milio and new undocumented TFT fields
https://github.com/RiotGames/developer-relations/issues/749
This commit is contained in:
parent
9f5b12cd1b
commit
563f9e84a7
5 changed files with 29 additions and 5 deletions
|
@ -93,6 +93,7 @@ newtype_enum! {
|
|||
/// `MALZAHAR` | "Malzahar" | "Malzahar" | 90
|
||||
/// `MAOKAI` | "Maokai" | "Maokai" | 57
|
||||
/// `MASTER_YI` | "Master Yi" | "MasterYi" | 11
|
||||
/// `MILIO` | "Milio" | "Milio" | 902
|
||||
/// `MISS_FORTUNE` | "Miss Fortune" | "MissFortune" | 21
|
||||
/// `MORDEKAISER` | "Mordekaiser" | "Mordekaiser" | 82
|
||||
/// `MORGANA` | "Morgana" | "Morgana" | 25
|
||||
|
@ -336,6 +337,8 @@ newtype_enum! {
|
|||
MAOKAI = 57,
|
||||
/// `11`.
|
||||
MASTER_YI = 11,
|
||||
/// `902`.
|
||||
MILIO = 902,
|
||||
/// `21`.
|
||||
MISS_FORTUNE = 21,
|
||||
/// `82`.
|
||||
|
@ -590,6 +593,7 @@ impl Champion {
|
|||
Self::MALZAHAR => Some("Malzahar"),
|
||||
Self::MAOKAI => Some("Maokai"),
|
||||
Self::MASTER_YI => Some("Master Yi"),
|
||||
Self::MILIO => Some("Milio"),
|
||||
Self::MISS_FORTUNE => Some("Miss Fortune"),
|
||||
Self::MORDEKAISER => Some("Mordekaiser"),
|
||||
Self::MORGANA => Some("Morgana"),
|
||||
|
@ -776,6 +780,7 @@ impl Champion {
|
|||
Self::MALZAHAR => Some("Malzahar"),
|
||||
Self::MAOKAI => Some("Maokai"),
|
||||
Self::MASTER_YI => Some("MasterYi"),
|
||||
Self::MILIO => Some("Milio"),
|
||||
Self::MISS_FORTUNE => Some("MissFortune"),
|
||||
Self::MORDEKAISER => Some("Mordekaiser"),
|
||||
Self::MORGANA => Some("Morgana"),
|
||||
|
@ -1000,6 +1005,7 @@ impl std::str::FromStr for Champion {
|
|||
/* MALZ */ [ 'M', 'A', 'L', 'Z'] => Ok(Champion::MALZAHAR),
|
||||
/* MAOK */ [ 'M', 'A', 'O', 'K'] => Ok(Champion::MAOKAI),
|
||||
/* 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),
|
||||
/* MORD */ [ 'M', 'O', 'R', 'D'] => Ok(Champion::MORDEKAISER),
|
||||
/* MORG */ [ 'M', 'O', 'R', 'G'] => Ok(Champion::MORGANA),
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
///////////////////////////////////////////////
|
||||
|
||||
// http://www.mingweisamuel.com/riotapi-schema/tool/
|
||||
// Version d9133c31439c2d38263002fad5fa824f2ea0cb8b
|
||||
// Version f3bb2db3eef1ffd9fa3bb8ce0fdaf1c167dc6ae2
|
||||
|
||||
//! Automatically generated endpoint handles.
|
||||
#![allow(clippy::let_and_return, clippy::too_many_arguments)]
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
//! .get_all_champion_masteries(PlatformRoute::NA1, &summoner.id).await
|
||||
//! .expect("Get champion masteries failed.");
|
||||
//!
|
||||
//! // Print champioon masteries.
|
||||
//! // Print champion masteries.
|
||||
//! for (i, mastery) in masteries.iter().take(10).enumerate() {
|
||||
//! println!("{: >2}) {: <9} {: >7} ({})", i + 1,
|
||||
//! mastery.champion_id.name().unwrap_or("UNKNOWN"),
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
///////////////////////////////////////////////
|
||||
|
||||
// http://www.mingweisamuel.com/riotapi-schema/tool/
|
||||
// Version d9133c31439c2d38263002fad5fa824f2ea0cb8b
|
||||
// Version f3bb2db3eef1ffd9fa3bb8ce0fdaf1c167dc6ae2
|
||||
|
||||
//! Metadata about the Riot API and Riven.
|
||||
//!
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
///////////////////////////////////////////////
|
||||
|
||||
// http://www.mingweisamuel.com/riotapi-schema/tool/
|
||||
// Version d9133c31439c2d38263002fad5fa824f2ea0cb8b
|
||||
// Version f3bb2db3eef1ffd9fa3bb8ce0fdaf1c167dc6ae2
|
||||
|
||||
#![allow(missing_docs)]
|
||||
|
||||
|
@ -2419,7 +2419,7 @@ pub mod tft_league_v1 {
|
|||
#[serde(rename = "tier")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
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(skip_serializing_if = "Option::is_none")]
|
||||
pub rank: Option<crate::consts::Division>,
|
||||
|
@ -2513,6 +2513,12 @@ pub mod tft_match_v1 {
|
|||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
#[cfg_attr(feature = "deny-unknown-fields", serde(deny_unknown_fields))]
|
||||
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.
|
||||
#[serde(rename = "game_datetime")]
|
||||
pub game_datetime: i64,
|
||||
|
@ -2540,6 +2546,12 @@ pub mod tft_match_v1 {
|
|||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
#[cfg_attr(feature = "deny-unknown-fields", serde(deny_unknown_fields))]
|
||||
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.
|
||||
#[serde(rename = "companion")]
|
||||
pub companion: Companion,
|
||||
|
@ -2601,6 +2613,9 @@ pub mod tft_match_v1 {
|
|||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
#[cfg_attr(feature = "deny-unknown-fields", serde(deny_unknown_fields))]
|
||||
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.
|
||||
#[serde(rename = "items")]
|
||||
pub items: std::vec::Vec<i32>,
|
||||
|
@ -2626,6 +2641,9 @@ pub mod tft_match_v1 {
|
|||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
#[cfg_attr(feature = "deny-unknown-fields", serde(deny_unknown_fields))]
|
||||
pub struct Companion {
|
||||
#[serde(rename = "item_ID")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub item_id: Option<i32>,
|
||||
#[serde(rename = "skin_ID")]
|
||||
pub skin_id: i32,
|
||||
#[serde(rename = "content_ID")]
|
||||
|
|
Loading…
Reference in a new issue