diff --git a/riven/src/consts/champion.rs b/riven/src/consts/champion.rs index 3bf6000..7c8fc22 100644 --- a/riven/src/consts/champion.rs +++ b/riven/src/consts/champion.rs @@ -28,6 +28,7 @@ newtype_enum! { /// `APHELIOS` | "Aphelios" | "Aphelios" | 523 /// `ASHE` | "Ashe" | "Ashe" | 22 /// `AURELION_SOL` | "Aurelion Sol" | "AurelionSol" | 136 + /// `AURORA` | "Aurora" | "Aurora" | 893 /// `AZIR` | "Azir" | "Azir" | 268 /// `BARD` | "Bard" | "Bard" | 432 /// `BEL_VETH` | "Bel'Veth" | "Belveth" | 200 @@ -210,6 +211,8 @@ newtype_enum! { ASHE = 22, /// `136`. AURELION_SOL = 136, + /// `893`. + AURORA = 893, /// `268`. AZIR = 268, /// `432`. @@ -540,6 +543,7 @@ impl Champion { Self::APHELIOS => Some("Aphelios"), Self::ASHE => Some("Ashe"), Self::AURELION_SOL => Some("Aurelion Sol"), + Self::AURORA => Some("Aurora"), Self::AZIR => Some("Azir"), Self::BARD => Some("Bard"), Self::BEL_VETH => Some("Bel'Veth"), @@ -731,6 +735,7 @@ impl Champion { Self::APHELIOS => Some("Aphelios"), Self::ASHE => Some("Ashe"), Self::AURELION_SOL => Some("AurelionSol"), + Self::AURORA => Some("Aurora"), Self::AZIR => Some("Azir"), Self::BARD => Some("Bard"), Self::BEL_VETH => Some("Belveth"), @@ -952,6 +957,7 @@ impl std::str::FromStr for Champion { /* APHE */ [ 'A', 'P', 'H', 'E'] => Ok(Champion::APHELIOS), /* ASHE */ [ 'A', 'S', 'H', 'E'] => Ok(Champion::ASHE), /* AURE */ [ 'A', 'U', 'R', 'E'] => Ok(Champion::AURELION_SOL), + /* AURO */ [ 'A', 'U', 'R', 'O'] => Ok(Champion::AURORA), /* AZIR */ [ 'A', 'Z', 'I', 'R'] => Ok(Champion::AZIR), /* BARD */ [ 'B', 'A', 'R', 'D'] => Ok(Champion::BARD), /* BELV */ [ 'B', 'E', 'L', 'V'] => Ok(Champion::BEL_VETH), diff --git a/riven/src/consts/route.rs b/riven/src/consts/route.rs index 9e61c21..7be3153 100644 --- a/riven/src/consts/route.rs +++ b/riven/src/consts/route.rs @@ -103,6 +103,12 @@ pub enum PlatformRoute { #[strum(to_string="LA2", serialize="LAS")] LA2 = 22, + /// Middle East and North Africa. + /// + /// `37` (riotapi-schema ID/repr) + #[strum(to_string="ME1", serialize="MENA")] + ME1 = 37, + /// North America. /// /// `23` (riotapi-schema ID/repr) @@ -177,6 +183,7 @@ impl PlatformRoute { Self::KR => RegionalRoute::ASIA, Self::LA1 => RegionalRoute::AMERICAS, Self::LA2 => RegionalRoute::AMERICAS, + Self::ME1 => RegionalRoute::EUROPE, Self::NA1 => RegionalRoute::AMERICAS, Self::OC1 => RegionalRoute::SEA, Self::PH2 => RegionalRoute::SEA, @@ -202,6 +209,7 @@ impl PlatformRoute { Self::KR => RegionalRoute::ASIA, Self::LA1 => RegionalRoute::AMERICAS, Self::LA2 => RegionalRoute::AMERICAS, + Self::ME1 => RegionalRoute::EUROPE, Self::NA1 => RegionalRoute::AMERICAS, Self::OC1 => RegionalRoute::SEA, Self::PH2 => RegionalRoute::SEA, @@ -249,6 +257,7 @@ impl PlatformRoute { Self::JP1 => "JP", Self::LA1 => "LAN", Self::LA2 => "LAS", + Self::ME1 => "MENA", Self::NA1 => "NA", Self::OC1 => "OCE", Self::PH2 => "PH", diff --git a/riven/src/endpoints.rs b/riven/src/endpoints.rs index f454e5c..9097160 100644 --- a/riven/src/endpoints.rs +++ b/riven/src/endpoints.rs @@ -8,7 +8,7 @@ /////////////////////////////////////////////// // http://www.mingweisamuel.com/riotapi-schema/tool/ -// Version 3c0bd6b3aee83b97e90e7c93c5ef563b7ddfbb11 +// Version 8096d0e7127558ddf4df50a0227b4100b5d54a2f //! Automatically generated endpoint handles. #![allow(clippy::let_and_return, clippy::too_many_arguments)] @@ -234,6 +234,15 @@ impl RiotApi { pub fn tournament_v5(&self) -> TournamentV5 { TournamentV5 { base: self } } + /// Returns a handle for accessing [ValConsoleMatchV1](crate::endpoints::ValConsoleMatchV1) endpoints. + /// # Riot Developer API Reference + /// `val-console-match-v1` + /// + /// Note: this method is automatically generated. + #[inline] + pub fn val_console_match_v1(&self) -> ValConsoleMatchV1 { + ValConsoleMatchV1 { base: self } + } /// Returns a handle for accessing [ValContentV1](crate::endpoints::ValContentV1) endpoints. /// # Riot Developer API Reference /// `val-content-v1` @@ -2021,6 +2030,79 @@ impl<'a> TournamentV5<'a> { } +/// ValConsoleMatchV1 endpoints handle, accessed by calling [`val_console_match_v1()`](crate::RiotApi::val_console_match_v1) on a [`RiotApi`](crate::RiotApi) instance. +/// # Riot Developer API Reference +/// `val-console-match-v1` +/// +/// Note: this struct is automatically generated. +#[repr(transparent)] +pub struct ValConsoleMatchV1<'a> { + base: &'a RiotApi, +} +impl<'a> ValConsoleMatchV1<'a> { + /// Get match by id + /// # Parameters + /// * `route` - Route to query. + /// * `match_id` (required, in path) + /// # Riot Developer API Reference + /// `val-console-match-v1.getMatch` + /// + /// Note: this method is automatically generated. + pub fn get_match(&self, route: ValPlatformRoute, match_id: &str) + -> impl Future> + 'a + { + let route_str = route.into(); + let request = self.base.request(Method::GET, route_str, &format!("/val/match/console/v1/matches/{}", match_id)); + let future = self.base.execute_val::("val-console-match-v1.getMatch", route_str, request); + #[cfg(feature = "tracing")] + let future = future.instrument(tracing::info_span!("val-console-match-v1.getMatch")); + future + } + + /// Get matchlist for games played by puuid and platform type + /// # Parameters + /// * `route` - Route to query. + /// * `puuid` (required, in path) + /// * `platform_type` (required, in query) + /// # Riot Developer API Reference + /// `val-console-match-v1.getMatchlist` + /// + /// Note: this method is automatically generated. + pub fn get_matchlist(&self, route: ValPlatformRoute, puuid: &str, platform_type: &str) + -> impl Future> + 'a + { + let route_str = route.into(); + let request = self.base.request(Method::GET, route_str, &format!("/val/match/console/v1/matchlists/by-puuid/{}", puuid)); + let request = request.query(&[ ("platformType", platform_type) ]); + let future = self.base.execute_val::("val-console-match-v1.getMatchlist", route_str, request); + #[cfg(feature = "tracing")] + let future = future.instrument(tracing::info_span!("val-console-match-v1.getMatchlist")); + future + } + + /// Get recent matches + /// ## Implementation Notes + /// Returns a list of match ids that have completed in the last 10 minutes for live regions and 12 hours for the esports routing value. NA/LATAM/BR share a match history deployment. As such, recent matches will return a combined list of matches from those three regions. Requests are load balanced so you may see some inconsistencies as matches are added/removed from the list. + /// # Parameters + /// * `route` - Route to query. + /// * `queue` (required, in path) + /// # Riot Developer API Reference + /// `val-console-match-v1.getRecent` + /// + /// Note: this method is automatically generated. + pub fn get_recent(&self, route: ValPlatformRoute, queue: &str) + -> impl Future> + 'a + { + let route_str = route.into(); + let request = self.base.request(Method::GET, route_str, &format!("/val/match/console/v1/recent-matches/by-queue/{}", queue)); + let future = self.base.execute_val::("val-console-match-v1.getRecent", route_str, request); + #[cfg(feature = "tracing")] + let future = future.instrument(tracing::info_span!("val-console-match-v1.getRecent")); + future + } + +} + /// ValContentV1 endpoints handle, accessed by calling [`val_content_v1()`](crate::RiotApi::val_content_v1) on a [`RiotApi`](crate::RiotApi) instance. /// # Riot Developer API Reference /// `val-content-v1` diff --git a/riven/src/meta.rs b/riven/src/meta.rs index 6b40488..b1da321 100644 --- a/riven/src/meta.rs +++ b/riven/src/meta.rs @@ -8,7 +8,7 @@ /////////////////////////////////////////////// // http://www.mingweisamuel.com/riotapi-schema/tool/ -// Version 3c0bd6b3aee83b97e90e7c93c5ef563b7ddfbb11 +// Version 8096d0e7127558ddf4df50a0227b4100b5d54a2f //! Metadata about the Riot API and Riven. //! @@ -16,7 +16,7 @@ /// Metadata for endpoints. Each tuple corresponds to one endpoint and contains /// the HTTP [`Method`](reqwest::Method), `str` path, and the method's `str` ID. -pub static ALL_ENDPOINTS: [(reqwest::Method, &str, &str); 79] = [ +pub static ALL_ENDPOINTS: [(reqwest::Method, &str, &str); 82] = [ (reqwest::Method::GET, "/riot/account/v1/accounts/by-puuid/{puuid}", "account-v1.getByPuuid"), (reqwest::Method::GET, "/riot/account/v1/accounts/by-riot-id/{gameName}/{tagLine}", "account-v1.getByRiotId"), (reqwest::Method::GET, "/riot/account/v1/accounts/me", "account-v1.getByAccessToken"), @@ -90,6 +90,9 @@ pub static ALL_ENDPOINTS: [(reqwest::Method, &str, &str); 79] = [ (reqwest::Method::GET, "/lol/tournament/v5/lobby-events/by-code/{tournamentCode}", "tournament-v5.getLobbyEventsByCode"), (reqwest::Method::POST, "/lol/tournament/v5/providers", "tournament-v5.registerProviderData"), (reqwest::Method::POST, "/lol/tournament/v5/tournaments", "tournament-v5.registerTournament"), + (reqwest::Method::GET, "/val/match/console/v1/matches/{matchId}", "val-console-match-v1.getMatch"), + (reqwest::Method::GET, "/val/match/console/v1/matchlists/by-puuid/{puuid}", "val-console-match-v1.getMatchlist"), + (reqwest::Method::GET, "/val/match/console/v1/recent-matches/by-queue/{queue}", "val-console-match-v1.getRecent"), (reqwest::Method::GET, "/val/content/v1/contents", "val-content-v1.getContent"), (reqwest::Method::GET, "/val/match/v1/matches/{matchId}", "val-match-v1.getMatch"), (reqwest::Method::GET, "/val/match/v1/matchlists/by-puuid/{puuid}", "val-match-v1.getMatchlist"), diff --git a/riven/src/models.rs b/riven/src/models.rs index 88b74ee..569cbd5 100644 --- a/riven/src/models.rs +++ b/riven/src/models.rs @@ -8,7 +8,7 @@ /////////////////////////////////////////////// // http://www.mingweisamuel.com/riotapi-schema/tool/ -// Version 3c0bd6b3aee83b97e90e7c93c5ef563b7ddfbb11 +// Version 8096d0e7127558ddf4df50a0227b4100b5d54a2f #![allow(missing_docs)] @@ -93,43 +93,57 @@ pub mod champion_mastery_v4 { /// Number of points earned since current level has been achieved. #[serde(rename = "championPointsSinceLastLevel")] pub champion_points_since_last_level: i64, - /// The token earned for this champion at the current championLevel. When the championLevel is advanced the tokensEarned resets to 0. - #[serde(rename = "tokensEarned")] - pub tokens_earned: i32, #[serde(rename = "markRequiredForNextLevel")] pub mark_required_for_next_level: i32, #[serde(rename = "championSeasonMilestone")] pub champion_season_milestone: i32, + #[serde(rename = "nextSeasonMilestone")] + pub next_season_milestone: NextSeasonMilestones, + /// The token earned for this champion at the current championLevel. When the championLevel is advanced the tokensEarned resets to 0. + #[serde(rename = "tokensEarned")] + pub tokens_earned: i32, #[serde(rename = "milestoneGrades")] #[serde(skip_serializing_if = "Option::is_none")] pub milestone_grades: Option>, - #[serde(rename = "nextSeasonMilestone")] - pub next_season_milestone: NextSeasonMilestone, } - /// NextSeasonMilestone data object. + /// NextSeasonMilestones data object. + /// # Description + /// This object contains required next season milestone information. + /// + /// Note: This struct is automatically generated #[derive(Clone, Debug)] #[derive(serde::Serialize, serde::Deserialize)] #[cfg_attr(feature = "deny-unknown-fields", serde(deny_unknown_fields))] - pub struct NextSeasonMilestone { + pub struct NextSeasonMilestones { #[serde(rename = "requireGradeCounts")] pub require_grade_counts: std::collections::HashMap, + /// Reward marks. #[serde(rename = "rewardMarks")] pub reward_marks: i32, + /// Bonus. #[serde(rename = "bonus")] pub bonus: bool, + /// Reward configuration. #[serde(rename = "rewardConfig")] #[serde(skip_serializing_if = "Option::is_none")] pub reward_config: Option, } /// RewardConfig data object. + /// # Description + /// This object contains required reward config information. + /// + /// Note: This struct is automatically generated #[derive(Clone, Debug)] #[derive(serde::Serialize, serde::Deserialize)] #[cfg_attr(feature = "deny-unknown-fields", serde(deny_unknown_fields))] pub struct RewardConfig { + /// Reward value #[serde(rename = "rewardValue")] pub reward_value: String, + /// Reward type #[serde(rename = "rewardType")] pub reward_type: String, + /// Maximun reward #[serde(rename = "maximumReward")] pub maximum_reward: i32, } @@ -975,9 +989,11 @@ pub mod match_v5 { #[derive(serde::Serialize, serde::Deserialize)] #[cfg_attr(feature = "deny-unknown-fields", serde(deny_unknown_fields))] pub struct Participant { + /// Yellow crossed swords #[serde(rename = "allInPings")] #[serde(skip_serializing_if = "Option::is_none")] pub all_in_pings: Option, + /// Green flag #[serde(rename = "assistMePings")] #[serde(skip_serializing_if = "Option::is_none")] pub assist_me_pings: Option, @@ -1001,6 +1017,7 @@ pub mod match_v5 { pub champion_id: Result, #[serde(rename = "championName")] pub champion_name: String, + /// Blue generic ping (ALT+click) #[serde(rename = "commandPings")] #[serde(skip_serializing_if = "Option::is_none")] pub command_pings: Option, @@ -1019,9 +1036,6 @@ pub mod match_v5 { pub damage_dealt_to_objectives: i32, #[serde(rename = "damageDealtToTurrets")] pub damage_dealt_to_turrets: i32, - #[serde(rename = "dangerPings")] - #[serde(skip_serializing_if = "Option::is_none")] - pub danger_pings: Option, #[serde(rename = "damageSelfMitigated")] pub damage_self_mitigated: i32, #[serde(rename = "deaths")] @@ -1035,9 +1049,11 @@ pub mod match_v5 { #[serde(rename = "eligibleForProgression")] #[serde(skip_serializing_if = "Option::is_none")] pub eligible_for_progression: Option, + /// Yellow questionmark #[serde(rename = "enemyMissingPings")] #[serde(skip_serializing_if = "Option::is_none")] pub enemy_missing_pings: Option, + /// Red eyeball #[serde(rename = "enemyVisionPings")] #[serde(skip_serializing_if = "Option::is_none")] pub enemy_vision_pings: Option, @@ -1049,6 +1065,7 @@ pub mod match_v5 { pub first_tower_assist: bool, #[serde(rename = "firstTowerKill")] pub first_tower_kill: bool, + /// This is an offshoot of the OneStone challenge. The code checks if a spell with the same instance ID does the final point of damage to at least 2 Champions. It doesn't matter if they're enemies, but you cannot hurt your friends. #[serde(rename = "gameEndedInEarlySurrender")] pub game_ended_in_early_surrender: bool, #[serde(rename = "gameEndedInSurrender")] @@ -1056,6 +1073,7 @@ pub mod match_v5 { #[serde(rename = "holdPings")] #[serde(skip_serializing_if = "Option::is_none")] pub hold_pings: Option, + /// Yellow circle with horizontal line #[serde(rename = "getBackPings")] #[serde(skip_serializing_if = "Option::is_none")] pub get_back_pings: Option, @@ -1113,8 +1131,10 @@ pub mod match_v5 { #[serde(rename = "missions")] #[serde(skip_serializing_if = "Option::is_none")] pub missions: Option, + /// neutralMinionsKilled = mNeutralMinionsKilled, which is incremented on kills of kPet and kJungleMonster #[serde(rename = "neutralMinionsKilled")] pub neutral_minions_killed: i32, + /// Green ward #[serde(rename = "needVisionPings")] #[serde(skip_serializing_if = "Option::is_none")] pub need_vision_pings: Option, @@ -1130,11 +1150,48 @@ pub mod match_v5 { pub objectives_stolen: i32, #[serde(rename = "objectivesStolenAssists")] pub objectives_stolen_assists: i32, + /// Blue arrow pointing at ground #[serde(rename = "onMyWayPings")] #[serde(skip_serializing_if = "Option::is_none")] pub on_my_way_pings: Option, #[serde(rename = "participantId")] pub participant_id: i32, + #[serde(rename = "playerScore0")] + #[serde(skip_serializing_if = "Option::is_none")] + pub player_score0: Option, + #[serde(rename = "playerScore1")] + #[serde(skip_serializing_if = "Option::is_none")] + pub player_score1: Option, + #[serde(rename = "playerScore2")] + #[serde(skip_serializing_if = "Option::is_none")] + pub player_score2: Option, + #[serde(rename = "playerScore3")] + #[serde(skip_serializing_if = "Option::is_none")] + pub player_score3: Option, + #[serde(rename = "playerScore4")] + #[serde(skip_serializing_if = "Option::is_none")] + pub player_score4: Option, + #[serde(rename = "playerScore5")] + #[serde(skip_serializing_if = "Option::is_none")] + pub player_score5: Option, + #[serde(rename = "playerScore6")] + #[serde(skip_serializing_if = "Option::is_none")] + pub player_score6: Option, + #[serde(rename = "playerScore7")] + #[serde(skip_serializing_if = "Option::is_none")] + pub player_score7: Option, + #[serde(rename = "playerScore8")] + #[serde(skip_serializing_if = "Option::is_none")] + pub player_score8: Option, + #[serde(rename = "playerScore9")] + #[serde(skip_serializing_if = "Option::is_none")] + pub player_score9: Option, + #[serde(rename = "playerScore10")] + #[serde(skip_serializing_if = "Option::is_none")] + pub player_score10: Option, + #[serde(rename = "playerScore11")] + #[serde(skip_serializing_if = "Option::is_none")] + pub player_score11: Option, #[serde(rename = "pentaKills")] pub penta_kills: i32, #[serde(rename = "perks")] @@ -1163,6 +1220,7 @@ pub mod match_v5 { #[serde(rename = "playerSubteamId")] #[serde(skip_serializing_if = "Option::is_none")] pub player_subteam_id: Option, + /// Green minion #[serde(rename = "pushPings")] #[serde(skip_serializing_if = "Option::is_none")] pub push_pings: Option, @@ -1234,10 +1292,13 @@ pub mod match_v5 { #[serde(rename = "totalEnemyJungleMinionsKilled")] #[serde(skip_serializing_if = "Option::is_none")] pub total_enemy_jungle_minions_killed: Option, + /// Whenever positive health is applied (which translates to all heals in the game but not things like regeneration), totalHeal is incremented by the amount of health received. This includes healing enemies, jungle monsters, yourself, etc #[serde(rename = "totalHeal")] pub total_heal: i32, + /// Whenever positive health is applied (which translates to all heals in the game but not things like regeneration), totalHealsOnTeammates is incremented by the amount of health received. This is post modified, so if you heal someone missing 5 health for 100 you will get +5 totalHealsOnTeammates #[serde(rename = "totalHealsOnTeammates")] pub total_heals_on_teammates: i32, + /// totalMillionsKilled = mMinionsKilled, which is only incremented on kills of kTeamMinion, kMeleeLaneMinion, kSuperLaneMinion, kRangedLaneMinion and kSiegeLaneMinion #[serde(rename = "totalMinionsKilled")] pub total_minions_killed: i32, #[serde(rename = "totalTimeCCDealt")] @@ -1280,45 +1341,14 @@ pub mod match_v5 { #[serde(rename = "baitPings")] #[serde(skip_serializing_if = "Option::is_none")] pub bait_pings: Option, + /// https://github.com/RiotGames/developer-relations/issues/870 + #[serde(rename = "dangerPings")] + #[serde(skip_serializing_if = "Option::is_none")] + pub danger_pings: Option, + /// https://github.com/RiotGames/developer-relations/issues/814 #[serde(rename = "basicPings")] #[serde(skip_serializing_if = "Option::is_none")] pub basic_pings: Option, - #[serde(rename = "playerScore0")] - #[serde(skip_serializing_if = "Option::is_none")] - pub player_score0: Option, - #[serde(rename = "playerScore1")] - #[serde(skip_serializing_if = "Option::is_none")] - pub player_score1: Option, - #[serde(rename = "playerScore10")] - #[serde(skip_serializing_if = "Option::is_none")] - pub player_score10: Option, - #[serde(rename = "playerScore11")] - #[serde(skip_serializing_if = "Option::is_none")] - pub player_score11: Option, - #[serde(rename = "playerScore2")] - #[serde(skip_serializing_if = "Option::is_none")] - pub player_score2: Option, - #[serde(rename = "playerScore3")] - #[serde(skip_serializing_if = "Option::is_none")] - pub player_score3: Option, - #[serde(rename = "playerScore4")] - #[serde(skip_serializing_if = "Option::is_none")] - pub player_score4: Option, - #[serde(rename = "playerScore5")] - #[serde(skip_serializing_if = "Option::is_none")] - pub player_score5: Option, - #[serde(rename = "playerScore6")] - #[serde(skip_serializing_if = "Option::is_none")] - pub player_score6: Option, - #[serde(rename = "playerScore7")] - #[serde(skip_serializing_if = "Option::is_none")] - pub player_score7: Option, - #[serde(rename = "playerScore8")] - #[serde(skip_serializing_if = "Option::is_none")] - pub player_score8: Option, - #[serde(rename = "playerScore9")] - #[serde(skip_serializing_if = "Option::is_none")] - pub player_score9: Option, #[serde(rename = "playerAugment5")] #[serde(skip_serializing_if = "Option::is_none")] pub player_augment5: Option, @@ -1338,6 +1368,96 @@ pub mod match_v5 { #[serde(rename = "12AssistStreakCount")] #[serde(skip_serializing_if = "Option::is_none")] pub x12_assist_streak_count: Option, + #[serde(rename = "baronBuffGoldAdvantageOverThreshold")] + #[serde(skip_serializing_if = "Option::is_none")] + pub baron_buff_gold_advantage_over_threshold: Option, + #[serde(rename = "controlWardTimeCoverageInRiverOrEnemyHalf")] + #[serde(skip_serializing_if = "Option::is_none")] + pub control_ward_time_coverage_in_river_or_enemy_half: Option, + #[serde(rename = "earliestBaron")] + #[serde(skip_serializing_if = "Option::is_none")] + pub earliest_baron: Option, + #[serde(rename = "earliestDragonTakedown")] + #[serde(skip_serializing_if = "Option::is_none")] + pub earliest_dragon_takedown: Option, + #[serde(rename = "earliestElderDragon")] + #[serde(skip_serializing_if = "Option::is_none")] + pub earliest_elder_dragon: Option, + #[serde(rename = "earlyLaningPhaseGoldExpAdvantage")] + #[serde(skip_serializing_if = "Option::is_none")] + pub early_laning_phase_gold_exp_advantage: Option, + #[serde(rename = "fasterSupportQuestCompletion")] + #[serde(skip_serializing_if = "Option::is_none")] + pub faster_support_quest_completion: Option, + #[serde(rename = "fastestLegendary")] + #[serde(skip_serializing_if = "Option::is_none")] + pub fastest_legendary: Option, + #[serde(rename = "hadAfkTeammate")] + #[serde(skip_serializing_if = "Option::is_none")] + pub had_afk_teammate: Option, + #[serde(rename = "highestChampionDamage")] + #[serde(skip_serializing_if = "Option::is_none")] + pub highest_champion_damage: Option, + #[serde(rename = "highestCrowdControlScore")] + #[serde(skip_serializing_if = "Option::is_none")] + pub highest_crowd_control_score: Option, + #[serde(rename = "highestWardKills")] + #[serde(skip_serializing_if = "Option::is_none")] + pub highest_ward_kills: Option, + #[serde(rename = "junglerKillsEarlyJungle")] + #[serde(skip_serializing_if = "Option::is_none")] + pub jungler_kills_early_jungle: Option, + #[serde(rename = "killsOnLanersEarlyJungleAsJungler")] + #[serde(skip_serializing_if = "Option::is_none")] + pub kills_on_laners_early_jungle_as_jungler: Option, + #[serde(rename = "laningPhaseGoldExpAdvantage")] + #[serde(skip_serializing_if = "Option::is_none")] + pub laning_phase_gold_exp_advantage: Option, + #[serde(rename = "legendaryCount")] + #[serde(skip_serializing_if = "Option::is_none")] + pub legendary_count: Option, + #[serde(rename = "maxCsAdvantageOnLaneOpponent")] + #[serde(skip_serializing_if = "Option::is_none")] + pub max_cs_advantage_on_lane_opponent: Option, + #[serde(rename = "maxLevelLeadLaneOpponent")] + #[serde(skip_serializing_if = "Option::is_none")] + pub max_level_lead_lane_opponent: Option, + #[serde(rename = "mostWardsDestroyedOneSweeper")] + #[serde(skip_serializing_if = "Option::is_none")] + pub most_wards_destroyed_one_sweeper: Option, + #[serde(rename = "mythicItemUsed")] + #[serde(skip_serializing_if = "Option::is_none")] + pub mythic_item_used: Option, + #[serde(rename = "playedChampSelectPosition")] + #[serde(skip_serializing_if = "Option::is_none")] + pub played_champ_select_position: Option, + #[serde(rename = "soloTurretsLategame")] + #[serde(skip_serializing_if = "Option::is_none")] + pub solo_turrets_lategame: Option, + #[serde(rename = "takedownsFirst25Minutes")] + #[serde(skip_serializing_if = "Option::is_none")] + pub takedowns_first25_minutes: Option, + #[serde(rename = "teleportTakedowns")] + #[serde(skip_serializing_if = "Option::is_none")] + pub teleport_takedowns: Option, + #[serde(rename = "thirdInhibitorDestroyedTime")] + #[serde(skip_serializing_if = "Option::is_none")] + pub third_inhibitor_destroyed_time: Option, + #[serde(rename = "threeWardsOneSweeperCount")] + #[serde(skip_serializing_if = "Option::is_none")] + pub three_wards_one_sweeper_count: Option, + #[serde(rename = "visionScoreAdvantageLaneOpponent")] + #[serde(skip_serializing_if = "Option::is_none")] + pub vision_score_advantage_lane_opponent: Option, + #[serde(rename = "InfernalScalePickup")] + #[serde(skip_serializing_if = "Option::is_none")] + pub infernal_scale_pickup: Option, + #[serde(rename = "fistBumpParticipation")] + #[serde(skip_serializing_if = "Option::is_none")] + pub fist_bump_participation: Option, + #[serde(rename = "voidMonsterKill")] + #[serde(skip_serializing_if = "Option::is_none")] + pub void_monster_kill: Option, #[serde(rename = "abilityUses")] #[serde(skip_serializing_if = "Option::is_none")] pub ability_uses: Option, @@ -1509,6 +1629,7 @@ pub mod match_v5 { #[serde(rename = "moreEnemyJungleThanOpponent")] #[serde(skip_serializing_if = "Option::is_none")] pub more_enemy_jungle_than_opponent: Option, + /// This is an offshoot of the OneStone challenge. The code checks if a spell with the same instance ID does the final point of damage to at least 2 Champions. It doesn't matter if they're enemies, but you cannot hurt your friends. #[serde(rename = "multiKillOneSpell")] #[serde(skip_serializing_if = "Option::is_none")] pub multi_kill_one_spell: Option, @@ -1626,6 +1747,7 @@ pub mod match_v5 { #[serde(rename = "turretPlatesTaken")] #[serde(skip_serializing_if = "Option::is_none")] pub turret_plates_taken: Option, + /// Any player who damages a tower that is destroyed within 30 seconds of a Rift Herald charge will receive credit. A player who does not damage the tower will not receive credit. #[serde(rename = "turretsTakenWithRiftHerald")] #[serde(skip_serializing_if = "Option::is_none")] pub turrets_taken_with_rift_herald: Option, @@ -1653,96 +1775,6 @@ pub mod match_v5 { #[serde(rename = "wardTakedownsBefore20M")] #[serde(skip_serializing_if = "Option::is_none")] pub ward_takedowns_before20_m: Option, - #[serde(rename = "baronBuffGoldAdvantageOverThreshold")] - #[serde(skip_serializing_if = "Option::is_none")] - pub baron_buff_gold_advantage_over_threshold: Option, - #[serde(rename = "controlWardTimeCoverageInRiverOrEnemyHalf")] - #[serde(skip_serializing_if = "Option::is_none")] - pub control_ward_time_coverage_in_river_or_enemy_half: Option, - #[serde(rename = "earliestBaron")] - #[serde(skip_serializing_if = "Option::is_none")] - pub earliest_baron: Option, - #[serde(rename = "earliestDragonTakedown")] - #[serde(skip_serializing_if = "Option::is_none")] - pub earliest_dragon_takedown: Option, - #[serde(rename = "earliestElderDragon")] - #[serde(skip_serializing_if = "Option::is_none")] - pub earliest_elder_dragon: Option, - #[serde(rename = "earlyLaningPhaseGoldExpAdvantage")] - #[serde(skip_serializing_if = "Option::is_none")] - pub early_laning_phase_gold_exp_advantage: Option, - #[serde(rename = "fasterSupportQuestCompletion")] - #[serde(skip_serializing_if = "Option::is_none")] - pub faster_support_quest_completion: Option, - #[serde(rename = "fastestLegendary")] - #[serde(skip_serializing_if = "Option::is_none")] - pub fastest_legendary: Option, - #[serde(rename = "hadAfkTeammate")] - #[serde(skip_serializing_if = "Option::is_none")] - pub had_afk_teammate: Option, - #[serde(rename = "highestChampionDamage")] - #[serde(skip_serializing_if = "Option::is_none")] - pub highest_champion_damage: Option, - #[serde(rename = "highestCrowdControlScore")] - #[serde(skip_serializing_if = "Option::is_none")] - pub highest_crowd_control_score: Option, - #[serde(rename = "highestWardKills")] - #[serde(skip_serializing_if = "Option::is_none")] - pub highest_ward_kills: Option, - #[serde(rename = "junglerKillsEarlyJungle")] - #[serde(skip_serializing_if = "Option::is_none")] - pub jungler_kills_early_jungle: Option, - #[serde(rename = "killsOnLanersEarlyJungleAsJungler")] - #[serde(skip_serializing_if = "Option::is_none")] - pub kills_on_laners_early_jungle_as_jungler: Option, - #[serde(rename = "laningPhaseGoldExpAdvantage")] - #[serde(skip_serializing_if = "Option::is_none")] - pub laning_phase_gold_exp_advantage: Option, - #[serde(rename = "legendaryCount")] - #[serde(skip_serializing_if = "Option::is_none")] - pub legendary_count: Option, - #[serde(rename = "maxCsAdvantageOnLaneOpponent")] - #[serde(skip_serializing_if = "Option::is_none")] - pub max_cs_advantage_on_lane_opponent: Option, - #[serde(rename = "maxLevelLeadLaneOpponent")] - #[serde(skip_serializing_if = "Option::is_none")] - pub max_level_lead_lane_opponent: Option, - #[serde(rename = "mostWardsDestroyedOneSweeper")] - #[serde(skip_serializing_if = "Option::is_none")] - pub most_wards_destroyed_one_sweeper: Option, - #[serde(rename = "mythicItemUsed")] - #[serde(skip_serializing_if = "Option::is_none")] - pub mythic_item_used: Option, - #[serde(rename = "playedChampSelectPosition")] - #[serde(skip_serializing_if = "Option::is_none")] - pub played_champ_select_position: Option, - #[serde(rename = "soloTurretsLategame")] - #[serde(skip_serializing_if = "Option::is_none")] - pub solo_turrets_lategame: Option, - #[serde(rename = "takedownsFirst25Minutes")] - #[serde(skip_serializing_if = "Option::is_none")] - pub takedowns_first25_minutes: Option, - #[serde(rename = "teleportTakedowns")] - #[serde(skip_serializing_if = "Option::is_none")] - pub teleport_takedowns: Option, - #[serde(rename = "thirdInhibitorDestroyedTime")] - #[serde(skip_serializing_if = "Option::is_none")] - pub third_inhibitor_destroyed_time: Option, - #[serde(rename = "threeWardsOneSweeperCount")] - #[serde(skip_serializing_if = "Option::is_none")] - pub three_wards_one_sweeper_count: Option, - #[serde(rename = "visionScoreAdvantageLaneOpponent")] - #[serde(skip_serializing_if = "Option::is_none")] - pub vision_score_advantage_lane_opponent: Option, - #[serde(rename = "InfernalScalePickup")] - #[serde(skip_serializing_if = "Option::is_none")] - pub infernal_scale_pickup: Option, - #[serde(rename = "fistBumpParticipation")] - #[serde(skip_serializing_if = "Option::is_none")] - pub fist_bump_participation: Option, - #[serde(rename = "voidMonsterKill")] - #[serde(skip_serializing_if = "Option::is_none")] - pub void_monster_kill: Option, } /// Missions data object. /// # Description @@ -2080,26 +2112,9 @@ pub mod match_v5 { #[derive(serde::Serialize, serde::Deserialize)] #[cfg_attr(feature = "deny-unknown-fields", serde(deny_unknown_fields))] pub struct ParticipantFrames { - #[serde(rename = "1")] - pub x1: ParticipantFrame, - #[serde(rename = "2")] - pub x2: ParticipantFrame, - #[serde(rename = "3")] - pub x3: ParticipantFrame, - #[serde(rename = "4")] - pub x4: ParticipantFrame, - #[serde(rename = "5")] - pub x5: ParticipantFrame, - #[serde(rename = "6")] - pub x6: ParticipantFrame, - #[serde(rename = "7")] - pub x7: ParticipantFrame, - #[serde(rename = "8")] - pub x8: ParticipantFrame, - #[serde(rename = "9")] - pub x9: ParticipantFrame, - #[serde(rename = "10")] - pub x10: ParticipantFrame, + /// Key value mapping for each participant + #[serde(rename = "1-9")] + pub x1_9: ParticipantFrame, } /// ParticipantFrame data object. #[derive(Clone, Debug)] @@ -3682,6 +3697,340 @@ pub mod tournament_v5 { } } +/// Data structs used by [`ValConsoleMatchV1`](crate::endpoints::ValConsoleMatchV1). +/// +/// Note: this module is automatically generated. +#[allow(dead_code)] +pub mod val_console_match_v1 { + /// Match data object. + #[derive(Clone, Debug)] + #[derive(serde::Serialize, serde::Deserialize)] + #[cfg_attr(feature = "deny-unknown-fields", serde(deny_unknown_fields))] + pub struct Match { + #[serde(rename = "matchInfo")] + pub match_info: MatchInfo, + #[serde(rename = "players")] + pub players: std::vec::Vec, + #[serde(rename = "coaches")] + pub coaches: std::vec::Vec, + #[serde(rename = "teams")] + pub teams: std::vec::Vec, + #[serde(rename = "roundResults")] + pub round_results: std::vec::Vec, + } + /// MatchInfo data object. + #[derive(Clone, Debug)] + #[derive(serde::Serialize, serde::Deserialize)] + #[cfg_attr(feature = "deny-unknown-fields", serde(deny_unknown_fields))] + pub struct MatchInfo { + #[serde(rename = "matchId")] + pub match_id: String, + #[serde(rename = "mapId")] + pub map_id: String, + #[serde(rename = "gameLengthMillis")] + pub game_length_millis: i32, + #[serde(rename = "gameStartMillis")] + pub game_start_millis: i64, + #[serde(rename = "provisioningFlowId")] + pub provisioning_flow_id: String, + #[serde(rename = "isCompleted")] + pub is_completed: bool, + #[serde(rename = "customGameName")] + pub custom_game_name: String, + #[serde(rename = "queueId")] + pub queue_id: String, + #[serde(rename = "gameMode")] + pub game_mode: String, + #[serde(rename = "isRanked")] + pub is_ranked: bool, + #[serde(rename = "seasonId")] + pub season_id: String, + } + /// Player data object. + #[derive(Clone, Debug)] + #[derive(serde::Serialize, serde::Deserialize)] + #[cfg_attr(feature = "deny-unknown-fields", serde(deny_unknown_fields))] + pub struct Player { + #[serde(rename = "puuid")] + pub puuid: String, + #[serde(rename = "gameName")] + pub game_name: String, + #[serde(rename = "tagLine")] + pub tag_line: String, + #[serde(rename = "teamId")] + pub team_id: String, + #[serde(rename = "partyId")] + pub party_id: String, + #[serde(rename = "characterId")] + pub character_id: String, + #[serde(rename = "stats")] + pub stats: PlayerStats, + #[serde(rename = "competitiveTier")] + pub competitive_tier: i32, + #[serde(rename = "playerCard")] + pub player_card: String, + #[serde(rename = "playerTitle")] + pub player_title: String, + } + /// PlayerStats data object. + #[derive(Clone, Debug)] + #[derive(serde::Serialize, serde::Deserialize)] + #[cfg_attr(feature = "deny-unknown-fields", serde(deny_unknown_fields))] + pub struct PlayerStats { + #[serde(rename = "score")] + pub score: i32, + #[serde(rename = "roundsPlayed")] + pub rounds_played: i32, + #[serde(rename = "kills")] + pub kills: i32, + #[serde(rename = "deaths")] + pub deaths: i32, + #[serde(rename = "assists")] + pub assists: i32, + #[serde(rename = "playtimeMillis")] + pub playtime_millis: i32, + #[serde(rename = "abilityCasts")] + pub ability_casts: AbilityCasts, + } + /// AbilityCasts data object. + #[derive(Clone, Debug)] + #[derive(serde::Serialize, serde::Deserialize)] + #[cfg_attr(feature = "deny-unknown-fields", serde(deny_unknown_fields))] + pub struct AbilityCasts { + #[serde(rename = "grenadeCasts")] + pub grenade_casts: i32, + #[serde(rename = "ability1Casts")] + pub ability1_casts: i32, + #[serde(rename = "ability2Casts")] + pub ability2_casts: i32, + #[serde(rename = "ultimateCasts")] + pub ultimate_casts: i32, + } + /// Coach data object. + #[derive(Clone, Debug)] + #[derive(serde::Serialize, serde::Deserialize)] + #[cfg_attr(feature = "deny-unknown-fields", serde(deny_unknown_fields))] + pub struct Coach { + #[serde(rename = "puuid")] + pub puuid: String, + #[serde(rename = "teamId")] + pub team_id: String, + } + /// Team data object. + #[derive(Clone, Debug)] + #[derive(serde::Serialize, serde::Deserialize)] + #[cfg_attr(feature = "deny-unknown-fields", serde(deny_unknown_fields))] + 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")] + pub won: bool, + #[serde(rename = "roundsPlayed")] + 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(Clone, Debug)] + #[derive(serde::Serialize, serde::Deserialize)] + #[cfg_attr(feature = "deny-unknown-fields", serde(deny_unknown_fields))] + pub struct RoundResult { + #[serde(rename = "roundNum")] + pub round_num: i32, + #[serde(rename = "roundResult")] + pub round_result: String, + #[serde(rename = "roundCeremony")] + pub round_ceremony: String, + #[serde(rename = "winningTeam")] + pub winning_team: String, + /// PUUID of player + #[serde(rename = "bombPlanter")] + pub bomb_planter: String, + /// PUUID of player + #[serde(rename = "bombDefuser")] + pub bomb_defuser: String, + #[serde(rename = "plantRoundTime")] + pub plant_round_time: i32, + #[serde(rename = "plantPlayerLocations")] + pub plant_player_locations: std::vec::Vec, + #[serde(rename = "plantLocation")] + pub plant_location: Location, + #[serde(rename = "plantSite")] + pub plant_site: String, + #[serde(rename = "defuseRoundTime")] + pub defuse_round_time: i32, + #[serde(rename = "defusePlayerLocations")] + pub defuse_player_locations: std::vec::Vec, + #[serde(rename = "defuseLocation")] + pub defuse_location: Location, + #[serde(rename = "playerStats")] + pub player_stats: std::vec::Vec, + #[serde(rename = "roundResultCode")] + pub round_result_code: String, + } + /// PlayerLocations data object. + #[derive(Clone, Debug)] + #[derive(serde::Serialize, serde::Deserialize)] + #[cfg_attr(feature = "deny-unknown-fields", serde(deny_unknown_fields))] + pub struct PlayerLocations { + #[serde(rename = "puuid")] + pub puuid: String, + #[serde(rename = "viewRadians")] + pub view_radians: f32, + #[serde(rename = "location")] + pub location: Location, + } + /// Location data object. + #[derive(Clone, Debug)] + #[derive(serde::Serialize, serde::Deserialize)] + #[cfg_attr(feature = "deny-unknown-fields", serde(deny_unknown_fields))] + pub struct Location { + #[serde(rename = "x")] + pub x: i32, + #[serde(rename = "y")] + pub y: i32, + } + /// PlayerRoundStats data object. + #[derive(Clone, Debug)] + #[derive(serde::Serialize, serde::Deserialize)] + #[cfg_attr(feature = "deny-unknown-fields", serde(deny_unknown_fields))] + pub struct PlayerRoundStats { + #[serde(rename = "puuid")] + pub puuid: String, + #[serde(rename = "kills")] + pub kills: std::vec::Vec, + #[serde(rename = "damage")] + pub damage: std::vec::Vec, + #[serde(rename = "score")] + pub score: i32, + #[serde(rename = "economy")] + pub economy: Economy, + #[serde(rename = "ability")] + pub ability: Ability, + } + /// Kill data object. + #[derive(Clone, Debug)] + #[derive(serde::Serialize, serde::Deserialize)] + #[cfg_attr(feature = "deny-unknown-fields", serde(deny_unknown_fields))] + pub struct Kill { + #[serde(rename = "timeSinceGameStartMillis")] + pub time_since_game_start_millis: i32, + #[serde(rename = "timeSinceRoundStartMillis")] + pub time_since_round_start_millis: i32, + /// PUUID + #[serde(rename = "killer")] + pub killer: String, + /// PUUID + #[serde(rename = "victim")] + pub victim: String, + #[serde(rename = "victimLocation")] + pub victim_location: Location, + /// List of PUUIDs + #[serde(rename = "assistants")] + pub assistants: std::vec::Vec, + #[serde(rename = "playerLocations")] + pub player_locations: std::vec::Vec, + #[serde(rename = "finishingDamage")] + pub finishing_damage: FinishingDamage, + } + /// FinishingDamage data object. + #[derive(Clone, Debug)] + #[derive(serde::Serialize, serde::Deserialize)] + #[cfg_attr(feature = "deny-unknown-fields", serde(deny_unknown_fields))] + pub struct FinishingDamage { + #[serde(rename = "damageType")] + pub damage_type: String, + #[serde(rename = "damageItem")] + pub damage_item: String, + #[serde(rename = "isSecondaryFireMode")] + pub is_secondary_fire_mode: bool, + } + /// Damage data object. + #[derive(Clone, Debug)] + #[derive(serde::Serialize, serde::Deserialize)] + #[cfg_attr(feature = "deny-unknown-fields", serde(deny_unknown_fields))] + pub struct Damage { + /// PUUID + #[serde(rename = "receiver")] + pub receiver: String, + #[serde(rename = "damage")] + pub damage: i32, + #[serde(rename = "legshots")] + pub legshots: i32, + #[serde(rename = "bodyshots")] + pub bodyshots: i32, + #[serde(rename = "headshots")] + pub headshots: i32, + } + /// Economy data object. + #[derive(Clone, Debug)] + #[derive(serde::Serialize, serde::Deserialize)] + #[cfg_attr(feature = "deny-unknown-fields", serde(deny_unknown_fields))] + pub struct Economy { + #[serde(rename = "loadoutValue")] + pub loadout_value: i32, + #[serde(rename = "weapon")] + pub weapon: String, + #[serde(rename = "armor")] + pub armor: String, + #[serde(rename = "remaining")] + pub remaining: i32, + #[serde(rename = "spent")] + pub spent: i32, + } + /// Ability data object. + #[derive(Clone, Debug)] + #[derive(serde::Serialize, serde::Deserialize)] + #[cfg_attr(feature = "deny-unknown-fields", serde(deny_unknown_fields))] + pub struct Ability { + #[serde(rename = "grenadeEffects")] + pub grenade_effects: String, + #[serde(rename = "ability1Effects")] + pub ability1_effects: String, + #[serde(rename = "ability2Effects")] + pub ability2_effects: String, + #[serde(rename = "ultimateEffects")] + pub ultimate_effects: String, + } + /// Matchlist data object. + #[derive(Clone, Debug)] + #[derive(serde::Serialize, serde::Deserialize)] + #[cfg_attr(feature = "deny-unknown-fields", serde(deny_unknown_fields))] + pub struct Matchlist { + #[serde(rename = "puuid")] + pub puuid: String, + #[serde(rename = "history")] + pub history: std::vec::Vec, + } + /// MatchlistEntry data object. + #[derive(Clone, Debug)] + #[derive(serde::Serialize, serde::Deserialize)] + #[cfg_attr(feature = "deny-unknown-fields", serde(deny_unknown_fields))] + pub struct MatchlistEntry { + #[serde(rename = "matchId")] + pub match_id: String, + #[serde(rename = "gameStartTimeMillis")] + pub game_start_time_millis: i64, + #[serde(rename = "queueId")] + pub queue_id: String, + } + /// RecentMatches data object. + #[derive(Clone, Debug)] + #[derive(serde::Serialize, serde::Deserialize)] + #[cfg_attr(feature = "deny-unknown-fields", serde(deny_unknown_fields))] + pub struct RecentMatches { + #[serde(rename = "currentTime")] + pub current_time: i64, + /// A list of recent match ids. + #[serde(rename = "matchIds")] + pub match_ids: std::vec::Vec, + } +} + /// Data structs used by [`ValContentV1`](crate::endpoints::ValContentV1). /// /// Note: this module is automatically generated. @@ -4008,6 +4357,8 @@ pub mod val_match_v1 { pub player_stats: std::vec::Vec, #[serde(rename = "roundResultCode")] pub round_result_code: String, + #[serde(rename = "winningTeamRole")] + pub winning_team_role: String, } /// PlayerLocations data object. #[derive(Clone, Debug)]