From 8f0bd8dbe74e4ed6614853462d9ac76e97d51af0 Mon Sep 17 00:00:00 2001 From: Mingwei Samuel Date: Tue, 1 Sep 2020 17:27:28 -0700 Subject: [PATCH] Regen, release 1.9.1 --- Cargo.toml | 2 +- src/consts/champion.rs | 3 +++ src/endpoints.rs | 6 +++--- src/meta.rs | 2 +- src/models.rs | 40 +++++++++++++++++++++++++++++++--------- 5 files changed, 39 insertions(+), 14 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 0ba292f..3c1f1dc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "riven" -version = "1.9.0" +version = "1.9.1" authors = ["Mingwei Samuel "] repository = "https://github.com/MingweiSamuel/Riven" description = "Riot Games API Library" diff --git a/src/consts/champion.rs b/src/consts/champion.rs index 7cd5d6a..a9682f3 100644 --- a/src/consts/champion.rs +++ b/src/consts/champion.rs @@ -226,6 +226,8 @@ pub enum Champion { #[strum(to_string="Rumble", serialize="Rumble")] Rumble = 68, /// Ryze (`Ryze`, 13). #[strum(to_string="Ryze", serialize="Ryze")] Ryze = 13, + /// Samira (`Samira`, 360). + #[strum(to_string="Samira", serialize="Samira")] Samira = 360, /// Sejuani (`Sejuani`, 113). #[strum(to_string="Sejuani", serialize="Sejuani")] Sejuani = 113, /// Senna (`Senna`, 235). @@ -455,6 +457,7 @@ impl Champion { Self::Riven => "Riven", Self::Rumble => "Rumble", Self::Ryze => "Ryze", + Self::Samira => "Samira", Self::Sejuani => "Sejuani", Self::Senna => "Senna", Self::Sett => "Sett", diff --git a/src/endpoints.rs b/src/endpoints.rs index c9d1952..5097605 100644 --- a/src/endpoints.rs +++ b/src/endpoints.rs @@ -7,7 +7,7 @@ /////////////////////////////////////////////// // http://www.mingweisamuel.com/riotapi-schema/tool/ -// Version 36871d82bfc1f861d45c3941b4b5fddd3ab20ea0 +// Version e9fad555098e217edc088cc4b1ecc6fe095ba6cb //! Automatically generated endpoint handles. @@ -1195,10 +1195,10 @@ impl<'a> ValMatchV1<'a> { /// /// Note: this method is automatically generated. pub fn get_match(&self, region: Region, match_id: &str) - -> impl Future> + 'a + -> impl Future>> + 'a { let path_string = format!("/val/match/v1/matches/{}", match_id); - self.base.get::("val-match-v1.getMatch", region.into(), path_string, None) + self.base.get_optional::("val-match-v1.getMatch", region.into(), path_string, None) } /// Get matchlist for games played by puuid diff --git a/src/meta.rs b/src/meta.rs index 53b56b0..a4698d4 100644 --- a/src/meta.rs +++ b/src/meta.rs @@ -7,7 +7,7 @@ /////////////////////////////////////////////// // http://www.mingweisamuel.com/riotapi-schema/tool/ -// Version 36871d82bfc1f861d45c3941b4b5fddd3ab20ea0 +// Version e9fad555098e217edc088cc4b1ecc6fe095ba6cb //! Metadata about the Riot API and Riven. //! diff --git a/src/models.rs b/src/models.rs index b14e3b4..0ea0498 100644 --- a/src/models.rs +++ b/src/models.rs @@ -7,7 +7,7 @@ /////////////////////////////////////////////// // http://www.mingweisamuel.com/riotapi-schema/tool/ -// Version 36871d82bfc1f861d45c3941b4b5fddd3ab20ea0 +// Version e9fad555098e217edc088cc4b1ecc6fe095ba6cb //! Data transfer structs. //! @@ -27,10 +27,12 @@ pub mod account_v1 { pub struct Account { #[serde(rename = "puuid")] pub puuid: String, + /// This field may be excluded if the account doesn't have a gameName #[serde(rename = "gameName")] - pub game_name: String, + pub game_name: Option, + /// This field may be excluded if the account doesn't have a tagLine #[serde(rename = "tagLine")] - pub tag_line: String, + pub tag_line: Option, } /// ActiveShard data object. #[derive(Debug)] @@ -882,6 +884,15 @@ pub mod match_v4 { /// Secondary rune path #[serde(rename = "perkSubStyle")] pub perk_sub_style: Option, + /// First stat rune. + #[serde(rename = "statPerk0")] + pub stat_perk0: Option, + /// Second stat rune. + #[serde(rename = "statPerk1")] + pub stat_perk1: Option, + /// Third stat rune. + #[serde(rename = "statPerk2")] + pub stat_perk2: Option, } /// ParticipantTimeline data object. #[derive(Debug)] @@ -1517,6 +1528,9 @@ pub mod tft_match_v1 { /// Number of units with this trait. #[serde(rename = "num_units")] pub num_units: i32, + /// Current style for this trait. (0 = No style, 1 = Bronze, 2 = Silver, 3 = Gold, 4 = Chromatic) + #[serde(rename = "style")] + pub style: Option, /// Current active tier for the trait. #[serde(rename = "tier_current")] pub tier_current: i32, @@ -1918,7 +1932,7 @@ pub mod val_match_v1 { #[derive(serde::Serialize, serde::Deserialize)] pub struct Match { #[serde(rename = "matchInfo")] - pub match_info: std::vec::Vec, + pub match_info: MatchInfo, #[serde(rename = "players")] pub players: std::vec::Vec, #[serde(rename = "teams")] @@ -2010,6 +2024,7 @@ pub mod val_match_v1 { #[derive(Debug)] #[derive(serde::Serialize, serde::Deserialize)] pub struct Team { + /// This is an arbitrary string. Red and Blue in bomb modes. The puuid of the player in deathmatch. #[serde(rename = "teamId")] pub team_id: String, #[serde(rename = "won")] @@ -2018,6 +2033,9 @@ pub mod val_match_v1 { pub rounds_played: i32, #[serde(rename = "roundsWon")] pub rounds_won: i32, + /// Team points scored. Number of kills in deathmatch. + #[serde(rename = "numPoints")] + pub num_points: i32, } /// RoundResult data object. #[derive(Debug)] @@ -2098,9 +2116,13 @@ pub mod val_match_v1 { #[derive(serde::Serialize, serde::Deserialize)] pub struct Kill { #[serde(rename = "gameTime")] - pub game_time: i32, + pub game_time: Option, #[serde(rename = "roundTime")] - pub round_time: i32, + pub round_time: Option, + #[serde(rename = "timeSinceGameStartMillis")] + pub time_since_game_start_millis: Option, + #[serde(rename = "timeSinceRoundStartMillis")] + pub time_since_round_start_millis: Option, /// PUUID #[serde(rename = "killer")] pub killer: String, @@ -2179,12 +2201,12 @@ pub mod val_match_v1 { #[serde(rename = "puuid")] pub puuid: String, #[serde(rename = "history")] - pub history: std::vec::Vec, + pub history: std::vec::Vec, } - /// MatchReference data object. + /// MatchlistEntry data object. #[derive(Debug)] #[derive(serde::Serialize, serde::Deserialize)] - pub struct MatchReference { + pub struct MatchlistEntry { #[serde(rename = "matchId")] pub match_id: String, #[serde(rename = "gameStartTimeMillis")]