mirror of
https://github.com/MingweiSamuel/Riven.git
synced 2024-12-25 18:36:31 +00:00
Regen for match-v4 removal
- Comment out match-v4 tests.
This commit is contained in:
parent
f43795c5a3
commit
9c13d126a6
5 changed files with 84 additions and 3178 deletions
|
@ -7,7 +7,7 @@
|
|||
///////////////////////////////////////////////
|
||||
|
||||
// http://www.mingweisamuel.com/riotapi-schema/tool/
|
||||
// Version 595cfab83bc31def1d3d161df5ca26f99033f539
|
||||
// Version 0715d17267a9bec35845651ad3fb702c5bcbdaa1
|
||||
|
||||
//! Automatically generated endpoint handles.
|
||||
|
||||
|
@ -142,15 +142,6 @@ impl RiotApi {
|
|||
pub fn lor_status_v1(&self) -> LorStatusV1 {
|
||||
LorStatusV1 { base: self }
|
||||
}
|
||||
/// Returns a handle for accessing [MatchV4](crate::endpoints::MatchV4) endpoints.
|
||||
/// # Riot Developer API Reference
|
||||
/// <a href="https://developer.riotgames.com/apis#match-v4" target="_blank">`match-v4`</a>
|
||||
///
|
||||
/// Note: this method is automatically generated.
|
||||
#[inline]
|
||||
pub fn match_v4(&self) -> MatchV4 {
|
||||
MatchV4 { base: self }
|
||||
}
|
||||
/// Returns a handle for accessing [MatchV5](crate::endpoints::MatchV5) endpoints.
|
||||
/// # Riot Developer API Reference
|
||||
/// <a href="https://developer.riotgames.com/apis#match-v5" target="_blank">`match-v5`</a>
|
||||
|
@ -991,136 +982,6 @@ impl<'a> LorStatusV1<'a> {
|
|||
|
||||
}
|
||||
|
||||
/// MatchV4 endpoints handle, accessed by calling [`match_v4()`](crate::RiotApi::match_v4) on a [`RiotApi`](crate::RiotApi) instance.
|
||||
/// # Riot Developer API Reference
|
||||
/// <a href="https://developer.riotgames.com/apis#match-v4" target="_blank">`match-v4`</a>
|
||||
///
|
||||
/// Note: this struct is automatically generated.
|
||||
#[repr(transparent)]
|
||||
pub struct MatchV4<'a> {
|
||||
base: &'a RiotApi,
|
||||
}
|
||||
impl<'a> MatchV4<'a> {
|
||||
/// Get match IDs by tournament code.
|
||||
/// # Parameters
|
||||
/// * `route` - Route to query.
|
||||
/// * `tournament_code` (required, in path) - The tournament code.
|
||||
/// # Riot Developer API Reference
|
||||
/// <a href="https://developer.riotgames.com/api-methods/#match-v4/GET_getMatchIdsByTournamentCode" target="_blank">`match-v4.getMatchIdsByTournamentCode`</a>
|
||||
///
|
||||
/// Note: this method is automatically generated.
|
||||
pub fn get_match_ids_by_tournament_code(&self, route: PlatformRoute, tournament_code: &str)
|
||||
-> impl Future<Output = Result<Vec<i64>>> + 'a
|
||||
{
|
||||
let route_str = route.into();
|
||||
let request = self.base.request(Method::GET, route_str, &format!("/lol/match/v4/matches/by-tournament-code/{}/ids", tournament_code));
|
||||
let future = self.base.execute_val::<Vec<i64>>("match-v4.getMatchIdsByTournamentCode", route_str, request);
|
||||
#[cfg(feature = "tracing")]
|
||||
let future = future.instrument(tracing::info_span!("match-v4.getMatchIdsByTournamentCode"));
|
||||
future
|
||||
}
|
||||
|
||||
/// Get match by match ID.
|
||||
/// # Parameters
|
||||
/// * `route` - Route to query.
|
||||
/// * `match_id` (required, in path) - The match ID.
|
||||
/// # Riot Developer API Reference
|
||||
/// <a href="https://developer.riotgames.com/api-methods/#match-v4/GET_getMatch" target="_blank">`match-v4.getMatch`</a>
|
||||
///
|
||||
/// Note: this method is automatically generated.
|
||||
pub fn get_match(&self, route: PlatformRoute, match_id: i64)
|
||||
-> impl Future<Output = Result<Option<match_v4::Match>>> + 'a
|
||||
{
|
||||
let route_str = route.into();
|
||||
let request = self.base.request(Method::GET, route_str, &format!("/lol/match/v4/matches/{}", match_id));
|
||||
let future = self.base.execute_opt::<match_v4::Match>("match-v4.getMatch", route_str, request);
|
||||
#[cfg(feature = "tracing")]
|
||||
let future = future.instrument(tracing::info_span!("match-v4.getMatch"));
|
||||
future
|
||||
}
|
||||
|
||||
/// Get match by match ID and tournament code.
|
||||
/// # Parameters
|
||||
/// * `route` - Route to query.
|
||||
/// * `tournament_code` (required, in path) - The tournament code.
|
||||
/// * `match_id` (required, in path) - The match ID.
|
||||
/// # Riot Developer API Reference
|
||||
/// <a href="https://developer.riotgames.com/api-methods/#match-v4/GET_getMatchByTournamentCode" target="_blank">`match-v4.getMatchByTournamentCode`</a>
|
||||
///
|
||||
/// Note: this method is automatically generated.
|
||||
pub fn get_match_by_tournament_code(&self, route: PlatformRoute, match_id: i64, tournament_code: &str)
|
||||
-> impl Future<Output = Result<match_v4::Match>> + 'a
|
||||
{
|
||||
let route_str = route.into();
|
||||
let request = self.base.request(Method::GET, route_str, &format!("/lol/match/v4/matches/{}/by-tournament-code/{}", match_id, tournament_code));
|
||||
let future = self.base.execute_val::<match_v4::Match>("match-v4.getMatchByTournamentCode", route_str, request);
|
||||
#[cfg(feature = "tracing")]
|
||||
let future = future.instrument(tracing::info_span!("match-v4.getMatchByTournamentCode"));
|
||||
future
|
||||
}
|
||||
|
||||
/// Get matchlist for games played on given account ID and platform ID and filtered using given filter parameters, if any.
|
||||
/// ## Implementation Notes
|
||||
/// A number of optional parameters are provided for filtering. It is up to the caller to ensure that the combination of filter parameters provided is valid for the requested account, otherwise, no matches may be returned.
|
||||
///
|
||||
/// If beginIndex is specified, but not endIndex, then endIndex defaults to beginIndex+100. If endIndex is specified, but not beginIndex, then beginIndex defaults to 0. If both are specified, then endIndex must be greater than beginIndex. The maximum range allowed is 100, otherwise a 400 error code is returned.
|
||||
///
|
||||
/// If beginTime is specified, but not endTime, then endTime defaults to the the current unix timestamp in milliseconds (the maximum time range limitation is not observed in this specific case). If endTime is specified, but not beginTime, then beginTime defaults to the start of the account's match history returning a 400 due to the maximum time range limitation. If both are specified, then endTime should be greater than beginTime. The maximum time range allowed is one week, otherwise a 400 error code is returned.
|
||||
/// # Parameters
|
||||
/// * `route` - Route to query.
|
||||
/// * `encrypted_account_id` (required, in path) - The account ID.
|
||||
/// * `champion` (optional, in query) - Set of champion IDs for filtering the matchlist.
|
||||
/// * `queue` (optional, in query) - Set of queue IDs for filtering the matchlist.
|
||||
/// * `season` (optional, in query) - [DEPRECATED] This field should not be considered reliable for the purposes of filtering matches by season.
|
||||
/// * `end_time` (optional, in query) - The end time to use for filtering matchlist specified as epoch milliseconds. If beginTime is specified, but not endTime, then endTime defaults to the the current unix timestamp in milliseconds (the maximum time range limitation is not observed in this specific case). If endTime is specified, but not beginTime, then beginTime defaults to the start of the account's match history returning a 400 due to the maximum time range limitation. If both are specified, then endTime should be greater than beginTime. The maximum time range allowed is one week, otherwise a 400 error code is returned.
|
||||
/// * `begin_time` (optional, in query) - The begin time to use for filtering matchlist specified as epoch milliseconds. If beginTime is specified, but not endTime, then endTime defaults to the the current unix timestamp in milliseconds (the maximum time range limitation is not observed in this specific case). If endTime is specified, but not beginTime, then beginTime defaults to the start of the account's match history returning a 400 due to the maximum time range limitation. If both are specified, then endTime should be greater than beginTime. The maximum time range allowed is one week, otherwise a 400 error code is returned.
|
||||
/// * `end_index` (optional, in query) - The end index to use for filtering matchlist. If beginIndex is specified, but not endIndex, then endIndex defaults to beginIndex+100. If endIndex is specified, but not beginIndex, then beginIndex defaults to 0. If both are specified, then endIndex must be greater than beginIndex. The maximum range allowed is 100, otherwise a 400 error code is returned.
|
||||
/// * `begin_index` (optional, in query) - The begin index to use for filtering matchlist. If beginIndex is specified, but not endIndex, then endIndex defaults to beginIndex+100. If endIndex is specified, but not beginIndex, then beginIndex defaults to 0. If both are specified, then endIndex must be greater than beginIndex. The maximum range allowed is 100, otherwise a 400 error code is returned.
|
||||
/// # Riot Developer API Reference
|
||||
/// <a href="https://developer.riotgames.com/api-methods/#match-v4/GET_getMatchlist" target="_blank">`match-v4.getMatchlist`</a>
|
||||
///
|
||||
/// Note: this method is automatically generated.
|
||||
pub fn get_matchlist(&self, route: PlatformRoute, encrypted_account_id: &str, begin_time: Option<i64>, begin_index: Option<i32>, champion: Option<&[crate::consts::Champion]>, end_time: Option<i64>, end_index: Option<i32>, queue: Option<&[crate::consts::Queue]>, season: Option<&[crate::consts::Season]>)
|
||||
-> impl Future<Output = Result<Option<match_v4::Matchlist>>> + 'a
|
||||
{
|
||||
let route_str = route.into();
|
||||
let request = self.base.request(Method::GET, route_str, &format!("/lol/match/v4/matchlists/by-account/{}", encrypted_account_id));
|
||||
let mut request = request; if let Some(begin_time) = begin_time { request = request.query(&[ ("beginTime", begin_time) ]); }
|
||||
let mut request = request; if let Some(begin_index) = begin_index { request = request.query(&[ ("beginIndex", begin_index) ]); }
|
||||
let mut request = request; if let Some(champion) = champion { request = request.query(&*champion.iter().map(|w| ( "champion", w )).collect::<Vec<_>>()); }
|
||||
let mut request = request; if let Some(end_time) = end_time { request = request.query(&[ ("endTime", end_time) ]); }
|
||||
let mut request = request; if let Some(end_index) = end_index { request = request.query(&[ ("endIndex", end_index) ]); }
|
||||
let mut request = request; if let Some(queue) = queue { request = request.query(&*queue.iter().map(|w| ( "queue", w )).collect::<Vec<_>>()); }
|
||||
let mut request = request; if let Some(season) = season { request = request.query(&*season.iter().map(|w| ( "season", w )).collect::<Vec<_>>()); }
|
||||
let future = self.base.execute_opt::<match_v4::Matchlist>("match-v4.getMatchlist", route_str, request);
|
||||
#[cfg(feature = "tracing")]
|
||||
let future = future.instrument(tracing::info_span!("match-v4.getMatchlist"));
|
||||
future
|
||||
}
|
||||
|
||||
/// Get match timeline by match ID.
|
||||
/// ## Implementation Notes
|
||||
/// Not all matches have timeline data.
|
||||
/// # Parameters
|
||||
/// * `route` - Route to query.
|
||||
/// * `match_id` (required, in path) - The match ID.
|
||||
/// # Riot Developer API Reference
|
||||
/// <a href="https://developer.riotgames.com/api-methods/#match-v4/GET_getMatchTimeline" target="_blank">`match-v4.getMatchTimeline`</a>
|
||||
///
|
||||
/// Note: this method is automatically generated.
|
||||
pub fn get_match_timeline(&self, route: PlatformRoute, match_id: i64)
|
||||
-> impl Future<Output = Result<Option<match_v4::MatchTimeline>>> + 'a
|
||||
{
|
||||
let route_str = route.into();
|
||||
let request = self.base.request(Method::GET, route_str, &format!("/lol/match/v4/timelines/by-match/{}", match_id));
|
||||
let future = self.base.execute_opt::<match_v4::MatchTimeline>("match-v4.getMatchTimeline", route_str, request);
|
||||
#[cfg(feature = "tracing")]
|
||||
let future = future.instrument(tracing::info_span!("match-v4.getMatchTimeline"));
|
||||
future
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// MatchV5 endpoints handle, accessed by calling [`match_v5()`](crate::RiotApi::match_v5) on a [`RiotApi`](crate::RiotApi) instance.
|
||||
/// # Riot Developer API Reference
|
||||
/// <a href="https://developer.riotgames.com/apis#match-v5" target="_blank">`match-v5`</a>
|
||||
|
|
|
@ -7,13 +7,13 @@
|
|||
///////////////////////////////////////////////
|
||||
|
||||
// http://www.mingweisamuel.com/riotapi-schema/tool/
|
||||
// Version 595cfab83bc31def1d3d161df5ca26f99033f539
|
||||
// Version 0715d17267a9bec35845651ad3fb702c5bcbdaa1
|
||||
|
||||
//! Metadata about the Riot API and Riven.
|
||||
//!
|
||||
//! Note: this modules is automatically generated.
|
||||
|
||||
pub static ALL_ENDPOINTS: [(reqwest::Method, &'static str, &'static str); 75] = [
|
||||
pub static ALL_ENDPOINTS: [(reqwest::Method, &'static str, &'static str); 70] = [
|
||||
(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"),
|
||||
|
@ -43,11 +43,6 @@ pub static ALL_ENDPOINTS: [(reqwest::Method, &'static str, &'static str); 75] =
|
|||
(reqwest::Method::GET, "/lor/match/v1/matches/{matchId}", "lor-match-v1.getMatch"),
|
||||
(reqwest::Method::GET, "/lor/ranked/v1/leaderboards", "lor-ranked-v1.getLeaderboards"),
|
||||
(reqwest::Method::GET, "/lor/status/v1/platform-data", "lor-status-v1.getPlatformData"),
|
||||
(reqwest::Method::GET, "/lol/match/v4/matches/by-tournament-code/{tournamentCode}/ids", "match-v4.getMatchIdsByTournamentCode"),
|
||||
(reqwest::Method::GET, "/lol/match/v4/matches/{matchId}", "match-v4.getMatch"),
|
||||
(reqwest::Method::GET, "/lol/match/v4/matches/{matchId}/by-tournament-code/{tournamentCode}", "match-v4.getMatchByTournamentCode"),
|
||||
(reqwest::Method::GET, "/lol/match/v4/matchlists/by-account/{encryptedAccountId}", "match-v4.getMatchlist"),
|
||||
(reqwest::Method::GET, "/lol/match/v4/timelines/by-match/{matchId}", "match-v4.getMatchTimeline"),
|
||||
(reqwest::Method::GET, "/lol/match/v5/matches/by-puuid/{puuid}/ids", "match-v5.getMatchIdsByPUUID"),
|
||||
(reqwest::Method::GET, "/lol/match/v5/matches/{matchId}", "match-v5.getMatch"),
|
||||
(reqwest::Method::GET, "/lol/match/v5/matches/{matchId}/timeline", "match-v5.getTimeline"),
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
///////////////////////////////////////////////
|
||||
|
||||
// http://www.mingweisamuel.com/riotapi-schema/tool/
|
||||
// Version 595cfab83bc31def1d3d161df5ca26f99033f539
|
||||
// Version 0715d17267a9bec35845651ad3fb702c5bcbdaa1
|
||||
|
||||
//! Data transfer structs.
|
||||
//!
|
||||
|
@ -724,748 +724,6 @@ pub mod lor_status_v1 {
|
|||
}
|
||||
}
|
||||
|
||||
/// Data structs used by [`MatchV4`](crate::endpoints::MatchV4).
|
||||
///
|
||||
/// Note: this module is automatically generated.
|
||||
#[allow(dead_code)]
|
||||
pub mod match_v4 {
|
||||
/// Match data object.
|
||||
#[derive(Debug)]
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
pub struct Match {
|
||||
#[serde(rename = "gameId")]
|
||||
pub game_id: i64,
|
||||
/// Participant identity information. Participant identity information is purposefully excluded for custom games.
|
||||
#[serde(rename = "participantIdentities")]
|
||||
pub participant_identities: std::vec::Vec<ParticipantIdentity>,
|
||||
/// Refer to the Game Constants documentation.
|
||||
#[serde(rename = "queueId")]
|
||||
pub queue_id: crate::consts::Queue,
|
||||
/// Refer to the Game Constants documentation.
|
||||
#[serde(rename = "gameType")]
|
||||
pub game_type: crate::consts::GameType,
|
||||
/// Match duration in seconds.
|
||||
#[serde(rename = "gameDuration")]
|
||||
pub game_duration: i64,
|
||||
/// Team information.
|
||||
#[serde(rename = "teams")]
|
||||
pub teams: std::vec::Vec<TeamStats>,
|
||||
/// Platform where the match was played.
|
||||
#[serde(rename = "platformId")]
|
||||
pub platform_id: String,
|
||||
/// Designates the timestamp when champion select ended and the loading screen appeared, NOT when the game timer was at 0:00.
|
||||
#[serde(rename = "gameCreation")]
|
||||
pub game_creation: i64,
|
||||
/// Refer to the Game Constants documentation.
|
||||
#[serde(rename = "seasonId")]
|
||||
pub season_id: crate::consts::Season,
|
||||
/// The major.minor version typically indicates the patch the match was played on.
|
||||
#[serde(rename = "gameVersion")]
|
||||
pub game_version: String,
|
||||
/// Refer to the Game Constants documentation.
|
||||
#[serde(rename = "mapId")]
|
||||
pub map_id: crate::consts::Map,
|
||||
/// Refer to the Game Constants documentation.
|
||||
#[serde(rename = "gameMode")]
|
||||
pub game_mode: crate::consts::GameMode,
|
||||
/// Participant information.
|
||||
#[serde(rename = "participants")]
|
||||
pub participants: std::vec::Vec<Participant>,
|
||||
}
|
||||
/// ParticipantIdentity data object.
|
||||
#[derive(Debug)]
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
pub struct ParticipantIdentity {
|
||||
#[serde(rename = "participantId")]
|
||||
pub participant_id: i32,
|
||||
/// Player information not included in the response for custom matches. Custom matches are considered private unless a tournament code was used to create the match.
|
||||
#[serde(rename = "player")]
|
||||
pub player: Player,
|
||||
}
|
||||
/// Player data object.
|
||||
#[derive(Debug)]
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
pub struct Player {
|
||||
#[serde(rename = "profileIcon")]
|
||||
pub profile_icon: i32,
|
||||
/// Player's original accountId.
|
||||
#[serde(rename = "accountId")]
|
||||
pub account_id: String,
|
||||
#[serde(rename = "matchHistoryUri")]
|
||||
pub match_history_uri: String,
|
||||
/// Player's current accountId when the match was played.
|
||||
#[serde(rename = "currentAccountId")]
|
||||
pub current_account_id: String,
|
||||
/// Player's current platformId when the match was played.
|
||||
#[serde(rename = "currentPlatformId")]
|
||||
pub current_platform_id: String,
|
||||
#[serde(rename = "summonerName")]
|
||||
pub summoner_name: String,
|
||||
/// Player's summonerId (Encrypted)
|
||||
#[serde(rename = "summonerId")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub summoner_id: Option<String>,
|
||||
/// Player's original platformId.
|
||||
#[serde(rename = "platformId")]
|
||||
pub platform_id: String,
|
||||
}
|
||||
/// TeamStats data object.
|
||||
#[derive(Debug)]
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
pub struct TeamStats {
|
||||
/// Number of towers the team destroyed.
|
||||
#[serde(rename = "towerKills")]
|
||||
pub tower_kills: i32,
|
||||
/// Number of times the team killed Rift Herald.
|
||||
#[serde(rename = "riftHeraldKills")]
|
||||
pub rift_herald_kills: i32,
|
||||
/// Flag indicating whether or not the team scored the first blood.
|
||||
#[serde(rename = "firstBlood")]
|
||||
pub first_blood: bool,
|
||||
/// Number of inhibitors the team destroyed.
|
||||
#[serde(rename = "inhibitorKills")]
|
||||
pub inhibitor_kills: i32,
|
||||
/// If match queueId has a draft, contains banned champion data, otherwise empty.
|
||||
#[serde(rename = "bans")]
|
||||
pub bans: std::vec::Vec<TeamBans>,
|
||||
/// Flag indicating whether or not the team scored the first Baron kill.
|
||||
#[serde(rename = "firstBaron")]
|
||||
pub first_baron: bool,
|
||||
/// Flag indicating whether or not the team scored the first Dragon kill.
|
||||
#[serde(rename = "firstDragon")]
|
||||
pub first_dragon: bool,
|
||||
/// For Dominion matches, specifies the points the team had at game end.
|
||||
#[serde(rename = "dominionVictoryScore")]
|
||||
pub dominion_victory_score: i32,
|
||||
/// Number of times the team killed Dragon.
|
||||
#[serde(rename = "dragonKills")]
|
||||
pub dragon_kills: i32,
|
||||
/// Number of times the team killed Baron.
|
||||
#[serde(rename = "baronKills")]
|
||||
pub baron_kills: i32,
|
||||
/// Flag indicating whether or not the team destroyed the first inhibitor.
|
||||
#[serde(rename = "firstInhibitor")]
|
||||
pub first_inhibitor: bool,
|
||||
/// Flag indicating whether or not the team destroyed the first tower.
|
||||
#[serde(rename = "firstTower")]
|
||||
pub first_tower: bool,
|
||||
/// Number of times the team killed Vilemaw.
|
||||
#[serde(rename = "vilemawKills")]
|
||||
pub vilemaw_kills: i32,
|
||||
/// Flag indicating whether or not the team scored the first Rift Herald kill.
|
||||
#[serde(rename = "firstRiftHerald")]
|
||||
pub first_rift_herald: bool,
|
||||
/// 100 for blue side. 200 for red side.
|
||||
#[serde(rename = "teamId")]
|
||||
pub team_id: crate::consts::Team,
|
||||
/// String indicating whether or not the team won. There are only two values visibile in public match history.<br>
|
||||
/// (Legal values: Fail, Win)
|
||||
#[serde(rename = "win")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub win: Option<String>,
|
||||
}
|
||||
/// TeamBans data object.
|
||||
#[derive(Debug)]
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
pub struct TeamBans {
|
||||
/// Banned championId.
|
||||
#[serde(rename = "championId")]
|
||||
pub champion_id: crate::consts::Champion,
|
||||
/// Turn during which the champion was banned.
|
||||
#[serde(rename = "pickTurn")]
|
||||
pub pick_turn: i32,
|
||||
}
|
||||
/// Participant data object.
|
||||
#[derive(Debug)]
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
pub struct Participant {
|
||||
#[serde(rename = "participantId")]
|
||||
pub participant_id: i32,
|
||||
#[serde(rename = "championId")]
|
||||
pub champion_id: crate::consts::Champion,
|
||||
/// List of legacy Rune information. Not included for matches played with Runes Reforged.
|
||||
#[serde(rename = "runes")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub runes: Option<std::vec::Vec<Rune>>,
|
||||
/// Participant statistics.
|
||||
#[serde(rename = "stats")]
|
||||
pub stats: ParticipantStats,
|
||||
/// 100 for blue side. 200 for red side.
|
||||
#[serde(rename = "teamId")]
|
||||
pub team_id: crate::consts::Team,
|
||||
/// Participant timeline data.
|
||||
#[serde(rename = "timeline")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub timeline: Option<ParticipantTimeline>,
|
||||
/// First Summoner Spell id.
|
||||
#[serde(rename = "spell1Id")]
|
||||
pub spell1_id: i32,
|
||||
/// Second Summoner Spell id.
|
||||
#[serde(rename = "spell2Id")]
|
||||
pub spell2_id: i32,
|
||||
/// Highest ranked tier achieved for the previous season in a specific subset of queueIds, if any, otherwise null. Used to display border in game loading screen. Please refer to the Ranked Info documentation.<br>
|
||||
/// (Legal values: CHALLENGER, MASTER, DIAMOND, PLATINUM, GOLD, SILVER, BRONZE, UNRANKED)
|
||||
#[serde(rename = "highestAchievedSeasonTier")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub highest_achieved_season_tier: Option<crate::consts::Tier>,
|
||||
/// List of legacy Mastery information. Not included for matches played with Runes Reforged.
|
||||
#[serde(rename = "masteries")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub masteries: Option<std::vec::Vec<Mastery>>,
|
||||
}
|
||||
/// Rune data object.
|
||||
#[derive(Debug)]
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
pub struct Rune {
|
||||
#[serde(rename = "runeId")]
|
||||
pub rune_id: i32,
|
||||
#[serde(rename = "rank")]
|
||||
pub rank: i32,
|
||||
}
|
||||
/// ParticipantStats data object.
|
||||
#[derive(Debug)]
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
pub struct ParticipantStats {
|
||||
#[serde(rename = "item0")]
|
||||
pub item0: i32,
|
||||
#[serde(rename = "item2")]
|
||||
pub item2: i32,
|
||||
#[serde(rename = "totalUnitsHealed")]
|
||||
pub total_units_healed: i32,
|
||||
#[serde(rename = "item1")]
|
||||
pub item1: i32,
|
||||
#[serde(rename = "largestMultiKill")]
|
||||
pub largest_multi_kill: i32,
|
||||
#[serde(rename = "goldEarned")]
|
||||
pub gold_earned: i32,
|
||||
#[serde(rename = "firstInhibitorKill")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub first_inhibitor_kill: Option<bool>,
|
||||
#[serde(rename = "physicalDamageTaken")]
|
||||
pub physical_damage_taken: i64,
|
||||
#[serde(rename = "nodeNeutralizeAssist")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub node_neutralize_assist: Option<i32>,
|
||||
#[serde(rename = "totalPlayerScore")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub total_player_score: Option<i32>,
|
||||
#[serde(rename = "champLevel")]
|
||||
pub champ_level: i32,
|
||||
#[serde(rename = "damageDealtToObjectives")]
|
||||
pub damage_dealt_to_objectives: i64,
|
||||
#[serde(rename = "totalDamageTaken")]
|
||||
pub total_damage_taken: i64,
|
||||
#[serde(rename = "neutralMinionsKilled")]
|
||||
pub neutral_minions_killed: i32,
|
||||
#[serde(rename = "deaths")]
|
||||
pub deaths: i32,
|
||||
#[serde(rename = "tripleKills")]
|
||||
pub triple_kills: i32,
|
||||
#[serde(rename = "magicDamageDealtToChampions")]
|
||||
pub magic_damage_dealt_to_champions: i64,
|
||||
#[serde(rename = "wardsKilled")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub wards_killed: Option<i32>,
|
||||
#[serde(rename = "pentaKills")]
|
||||
pub penta_kills: i32,
|
||||
#[serde(rename = "damageSelfMitigated")]
|
||||
pub damage_self_mitigated: i64,
|
||||
#[serde(rename = "largestCriticalStrike")]
|
||||
pub largest_critical_strike: i32,
|
||||
#[serde(rename = "nodeNeutralize")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub node_neutralize: Option<i32>,
|
||||
#[serde(rename = "totalTimeCrowdControlDealt")]
|
||||
pub total_time_crowd_control_dealt: i32,
|
||||
#[serde(rename = "firstTowerKill")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub first_tower_kill: Option<bool>,
|
||||
#[serde(rename = "magicDamageDealt")]
|
||||
pub magic_damage_dealt: i64,
|
||||
#[serde(rename = "totalScoreRank")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub total_score_rank: Option<i32>,
|
||||
#[serde(rename = "nodeCapture")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub node_capture: Option<i32>,
|
||||
#[serde(rename = "wardsPlaced")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub wards_placed: Option<i32>,
|
||||
#[serde(rename = "totalDamageDealt")]
|
||||
pub total_damage_dealt: i64,
|
||||
#[serde(rename = "timeCCingOthers")]
|
||||
pub time_c_cing_others: i64,
|
||||
#[serde(rename = "magicalDamageTaken")]
|
||||
pub magical_damage_taken: i64,
|
||||
#[serde(rename = "largestKillingSpree")]
|
||||
pub largest_killing_spree: i32,
|
||||
#[serde(rename = "totalDamageDealtToChampions")]
|
||||
pub total_damage_dealt_to_champions: i64,
|
||||
#[serde(rename = "physicalDamageDealtToChampions")]
|
||||
pub physical_damage_dealt_to_champions: i64,
|
||||
#[serde(rename = "neutralMinionsKilledTeamJungle")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub neutral_minions_killed_team_jungle: Option<i32>,
|
||||
#[serde(rename = "totalMinionsKilled")]
|
||||
pub total_minions_killed: i32,
|
||||
#[serde(rename = "firstInhibitorAssist")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub first_inhibitor_assist: Option<bool>,
|
||||
#[serde(rename = "visionWardsBoughtInGame")]
|
||||
pub vision_wards_bought_in_game: i32,
|
||||
#[serde(rename = "objectivePlayerScore")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub objective_player_score: Option<i32>,
|
||||
#[serde(rename = "kills")]
|
||||
pub kills: i32,
|
||||
#[serde(rename = "firstTowerAssist")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub first_tower_assist: Option<bool>,
|
||||
#[serde(rename = "combatPlayerScore")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub combat_player_score: Option<i32>,
|
||||
#[serde(rename = "inhibitorKills")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub inhibitor_kills: Option<i32>,
|
||||
#[serde(rename = "turretKills")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub turret_kills: Option<i32>,
|
||||
#[serde(rename = "participantId")]
|
||||
pub participant_id: i32,
|
||||
#[serde(rename = "trueDamageTaken")]
|
||||
pub true_damage_taken: i64,
|
||||
#[serde(rename = "firstBloodAssist")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub first_blood_assist: Option<bool>,
|
||||
#[serde(rename = "nodeCaptureAssist")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub node_capture_assist: Option<i32>,
|
||||
#[serde(rename = "assists")]
|
||||
pub assists: i32,
|
||||
#[serde(rename = "teamObjective")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub team_objective: Option<i32>,
|
||||
#[serde(rename = "altarsNeutralized")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub altars_neutralized: Option<i32>,
|
||||
#[serde(rename = "goldSpent")]
|
||||
pub gold_spent: i32,
|
||||
#[serde(rename = "damageDealtToTurrets")]
|
||||
pub damage_dealt_to_turrets: i64,
|
||||
#[serde(rename = "altarsCaptured")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub altars_captured: Option<i32>,
|
||||
#[serde(rename = "win")]
|
||||
pub win: bool,
|
||||
#[serde(rename = "totalHeal")]
|
||||
pub total_heal: i64,
|
||||
#[serde(rename = "unrealKills")]
|
||||
pub unreal_kills: i32,
|
||||
#[serde(rename = "visionScore")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub vision_score: Option<i64>,
|
||||
#[serde(rename = "physicalDamageDealt")]
|
||||
pub physical_damage_dealt: i64,
|
||||
#[serde(rename = "firstBloodKill")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub first_blood_kill: Option<bool>,
|
||||
#[serde(rename = "longestTimeSpentLiving")]
|
||||
pub longest_time_spent_living: i32,
|
||||
#[serde(rename = "killingSprees")]
|
||||
pub killing_sprees: i32,
|
||||
#[serde(rename = "sightWardsBoughtInGame")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub sight_wards_bought_in_game: Option<i32>,
|
||||
#[serde(rename = "trueDamageDealtToChampions")]
|
||||
pub true_damage_dealt_to_champions: i64,
|
||||
#[serde(rename = "neutralMinionsKilledEnemyJungle")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub neutral_minions_killed_enemy_jungle: Option<i32>,
|
||||
#[serde(rename = "doubleKills")]
|
||||
pub double_kills: i32,
|
||||
#[serde(rename = "trueDamageDealt")]
|
||||
pub true_damage_dealt: i64,
|
||||
#[serde(rename = "quadraKills")]
|
||||
pub quadra_kills: i32,
|
||||
#[serde(rename = "item4")]
|
||||
pub item4: i32,
|
||||
#[serde(rename = "item3")]
|
||||
pub item3: i32,
|
||||
#[serde(rename = "item6")]
|
||||
pub item6: i32,
|
||||
#[serde(rename = "item5")]
|
||||
pub item5: i32,
|
||||
#[serde(rename = "playerScore0")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub player_score0: Option<i32>,
|
||||
#[serde(rename = "playerScore1")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub player_score1: Option<i32>,
|
||||
#[serde(rename = "playerScore2")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub player_score2: Option<i32>,
|
||||
#[serde(rename = "playerScore3")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub player_score3: Option<i32>,
|
||||
#[serde(rename = "playerScore4")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub player_score4: Option<i32>,
|
||||
#[serde(rename = "playerScore5")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub player_score5: Option<i32>,
|
||||
#[serde(rename = "playerScore6")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub player_score6: Option<i32>,
|
||||
#[serde(rename = "playerScore7")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub player_score7: Option<i32>,
|
||||
#[serde(rename = "playerScore8")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub player_score8: Option<i32>,
|
||||
#[serde(rename = "playerScore9")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub player_score9: Option<i32>,
|
||||
/// Primary path keystone rune.
|
||||
#[serde(rename = "perk0")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub perk0: Option<i32>,
|
||||
/// Post game rune stats.
|
||||
#[serde(rename = "perk0Var1")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub perk0_var1: Option<i32>,
|
||||
/// Post game rune stats.
|
||||
#[serde(rename = "perk0Var2")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub perk0_var2: Option<i32>,
|
||||
/// Post game rune stats.
|
||||
#[serde(rename = "perk0Var3")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub perk0_var3: Option<i32>,
|
||||
/// Primary path rune.
|
||||
#[serde(rename = "perk1")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub perk1: Option<i32>,
|
||||
/// Post game rune stats.
|
||||
#[serde(rename = "perk1Var1")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub perk1_var1: Option<i32>,
|
||||
/// Post game rune stats.
|
||||
#[serde(rename = "perk1Var2")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub perk1_var2: Option<i32>,
|
||||
/// Post game rune stats.
|
||||
#[serde(rename = "perk1Var3")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub perk1_var3: Option<i32>,
|
||||
/// Primary path rune.
|
||||
#[serde(rename = "perk2")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub perk2: Option<i32>,
|
||||
/// Post game rune stats.
|
||||
#[serde(rename = "perk2Var1")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub perk2_var1: Option<i32>,
|
||||
/// Post game rune stats.
|
||||
#[serde(rename = "perk2Var2")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub perk2_var2: Option<i32>,
|
||||
/// Post game rune stats.
|
||||
#[serde(rename = "perk2Var3")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub perk2_var3: Option<i32>,
|
||||
/// Primary path rune.
|
||||
#[serde(rename = "perk3")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub perk3: Option<i32>,
|
||||
/// Post game rune stats.
|
||||
#[serde(rename = "perk3Var1")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub perk3_var1: Option<i32>,
|
||||
/// Post game rune stats.
|
||||
#[serde(rename = "perk3Var2")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub perk3_var2: Option<i32>,
|
||||
/// Post game rune stats.
|
||||
#[serde(rename = "perk3Var3")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub perk3_var3: Option<i32>,
|
||||
/// Secondary path rune.
|
||||
#[serde(rename = "perk4")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub perk4: Option<i32>,
|
||||
/// Post game rune stats.
|
||||
#[serde(rename = "perk4Var1")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub perk4_var1: Option<i32>,
|
||||
/// Post game rune stats.
|
||||
#[serde(rename = "perk4Var2")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub perk4_var2: Option<i32>,
|
||||
/// Post game rune stats.
|
||||
#[serde(rename = "perk4Var3")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub perk4_var3: Option<i32>,
|
||||
/// Secondary path rune.
|
||||
#[serde(rename = "perk5")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub perk5: Option<i32>,
|
||||
/// Post game rune stats.
|
||||
#[serde(rename = "perk5Var1")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub perk5_var1: Option<i32>,
|
||||
/// Post game rune stats.
|
||||
#[serde(rename = "perk5Var2")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub perk5_var2: Option<i32>,
|
||||
/// Post game rune stats.
|
||||
#[serde(rename = "perk5Var3")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub perk5_var3: Option<i32>,
|
||||
/// Primary rune path
|
||||
#[serde(rename = "perkPrimaryStyle")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub perk_primary_style: Option<i32>,
|
||||
/// Secondary rune path
|
||||
#[serde(rename = "perkSubStyle")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub perk_sub_style: Option<i32>,
|
||||
/// Stat rune
|
||||
#[serde(rename = "statPerk0")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub stat_perk0: Option<i32>,
|
||||
/// Stat rune
|
||||
#[serde(rename = "statPerk1")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub stat_perk1: Option<i32>,
|
||||
/// Stat rune
|
||||
#[serde(rename = "statPerk2")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub stat_perk2: Option<i32>,
|
||||
}
|
||||
/// ParticipantTimeline data object.
|
||||
#[derive(Debug)]
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
pub struct ParticipantTimeline {
|
||||
#[serde(rename = "participantId")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub participant_id: Option<i32>,
|
||||
/// Creep score difference versus the calculated lane opponent(s) for a specified period.
|
||||
#[serde(rename = "csDiffPerMinDeltas")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub cs_diff_per_min_deltas: Option<std::collections::HashMap<String, f64>>,
|
||||
/// Damage taken for a specified period.
|
||||
#[serde(rename = "damageTakenPerMinDeltas")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub damage_taken_per_min_deltas: Option<std::collections::HashMap<String, f64>>,
|
||||
/// Participant's calculated role.<br>
|
||||
/// (Legal values: DUO, NONE, SOLO, DUO_CARRY, DUO_SUPPORT)
|
||||
#[serde(rename = "role")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub role: Option<String>,
|
||||
/// Damage taken difference versus the calculated lane opponent(s) for a specified period.
|
||||
#[serde(rename = "damageTakenDiffPerMinDeltas")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub damage_taken_diff_per_min_deltas: Option<std::collections::HashMap<String, f64>>,
|
||||
/// Experience change for a specified period.
|
||||
#[serde(rename = "xpPerMinDeltas")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub xp_per_min_deltas: Option<std::collections::HashMap<String, f64>>,
|
||||
/// Experience difference versus the calculated lane opponent(s) for a specified period.
|
||||
#[serde(rename = "xpDiffPerMinDeltas")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub xp_diff_per_min_deltas: Option<std::collections::HashMap<String, f64>>,
|
||||
/// Participant's calculated lane. MID and BOT are legacy values.<br>
|
||||
/// (Legal values: MID, MIDDLE, TOP, JUNGLE, BOT, BOTTOM)
|
||||
#[serde(rename = "lane")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub lane: Option<String>,
|
||||
/// Creeps for a specified period.
|
||||
#[serde(rename = "creepsPerMinDeltas")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub creeps_per_min_deltas: Option<std::collections::HashMap<String, f64>>,
|
||||
/// Gold for a specified period.
|
||||
#[serde(rename = "goldPerMinDeltas")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub gold_per_min_deltas: Option<std::collections::HashMap<String, f64>>,
|
||||
}
|
||||
/// Mastery data object.
|
||||
#[derive(Debug)]
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
pub struct Mastery {
|
||||
#[serde(rename = "rank")]
|
||||
pub rank: i32,
|
||||
#[serde(rename = "masteryId")]
|
||||
pub mastery_id: i32,
|
||||
}
|
||||
/// Matchlist data object.
|
||||
#[derive(Debug)]
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
pub struct Matchlist {
|
||||
#[serde(rename = "startIndex")]
|
||||
pub start_index: i32,
|
||||
/// There is a known issue that this field doesn't correctly return the total number of games that match the parameters of the request. Please paginate using beginIndex until you reach the end of a player's matchlist.
|
||||
#[serde(rename = "totalGames")]
|
||||
pub total_games: i32,
|
||||
#[serde(rename = "endIndex")]
|
||||
pub end_index: i32,
|
||||
#[serde(rename = "matches")]
|
||||
pub matches: std::vec::Vec<MatchReference>,
|
||||
}
|
||||
/// MatchReference data object.
|
||||
#[derive(Debug)]
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
pub struct MatchReference {
|
||||
#[serde(rename = "gameId")]
|
||||
pub game_id: i64,
|
||||
#[serde(rename = "role")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub role: Option<String>,
|
||||
#[serde(rename = "season")]
|
||||
pub season: i32,
|
||||
#[serde(rename = "platformId")]
|
||||
pub platform_id: String,
|
||||
#[serde(rename = "champion")]
|
||||
pub champion: crate::consts::Champion,
|
||||
#[serde(rename = "queue")]
|
||||
pub queue: crate::consts::Queue,
|
||||
#[serde(rename = "lane")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub lane: Option<String>,
|
||||
#[serde(rename = "timestamp")]
|
||||
pub timestamp: i64,
|
||||
}
|
||||
/// MatchTimeline data object.
|
||||
#[derive(Debug)]
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
pub struct MatchTimeline {
|
||||
#[serde(rename = "frames")]
|
||||
pub frames: std::vec::Vec<MatchFrame>,
|
||||
#[serde(rename = "frameInterval")]
|
||||
pub frame_interval: i64,
|
||||
}
|
||||
/// MatchFrame data object.
|
||||
#[derive(Debug)]
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
pub struct MatchFrame {
|
||||
#[serde(rename = "participantFrames")]
|
||||
pub participant_frames: std::collections::HashMap<String, MatchParticipantFrame>,
|
||||
#[serde(rename = "events")]
|
||||
pub events: std::vec::Vec<MatchEvent>,
|
||||
#[serde(rename = "timestamp")]
|
||||
pub timestamp: i64,
|
||||
}
|
||||
/// MatchParticipantFrame data object.
|
||||
#[derive(Debug)]
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
pub struct MatchParticipantFrame {
|
||||
#[serde(rename = "participantId")]
|
||||
pub participant_id: i32,
|
||||
#[serde(rename = "minionsKilled")]
|
||||
pub minions_killed: i32,
|
||||
#[serde(rename = "teamScore")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub team_score: Option<i32>,
|
||||
#[serde(rename = "dominionScore")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub dominion_score: Option<i32>,
|
||||
#[serde(rename = "totalGold")]
|
||||
pub total_gold: i32,
|
||||
#[serde(rename = "level")]
|
||||
pub level: i32,
|
||||
#[serde(rename = "xp")]
|
||||
pub xp: i32,
|
||||
#[serde(rename = "currentGold")]
|
||||
pub current_gold: i32,
|
||||
#[serde(rename = "position")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub position: Option<MatchPosition>,
|
||||
#[serde(rename = "jungleMinionsKilled")]
|
||||
pub jungle_minions_killed: i32,
|
||||
}
|
||||
/// MatchPosition data object.
|
||||
#[derive(Debug)]
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
pub struct MatchPosition {
|
||||
#[serde(rename = "x")]
|
||||
pub x: i32,
|
||||
#[serde(rename = "y")]
|
||||
pub y: i32,
|
||||
}
|
||||
/// MatchEvent data object.
|
||||
#[derive(Debug)]
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
pub struct MatchEvent {
|
||||
#[serde(rename = "laneType")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub lane_type: Option<String>,
|
||||
#[serde(rename = "skillSlot")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub skill_slot: Option<i32>,
|
||||
#[serde(rename = "ascendedType")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub ascended_type: Option<String>,
|
||||
#[serde(rename = "creatorId")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub creator_id: Option<i32>,
|
||||
#[serde(rename = "afterId")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub after_id: Option<i32>,
|
||||
#[serde(rename = "eventType")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub event_type: Option<String>,
|
||||
/// (Legal values: CHAMPION_KILL, WARD_PLACED, WARD_KILL, BUILDING_KILL, ELITE_MONSTER_KILL, ITEM_PURCHASED, ITEM_SOLD, ITEM_DESTROYED, ITEM_UNDO, SKILL_LEVEL_UP, ASCENDED_EVENT, CAPTURE_POINT, PORO_KING_SUMMON)
|
||||
#[serde(rename = "type")]
|
||||
pub r#type: String,
|
||||
#[serde(rename = "levelUpType")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub level_up_type: Option<String>,
|
||||
#[serde(rename = "wardType")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub ward_type: Option<String>,
|
||||
#[serde(rename = "participantId")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub participant_id: Option<i32>,
|
||||
#[serde(rename = "towerType")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub tower_type: Option<String>,
|
||||
#[serde(rename = "itemId")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub item_id: Option<i32>,
|
||||
#[serde(rename = "beforeId")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub before_id: Option<i32>,
|
||||
#[serde(rename = "pointCaptured")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub point_captured: Option<String>,
|
||||
#[serde(rename = "monsterType")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub monster_type: Option<String>,
|
||||
#[serde(rename = "monsterSubType")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub monster_sub_type: Option<String>,
|
||||
#[serde(rename = "teamId")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub team_id: Option<crate::consts::Team>,
|
||||
#[serde(rename = "position")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub position: Option<MatchPosition>,
|
||||
#[serde(rename = "killerId")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub killer_id: Option<i32>,
|
||||
#[serde(rename = "timestamp")]
|
||||
pub timestamp: i64,
|
||||
#[serde(rename = "assistingParticipantIds")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub assisting_participant_ids: Option<std::vec::Vec<i32>>,
|
||||
#[serde(rename = "buildingType")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub building_type: Option<String>,
|
||||
#[serde(rename = "victimId")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub victim_id: Option<i32>,
|
||||
}
|
||||
}
|
||||
|
||||
/// Data structs used by [`MatchV5`](crate::endpoints::MatchV5).
|
||||
///
|
||||
/// Note: this module is automatically generated.
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -48,84 +48,86 @@ async_tests!{
|
|||
Ok(())
|
||||
},
|
||||
|
||||
matchlist_get: async {
|
||||
let sp = RIOT_API.summoner_v4().get_by_summoner_name(ROUTE, "haha yes");
|
||||
let s = sp.await.map_err(|e| e.to_string())?.ok_or("Failed to get \"haha yes\"".to_owned())?;
|
||||
let mp = RIOT_API.match_v4().get_matchlist(ROUTE, &s.account_id, None, Some(2500), None, None, Some(2600), None, None);
|
||||
let m = mp.await.map_err(|e| e.to_string())?.ok_or("Failed to get matchlist".to_owned())?;
|
||||
rassert!(m.matches.len() > 0, "Matchlist should not be empty");
|
||||
Ok(())
|
||||
},
|
||||
matchlist_get2: async {
|
||||
let sp = RIOT_API.summoner_v4().get_by_summoner_name(ROUTE, "haha yes");
|
||||
let s = sp.await.map_err(|e| e.to_string())?.ok_or("Failed to get \"haha yes\"".to_owned())?;
|
||||
let mp = RIOT_API.match_v4().get_matchlist(ROUTE, &s.account_id, None, None, Some(&[ Champion::SION, Champion::SIVIR, Champion::CASSIOPEIA ]), None, None, None, None);
|
||||
let m = mp.await.map_err(|e| e.to_string())?.ok_or("Failed to get matchlist".to_owned())?;
|
||||
rassert!(m.matches.len() > 0, "Matchlist should not be empty");
|
||||
Ok(())
|
||||
},
|
||||
// TODO: MATCH-V4 REMOVED.
|
||||
// matchlist_get: async {
|
||||
// let sp = RIOT_API.summoner_v4().get_by_summoner_name(ROUTE, "haha yes");
|
||||
// let s = sp.await.map_err(|e| e.to_string())?.ok_or("Failed to get \"haha yes\"".to_owned())?;
|
||||
// let mp = RIOT_API.match_v4().get_matchlist(ROUTE, &s.account_id, None, Some(2500), None, None, Some(2600), None, None);
|
||||
// let m = mp.await.map_err(|e| e.to_string())?.ok_or("Failed to get matchlist".to_owned())?;
|
||||
// rassert!(m.matches.len() > 0, "Matchlist should not be empty");
|
||||
// Ok(())
|
||||
// },
|
||||
// matchlist_get2: async {
|
||||
// let sp = RIOT_API.summoner_v4().get_by_summoner_name(ROUTE, "haha yes");
|
||||
// let s = sp.await.map_err(|e| e.to_string())?.ok_or("Failed to get \"haha yes\"".to_owned())?;
|
||||
// let mp = RIOT_API.match_v4().get_matchlist(ROUTE, &s.account_id, None, None, Some(&[ Champion::SION, Champion::SIVIR, Champion::CASSIOPEIA ]), None, None, None, None);
|
||||
// let m = mp.await.map_err(|e| e.to_string())?.ok_or("Failed to get matchlist".to_owned())?;
|
||||
// rassert!(m.matches.len() > 0, "Matchlist should not be empty");
|
||||
// Ok(())
|
||||
// },
|
||||
|
||||
match_get: async {
|
||||
let p = RIOT_API.match_v4().get_match(ROUTE, 3190191338);
|
||||
let m = p.await.map_err(|e| e.to_string())?.ok_or("Match not found.".to_owned())?;
|
||||
rassert!(!m.participants.is_empty(), "Match should have participants.");
|
||||
Ok(())
|
||||
},
|
||||
match_get_bots: async {
|
||||
let p = RIOT_API.match_v4().get_match(ROUTE, 3251803350);
|
||||
let m = p.await.map_err(|e| e.to_string())?.ok_or("Match not found.".to_owned())?;
|
||||
rassert!(!m.participants.is_empty(), "Match should have participants.");
|
||||
Ok(())
|
||||
},
|
||||
match_get_odyssey: async {
|
||||
let p = RIOT_API.match_v4().get_match(ROUTE, 2881976826);
|
||||
let m = p.await.map_err(|e| e.to_string())?.ok_or("Match not found.".to_owned())?;
|
||||
rassert!(!m.participants.is_empty(), "Match should have participants.");
|
||||
Ok(())
|
||||
},
|
||||
match_get_aram: async {
|
||||
let p = RIOT_API.match_v4().get_match(ROUTE, 2961635718);
|
||||
let m = p.await.map_err(|e| e.to_string())?.ok_or("Failed to get match.".to_owned())?;
|
||||
rassert!(!m.participants.is_empty(), "Match should have participants.");
|
||||
Ok(())
|
||||
},
|
||||
match_get_aram2: async {
|
||||
let p = RIOT_API.match_v4().get_match(ROUTE, 3596184782);
|
||||
let m = p.await.map_err(|e| e.to_string())?.ok_or("Match not found.".to_owned())?;
|
||||
rassert!(!m.participants.is_empty(), "Match should have participants.");
|
||||
Ok(())
|
||||
},
|
||||
match_get_urf900: async {
|
||||
let p = RIOT_API.match_v4().get_match(ROUTE, 2963663381);
|
||||
let m = p.await.map_err(|e| e.to_string())?.ok_or("Failed to get match.".to_owned())?;
|
||||
rassert!(!m.participants.is_empty(), "Match should have participants.");
|
||||
Ok(())
|
||||
},
|
||||
match_get_tutorial1: async {
|
||||
let p = RIOT_API.match_v4().get_match(ROUTE, 3432145099);
|
||||
let m = p.await.map_err(|e| e.to_string())?.ok_or("Failed to get match.".to_owned())?;
|
||||
rassert!(!m.participants.is_empty(), "Match should have participants.");
|
||||
Ok(())
|
||||
},
|
||||
match_get_tutorial2: async {
|
||||
let p = RIOT_API.match_v4().get_match(ROUTE, 3432116214);
|
||||
let m = p.await.map_err(|e| e.to_string())?.ok_or("Failed to get match.".to_owned())?;
|
||||
rassert!(!m.participants.is_empty(), "Match should have participants.");
|
||||
Ok(())
|
||||
},
|
||||
match_get_tutorial3: async {
|
||||
let p = RIOT_API.match_v4().get_match(ROUTE, 3432156790);
|
||||
let m = p.await.map_err(|e| e.to_string())?.ok_or("Failed to get match.".to_owned())?;
|
||||
rassert!(!m.participants.is_empty(), "Match should have participants.");
|
||||
Ok(())
|
||||
},
|
||||
// match_get: async {
|
||||
// let p = RIOT_API.match_v4().get_match(ROUTE, 3190191338);
|
||||
// let m = p.await.map_err(|e| e.to_string())?.ok_or("Match not found.".to_owned())?;
|
||||
// rassert!(!m.participants.is_empty(), "Match should have participants.");
|
||||
// Ok(())
|
||||
// },
|
||||
// match_get_bots: async {
|
||||
// let p = RIOT_API.match_v4().get_match(ROUTE, 3251803350);
|
||||
// let m = p.await.map_err(|e| e.to_string())?.ok_or("Match not found.".to_owned())?;
|
||||
// rassert!(!m.participants.is_empty(), "Match should have participants.");
|
||||
// Ok(())
|
||||
// },
|
||||
// match_get_odyssey: async {
|
||||
// let p = RIOT_API.match_v4().get_match(ROUTE, 2881976826);
|
||||
// let m = p.await.map_err(|e| e.to_string())?.ok_or("Match not found.".to_owned())?;
|
||||
// rassert!(!m.participants.is_empty(), "Match should have participants.");
|
||||
// Ok(())
|
||||
// },
|
||||
// match_get_aram: async {
|
||||
// let p = RIOT_API.match_v4().get_match(ROUTE, 2961635718);
|
||||
// let m = p.await.map_err(|e| e.to_string())?.ok_or("Failed to get match.".to_owned())?;
|
||||
// rassert!(!m.participants.is_empty(), "Match should have participants.");
|
||||
// Ok(())
|
||||
// },
|
||||
// match_get_aram2: async {
|
||||
// let p = RIOT_API.match_v4().get_match(ROUTE, 3596184782);
|
||||
// let m = p.await.map_err(|e| e.to_string())?.ok_or("Match not found.".to_owned())?;
|
||||
// rassert!(!m.participants.is_empty(), "Match should have participants.");
|
||||
// Ok(())
|
||||
// },
|
||||
// match_get_urf900: async {
|
||||
// let p = RIOT_API.match_v4().get_match(ROUTE, 2963663381);
|
||||
// let m = p.await.map_err(|e| e.to_string())?.ok_or("Failed to get match.".to_owned())?;
|
||||
// rassert!(!m.participants.is_empty(), "Match should have participants.");
|
||||
// Ok(())
|
||||
// },
|
||||
// match_get_tutorial1: async {
|
||||
// let p = RIOT_API.match_v4().get_match(ROUTE, 3432145099);
|
||||
// let m = p.await.map_err(|e| e.to_string())?.ok_or("Failed to get match.".to_owned())?;
|
||||
// rassert!(!m.participants.is_empty(), "Match should have participants.");
|
||||
// Ok(())
|
||||
// },
|
||||
// match_get_tutorial2: async {
|
||||
// let p = RIOT_API.match_v4().get_match(ROUTE, 3432116214);
|
||||
// let m = p.await.map_err(|e| e.to_string())?.ok_or("Failed to get match.".to_owned())?;
|
||||
// rassert!(!m.participants.is_empty(), "Match should have participants.");
|
||||
// Ok(())
|
||||
// },
|
||||
// match_get_tutorial3: async {
|
||||
// let p = RIOT_API.match_v4().get_match(ROUTE, 3432156790);
|
||||
// let m = p.await.map_err(|e| e.to_string())?.ok_or("Failed to get match.".to_owned())?;
|
||||
// rassert!(!m.participants.is_empty(), "Match should have participants.");
|
||||
// Ok(())
|
||||
// },
|
||||
|
||||
// match_gettimeline: async {
|
||||
// let p = RIOT_API.match_v4().get_match_timeline(ROUTE, 3190191338);
|
||||
// let m = p.await.map_err(|e| e.to_string())?.ok_or("Match timeline not found.".to_owned())?;
|
||||
// rassert!(!m.frames.is_empty(), "Match timeline should have frames.");
|
||||
// Ok(())
|
||||
// },
|
||||
|
||||
match_gettimeline: async {
|
||||
let p = RIOT_API.match_v4().get_match_timeline(ROUTE, 3190191338);
|
||||
let m = p.await.map_err(|e| e.to_string())?.ok_or("Match timeline not found.".to_owned())?;
|
||||
rassert!(!m.frames.is_empty(), "Match timeline should have frames.");
|
||||
Ok(())
|
||||
},
|
||||
// Commented out, requires special API key.
|
||||
// // LOR
|
||||
// lor_ranked_get_leaderboards: async {
|
||||
|
|
Loading…
Reference in a new issue