From 8dbcca434d23a633fe7d9acc3a9b486593573733 Mon Sep 17 00:00:00 2001 From: Mingwei Samuel Date: Fri, 23 Jul 2021 15:31:02 -0700 Subject: [PATCH] Cleanup tracing formatting, regen --- src/consts/champion.rs | 5 + src/consts/game_mode.rs | 2 + src/consts/queue.rs | 2 + src/endpoints.rs | 452 +++++++--------------------------------- src/meta.rs | 2 +- src/models.rs | 336 ++++++++++++++--------------- srcgen/endpoints.rs.dt | 6 +- 7 files changed, 255 insertions(+), 550 deletions(-) diff --git a/src/consts/champion.rs b/src/consts/champion.rs index 3719005..a71ecf9 100644 --- a/src/consts/champion.rs +++ b/src/consts/champion.rs @@ -20,6 +20,7 @@ newtype_enum! { /// `AATROX` | "Aatrox" | "Aatrox" | 266 /// `AHRI` | "Ahri" | "Ahri" | 103 /// `AKALI` | "Akali" | "Akali" | 84 + /// `AKSHAN` | "Akshan" | "Akshan" | 166 /// `ALISTAR` | "Alistar" | "Alistar" | 12 /// `AMUMU` | "Amumu" | "Amumu" | 32 /// `ANIVIA` | "Anivia" | "Anivia" | 34 @@ -178,6 +179,7 @@ newtype_enum! { AATROX = 266, AHRI = 103, AKALI = 84, + AKSHAN = 166, ALISTAR = 12, AMUMU = 32, ANIVIA = 34, @@ -340,6 +342,7 @@ impl Champion { Self::AATROX => Some("Aatrox"), Self::AHRI => Some("Ahri"), Self::AKALI => Some("Akali"), + Self::AKSHAN => Some("Akshan"), Self::ALISTAR => Some("Alistar"), Self::AMUMU => Some("Amumu"), Self::ANIVIA => Some("Anivia"), @@ -517,6 +520,7 @@ impl Champion { Self::AATROX => Some("Aatrox"), Self::AHRI => Some("Ahri"), Self::AKALI => Some("Akali"), + Self::AKSHAN => Some("Akshan"), Self::ALISTAR => Some("Alistar"), Self::AMUMU => Some("Amumu"), Self::ANIVIA => Some("Anivia"), @@ -685,6 +689,7 @@ impl std::str::FromStr for Champion { 0x41415452 /* AATR */ => Ok(Champion::AATROX), 0x41485249 /* AHRI */ => Ok(Champion::AHRI), 0x414b414c /* AKAL */ => Ok(Champion::AKALI), + 0x414b5348 /* AKSH */ => Ok(Champion::AKSHAN), 0x414c4953 /* ALIS */ => Ok(Champion::ALISTAR), 0x414d554d /* AMUM */ => Ok(Champion::AMUMU), 0x414e4956 /* ANIV */ => Ok(Champion::ANIVIA), diff --git a/src/consts/game_mode.rs b/src/consts/game_mode.rs index d893fdc..fea1f86 100644 --- a/src/consts/game_mode.rs +++ b/src/consts/game_mode.rs @@ -62,6 +62,8 @@ pub enum GameMode { TUTORIAL_MODULE_2, /// Tutorial: Shop for Gear. TUTORIAL_MODULE_3, + /// Ultimate Spellbook games. + ULTBOOK, /// URF games URF, } diff --git a/src/consts/queue.rs b/src/consts/queue.rs index 854d3c9..f774fbe 100644 --- a/src/consts/queue.rs +++ b/src/consts/queue.rs @@ -237,6 +237,8 @@ newtype_enum! { NEXUS_BLITZ_NEXUS_BLITZ_DEPRECATED_1200 = 1200, /// Nexus Blitz games on Nexus Blitz NEXUS_BLITZ_NEXUS_BLITZ = 1300, + /// Ultimate Spellbook games on Summoner's Rift + SUMMONERS_RIFT_ULTIMATE_SPELLBOOK = 1400, /// Tutorial 1 games on Summoner's Rift SUMMONERS_RIFT_TUTORIAL_1 = 2000, /// Tutorial 2 games on Summoner's Rift diff --git a/src/endpoints.rs b/src/endpoints.rs index de6717d..ecb37d9 100644 --- a/src/endpoints.rs +++ b/src/endpoints.rs @@ -7,7 +7,7 @@ /////////////////////////////////////////////// // http://www.mingweisamuel.com/riotapi-schema/tool/ -// Version 8fec9617c247f0ee5c96feecc8526fdc9dca0369 +// Version 653f68e2d03da44548ff93bc4ffe558e5e70e906 //! Automatically generated endpoint handles. @@ -293,13 +293,9 @@ impl<'a> AccountV1<'a> { { let route_str = route.into(); let request = self.base.request(Method::GET, route_str, &format!("/riot/account/v1/accounts/by-puuid/{}", puuid)); - let future = self - .base - .execute_val::("account-v1.getByPuuid", route_str, request); - + let future = self.base.execute_val::("account-v1.getByPuuid", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("account-v1.getByPuuid")); - future } @@ -317,13 +313,9 @@ impl<'a> AccountV1<'a> { { let route_str = route.into(); let request = self.base.request(Method::GET, route_str, &format!("/riot/account/v1/accounts/by-riot-id/{}/{}", game_name, tag_line)); - let future = self - .base - .execute_opt::("account-v1.getByRiotId", route_str, request); - + let future = self.base.execute_opt::("account-v1.getByRiotId", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("account-v1.getByRiotId")); - future } @@ -341,13 +333,9 @@ impl<'a> AccountV1<'a> { let route_str = route.into(); let request = self.base.request(Method::GET, route_str, "/riot/account/v1/accounts/me"); let request = request.header("Authorization", authorization); - let future = self - .base - .execute_val::("account-v1.getByAccessToken", route_str, request); - + let future = self.base.execute_val::("account-v1.getByAccessToken", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("account-v1.getByAccessToken")); - future } @@ -365,13 +353,9 @@ impl<'a> AccountV1<'a> { { let route_str = route.into(); let request = self.base.request(Method::GET, route_str, &format!("/riot/account/v1/active-shards/by-game/{}/by-puuid/{}", game, puuid)); - let future = self - .base - .execute_opt::("account-v1.getActiveShard", route_str, request); - + let future = self.base.execute_opt::("account-v1.getActiveShard", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("account-v1.getActiveShard")); - future } @@ -400,13 +384,9 @@ impl<'a> ChampionMasteryV4<'a> { { let route_str = route.into(); let request = self.base.request(Method::GET, route_str, &format!("/lol/champion-mastery/v4/champion-masteries/by-summoner/{}", encrypted_summoner_id)); - let future = self - .base - .execute_val::>("champion-mastery-v4.getAllChampionMasteries", route_str, request); - + let future = self.base.execute_val::>("champion-mastery-v4.getAllChampionMasteries", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("champion-mastery-v4.getAllChampionMasteries")); - future } @@ -424,13 +404,9 @@ impl<'a> ChampionMasteryV4<'a> { { let route_str = route.into(); let request = self.base.request(Method::GET, route_str, &format!("/lol/champion-mastery/v4/champion-masteries/by-summoner/{}/by-champion/{}", encrypted_summoner_id, champion_id)); - let future = self - .base - .execute_opt::("champion-mastery-v4.getChampionMastery", route_str, request); - + let future = self.base.execute_opt::("champion-mastery-v4.getChampionMastery", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("champion-mastery-v4.getChampionMastery")); - future } @@ -447,13 +423,9 @@ impl<'a> ChampionMasteryV4<'a> { { let route_str = route.into(); let request = self.base.request(Method::GET, route_str, &format!("/lol/champion-mastery/v4/scores/by-summoner/{}", encrypted_summoner_id)); - let future = self - .base - .execute_val::("champion-mastery-v4.getChampionMasteryScore", route_str, request); - + let future = self.base.execute_val::("champion-mastery-v4.getChampionMasteryScore", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("champion-mastery-v4.getChampionMasteryScore")); - future } @@ -481,13 +453,9 @@ impl<'a> ChampionV3<'a> { { let route_str = route.into(); let request = self.base.request(Method::GET, route_str, "/lol/platform/v3/champion-rotations"); - let future = self - .base - .execute_val::("champion-v3.getChampionInfo", route_str, request); - + let future = self.base.execute_val::("champion-v3.getChampionInfo", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("champion-v3.getChampionInfo")); - future } @@ -518,13 +486,9 @@ impl<'a> ClashV1<'a> { { let route_str = route.into(); let request = self.base.request(Method::GET, route_str, &format!("/lol/clash/v1/players/by-summoner/{}", summoner_id)); - let future = self - .base - .execute_val::>("clash-v1.getPlayersBySummoner", route_str, request); - + let future = self.base.execute_val::>("clash-v1.getPlayersBySummoner", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("clash-v1.getPlayersBySummoner")); - future } @@ -541,13 +505,9 @@ impl<'a> ClashV1<'a> { { let route_str = route.into(); let request = self.base.request(Method::GET, route_str, &format!("/lol/clash/v1/teams/{}", team_id)); - let future = self - .base - .execute_opt::("clash-v1.getTeamById", route_str, request); - + let future = self.base.execute_opt::("clash-v1.getTeamById", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("clash-v1.getTeamById")); - future } @@ -563,13 +523,9 @@ impl<'a> ClashV1<'a> { { let route_str = route.into(); let request = self.base.request(Method::GET, route_str, "/lol/clash/v1/tournaments"); - let future = self - .base - .execute_val::>("clash-v1.getTournaments", route_str, request); - + let future = self.base.execute_val::>("clash-v1.getTournaments", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("clash-v1.getTournaments")); - future } @@ -586,13 +542,9 @@ impl<'a> ClashV1<'a> { { let route_str = route.into(); let request = self.base.request(Method::GET, route_str, &format!("/lol/clash/v1/tournaments/by-team/{}", team_id)); - let future = self - .base - .execute_opt::("clash-v1.getTournamentByTeam", route_str, request); - + let future = self.base.execute_opt::("clash-v1.getTournamentByTeam", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("clash-v1.getTournamentByTeam")); - future } @@ -609,13 +561,9 @@ impl<'a> ClashV1<'a> { { let route_str = route.into(); let request = self.base.request(Method::GET, route_str, &format!("/lol/clash/v1/tournaments/{}", tournament_id)); - let future = self - .base - .execute_opt::("clash-v1.getTournamentById", route_str, request); - + let future = self.base.execute_opt::("clash-v1.getTournamentById", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("clash-v1.getTournamentById")); - future } @@ -648,13 +596,9 @@ impl<'a> LeagueExpV4<'a> { let route_str = route.into(); let request = self.base.request(Method::GET, route_str, &format!("/lol/league-exp/v4/entries/{}/{}/{}", queue, tier, division)); let mut request = request; if let Some(page) = page { request = request.query(&[ ("page", page) ]); } - let future = self - .base - .execute_val::>("league-exp-v4.getLeagueEntries", route_str, request); - + let future = self.base.execute_val::>("league-exp-v4.getLeagueEntries", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("league-exp-v4.getLeagueEntries")); - future } @@ -683,13 +627,9 @@ impl<'a> LeagueV4<'a> { { let route_str = route.into(); let request = self.base.request(Method::GET, route_str, &format!("/lol/league/v4/challengerleagues/by-queue/{}", queue)); - let future = self - .base - .execute_val::("league-v4.getChallengerLeague", route_str, request); - + let future = self.base.execute_val::("league-v4.getChallengerLeague", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("league-v4.getChallengerLeague")); - future } @@ -706,13 +646,9 @@ impl<'a> LeagueV4<'a> { { let route_str = route.into(); let request = self.base.request(Method::GET, route_str, &format!("/lol/league/v4/entries/by-summoner/{}", encrypted_summoner_id)); - let future = self - .base - .execute_val::>("league-v4.getLeagueEntriesForSummoner", route_str, request); - + let future = self.base.execute_val::>("league-v4.getLeagueEntriesForSummoner", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("league-v4.getLeagueEntriesForSummoner")); - future } @@ -733,13 +669,9 @@ impl<'a> LeagueV4<'a> { let route_str = route.into(); let request = self.base.request(Method::GET, route_str, &format!("/lol/league/v4/entries/{}/{}/{}", queue, tier, division)); let mut request = request; if let Some(page) = page { request = request.query(&[ ("page", page) ]); } - let future = self - .base - .execute_val::>("league-v4.getLeagueEntries", route_str, request); - + let future = self.base.execute_val::>("league-v4.getLeagueEntries", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("league-v4.getLeagueEntries")); - future } @@ -756,13 +688,9 @@ impl<'a> LeagueV4<'a> { { let route_str = route.into(); let request = self.base.request(Method::GET, route_str, &format!("/lol/league/v4/grandmasterleagues/by-queue/{}", queue)); - let future = self - .base - .execute_val::("league-v4.getGrandmasterLeague", route_str, request); - + let future = self.base.execute_val::("league-v4.getGrandmasterLeague", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("league-v4.getGrandmasterLeague")); - future } @@ -779,13 +707,9 @@ impl<'a> LeagueV4<'a> { { let route_str = route.into(); let request = self.base.request(Method::GET, route_str, &format!("/lol/league/v4/leagues/{}", league_id)); - let future = self - .base - .execute_opt::("league-v4.getLeagueById", route_str, request); - + let future = self.base.execute_opt::("league-v4.getLeagueById", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("league-v4.getLeagueById")); - future } @@ -802,13 +726,9 @@ impl<'a> LeagueV4<'a> { { let route_str = route.into(); let request = self.base.request(Method::GET, route_str, &format!("/lol/league/v4/masterleagues/by-queue/{}", queue)); - let future = self - .base - .execute_val::("league-v4.getMasterLeague", route_str, request); - + let future = self.base.execute_val::("league-v4.getMasterLeague", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("league-v4.getMasterLeague")); - future } @@ -838,13 +758,9 @@ impl<'a> LolStatusV3<'a> { { let route_str = route.into(); let request = self.base.request(Method::GET, route_str, "/lol/status/v3/shard-data"); - let future = self - .base - .execute_val::("lol-status-v3.getShardData", route_str, request); - + let future = self.base.execute_val::("lol-status-v3.getShardData", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("lol-status-v3.getShardData")); - future } @@ -872,13 +788,9 @@ impl<'a> LolStatusV4<'a> { { let route_str = route.into(); let request = self.base.request(Method::GET, route_str, "/lol/status/v4/platform-data"); - let future = self - .base - .execute_val::("lol-status-v4.getPlatformData", route_str, request); - + let future = self.base.execute_val::("lol-status-v4.getPlatformData", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("lol-status-v4.getPlatformData")); - future } @@ -908,13 +820,9 @@ impl<'a> LorDeckV1<'a> { let route_str = route.into(); let request = self.base.request(Method::GET, route_str, "/lor/deck/v1/decks/me"); let request = request.header("Authorization", authorization); - let future = self - .base - .execute_val::>("lor-deck-v1.getDecks", route_str, request); - + let future = self.base.execute_val::>("lor-deck-v1.getDecks", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("lor-deck-v1.getDecks")); - future } @@ -933,13 +841,9 @@ impl<'a> LorDeckV1<'a> { let request = self.base.request(Method::POST, route_str, "/lor/deck/v1/decks/me"); let request = request.header("Authorization", authorization); let request = request.body(serde_json::ser::to_vec(body).unwrap()); - let future = self - .base - .execute_val::("lor-deck-v1.createDeck", route_str, request); - + let future = self.base.execute_val::("lor-deck-v1.createDeck", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("lor-deck-v1.createDeck")); - future } @@ -969,13 +873,9 @@ impl<'a> LorInventoryV1<'a> { let route_str = route.into(); let request = self.base.request(Method::GET, route_str, "/lor/inventory/v1/cards/me"); let request = request.header("Authorization", authorization); - let future = self - .base - .execute_val::>("lor-inventory-v1.getCards", route_str, request); - + let future = self.base.execute_val::>("lor-inventory-v1.getCards", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("lor-inventory-v1.getCards")); - future } @@ -1004,13 +904,9 @@ impl<'a> LorMatchV1<'a> { { let route_str = route.into(); let request = self.base.request(Method::GET, route_str, &format!("/lor/match/v1/matches/by-puuid/{}/ids", puuid)); - let future = self - .base - .execute_val::>("lor-match-v1.getMatchIdsByPUUID", route_str, request); - + let future = self.base.execute_val::>("lor-match-v1.getMatchIdsByPUUID", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("lor-match-v1.getMatchIdsByPUUID")); - future } @@ -1027,13 +923,9 @@ impl<'a> LorMatchV1<'a> { { let route_str = route.into(); let request = self.base.request(Method::GET, route_str, &format!("/lor/match/v1/matches/{}", match_id)); - let future = self - .base - .execute_val::("lor-match-v1.getMatch", route_str, request); - + let future = self.base.execute_val::("lor-match-v1.getMatch", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("lor-match-v1.getMatch")); - future } @@ -1061,13 +953,9 @@ impl<'a> LorRankedV1<'a> { { let route_str = route.into(); let request = self.base.request(Method::GET, route_str, "/lor/ranked/v1/leaderboards"); - let future = self - .base - .execute_val::("lor-ranked-v1.getLeaderboards", route_str, request); - + let future = self.base.execute_val::("lor-ranked-v1.getLeaderboards", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("lor-ranked-v1.getLeaderboards")); - future } @@ -1095,13 +983,9 @@ impl<'a> LorStatusV1<'a> { { let route_str = route.into(); let request = self.base.request(Method::GET, route_str, "/lor/status/v1/platform-data"); - let future = self - .base - .execute_val::("lor-status-v1.getPlatformData", route_str, request); - + let future = self.base.execute_val::("lor-status-v1.getPlatformData", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("lor-status-v1.getPlatformData")); - future } @@ -1130,13 +1014,9 @@ impl<'a> MatchV4<'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::>("match-v4.getMatchIdsByTournamentCode", route_str, request); - + let future = self.base.execute_val::>("match-v4.getMatchIdsByTournamentCode", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("match-v4.getMatchIdsByTournamentCode")); - future } @@ -1153,13 +1033,9 @@ impl<'a> MatchV4<'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.getMatch", route_str, request); - + let future = self.base.execute_opt::("match-v4.getMatch", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("match-v4.getMatch")); - future } @@ -1177,13 +1053,9 @@ impl<'a> MatchV4<'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.getMatchByTournamentCode", route_str, request); - + let future = self.base.execute_val::("match-v4.getMatchByTournamentCode", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("match-v4.getMatchByTournamentCode")); - future } @@ -1220,13 +1092,9 @@ impl<'a> MatchV4<'a> { 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::>()); } let mut request = request; if let Some(season) = season { request = request.query(&*season.iter().map(|w| ( "season", w )).collect::>()); } - let future = self - .base - .execute_opt::("match-v4.getMatchlist", route_str, request); - + let future = self.base.execute_opt::("match-v4.getMatchlist", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("match-v4.getMatchlist")); - future } @@ -1245,13 +1113,9 @@ impl<'a> MatchV4<'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.getMatchTimeline", route_str, request); - + let future = self.base.execute_opt::("match-v4.getMatchTimeline", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("match-v4.getMatchTimeline")); - future } @@ -1288,13 +1152,9 @@ impl<'a> MatchV5<'a> { let mut request = request; if let Some(queue) = queue { request = request.query(&[ ("queue", queue) ]); } let mut request = request; if let Some(start) = start { request = request.query(&[ ("start", start) ]); } let mut request = request; if let Some(r#type) = r#type { request = request.query(&[ ("type", r#type) ]); } - let future = self - .base - .execute_val::>("match-v5.getMatchIdsByPUUID", route_str, request); - + let future = self.base.execute_val::>("match-v5.getMatchIdsByPUUID", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("match-v5.getMatchIdsByPUUID")); - future } @@ -1311,13 +1171,9 @@ impl<'a> MatchV5<'a> { { let route_str = route.into(); let request = self.base.request(Method::GET, route_str, &format!("/lol/match/v5/matches/{}", match_id)); - let future = self - .base - .execute_opt::("match-v5.getMatch", route_str, request); - + let future = self.base.execute_opt::("match-v5.getMatch", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("match-v5.getMatch")); - future } @@ -1334,13 +1190,9 @@ impl<'a> MatchV5<'a> { { let route_str = route.into(); let request = self.base.request(Method::GET, route_str, &format!("/lol/match/v5/matches/{}/timeline", match_id)); - let future = self - .base - .execute_opt::("match-v5.getTimeline", route_str, request); - + let future = self.base.execute_opt::("match-v5.getTimeline", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("match-v5.getTimeline")); - future } @@ -1369,13 +1221,9 @@ impl<'a> SpectatorV4<'a> { { let route_str = route.into(); let request = self.base.request(Method::GET, route_str, &format!("/lol/spectator/v4/active-games/by-summoner/{}", encrypted_summoner_id)); - let future = self - .base - .execute_opt::("spectator-v4.getCurrentGameInfoBySummoner", route_str, request); - + let future = self.base.execute_opt::("spectator-v4.getCurrentGameInfoBySummoner", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("spectator-v4.getCurrentGameInfoBySummoner")); - future } @@ -1391,13 +1239,9 @@ impl<'a> SpectatorV4<'a> { { let route_str = route.into(); let request = self.base.request(Method::GET, route_str, "/lol/spectator/v4/featured-games"); - let future = self - .base - .execute_val::("spectator-v4.getFeaturedGames", route_str, request); - + let future = self.base.execute_val::("spectator-v4.getFeaturedGames", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("spectator-v4.getFeaturedGames")); - future } @@ -1426,13 +1270,9 @@ impl<'a> SummonerV4<'a> { { let route_str = route.into(); let request = self.base.request(Method::GET, route_str, &format!("/lol/summoner/v4/summoners/by-account/{}", encrypted_account_id)); - let future = self - .base - .execute_val::("summoner-v4.getByAccountId", route_str, request); - + let future = self.base.execute_val::("summoner-v4.getByAccountId", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("summoner-v4.getByAccountId")); - future } @@ -1449,13 +1289,9 @@ impl<'a> SummonerV4<'a> { { let route_str = route.into(); let request = self.base.request(Method::GET, route_str, &format!("/lol/summoner/v4/summoners/by-name/{}", summoner_name)); - let future = self - .base - .execute_opt::("summoner-v4.getBySummonerName", route_str, request); - + let future = self.base.execute_opt::("summoner-v4.getBySummonerName", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("summoner-v4.getBySummonerName")); - future } @@ -1472,13 +1308,9 @@ impl<'a> SummonerV4<'a> { { let route_str = route.into(); let request = self.base.request(Method::GET, route_str, &format!("/lol/summoner/v4/summoners/by-puuid/{}", encrypted_puuid)); - let future = self - .base - .execute_val::("summoner-v4.getByPUUID", route_str, request); - + let future = self.base.execute_val::("summoner-v4.getByPUUID", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("summoner-v4.getByPUUID")); - future } @@ -1496,13 +1328,9 @@ impl<'a> SummonerV4<'a> { let route_str = route.into(); let request = self.base.request(Method::GET, route_str, "/lol/summoner/v4/summoners/me"); let mut request = request; if let Some(authorization) = authorization { request = request.header("Authorization", authorization); } - let future = self - .base - .execute_val::("summoner-v4.getByAccessToken", route_str, request); - + let future = self.base.execute_val::("summoner-v4.getByAccessToken", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("summoner-v4.getByAccessToken")); - future } @@ -1519,13 +1347,9 @@ impl<'a> SummonerV4<'a> { { let route_str = route.into(); let request = self.base.request(Method::GET, route_str, &format!("/lol/summoner/v4/summoners/{}", encrypted_summoner_id)); - let future = self - .base - .execute_val::("summoner-v4.getBySummonerId", route_str, request); - + let future = self.base.execute_val::("summoner-v4.getBySummonerId", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("summoner-v4.getBySummonerId")); - future } @@ -1553,13 +1377,9 @@ impl<'a> TftLeagueV1<'a> { { let route_str = route.into(); let request = self.base.request(Method::GET, route_str, "/tft/league/v1/challenger"); - let future = self - .base - .execute_val::("tft-league-v1.getChallengerLeague", route_str, request); - + let future = self.base.execute_val::("tft-league-v1.getChallengerLeague", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("tft-league-v1.getChallengerLeague")); - future } @@ -1576,13 +1396,9 @@ impl<'a> TftLeagueV1<'a> { { let route_str = route.into(); let request = self.base.request(Method::GET, route_str, &format!("/tft/league/v1/entries/by-summoner/{}", summoner_id)); - let future = self - .base - .execute_val::>("tft-league-v1.getLeagueEntriesForSummoner", route_str, request); - + let future = self.base.execute_val::>("tft-league-v1.getLeagueEntriesForSummoner", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("tft-league-v1.getLeagueEntriesForSummoner")); - future } @@ -1602,13 +1418,9 @@ impl<'a> TftLeagueV1<'a> { let route_str = route.into(); let request = self.base.request(Method::GET, route_str, &format!("/tft/league/v1/entries/{}/{}", tier, division)); let mut request = request; if let Some(page) = page { request = request.query(&[ ("page", page) ]); } - let future = self - .base - .execute_val::>("tft-league-v1.getLeagueEntries", route_str, request); - + let future = self.base.execute_val::>("tft-league-v1.getLeagueEntries", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("tft-league-v1.getLeagueEntries")); - future } @@ -1624,13 +1436,9 @@ impl<'a> TftLeagueV1<'a> { { let route_str = route.into(); let request = self.base.request(Method::GET, route_str, "/tft/league/v1/grandmaster"); - let future = self - .base - .execute_val::("tft-league-v1.getGrandmasterLeague", route_str, request); - + let future = self.base.execute_val::("tft-league-v1.getGrandmasterLeague", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("tft-league-v1.getGrandmasterLeague")); - future } @@ -1647,13 +1455,9 @@ impl<'a> TftLeagueV1<'a> { { let route_str = route.into(); let request = self.base.request(Method::GET, route_str, &format!("/tft/league/v1/leagues/{}", league_id)); - let future = self - .base - .execute_opt::("tft-league-v1.getLeagueById", route_str, request); - + let future = self.base.execute_opt::("tft-league-v1.getLeagueById", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("tft-league-v1.getLeagueById")); - future } @@ -1669,13 +1473,9 @@ impl<'a> TftLeagueV1<'a> { { let route_str = route.into(); let request = self.base.request(Method::GET, route_str, "/tft/league/v1/master"); - let future = self - .base - .execute_val::("tft-league-v1.getMasterLeague", route_str, request); - + let future = self.base.execute_val::("tft-league-v1.getMasterLeague", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("tft-league-v1.getMasterLeague")); - future } @@ -1692,13 +1492,9 @@ impl<'a> TftLeagueV1<'a> { { let route_str = route.into(); let request = self.base.request(Method::GET, route_str, &format!("/tft/league/v1/rated-ladders/{}/top", queue)); - let future = self - .base - .execute_val::>("tft-league-v1.getTopRatedLadder", route_str, request); - + let future = self.base.execute_val::>("tft-league-v1.getTopRatedLadder", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("tft-league-v1.getTopRatedLadder")); - future } @@ -1729,13 +1525,9 @@ impl<'a> TftMatchV1<'a> { let route_str = route.into(); let request = self.base.request(Method::GET, route_str, &format!("/tft/match/v1/matches/by-puuid/{}/ids", puuid)); let mut request = request; if let Some(count) = count { request = request.query(&[ ("count", count) ]); } - let future = self - .base - .execute_val::>("tft-match-v1.getMatchIdsByPUUID", route_str, request); - + let future = self.base.execute_val::>("tft-match-v1.getMatchIdsByPUUID", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("tft-match-v1.getMatchIdsByPUUID")); - future } @@ -1752,13 +1544,9 @@ impl<'a> TftMatchV1<'a> { { let route_str = route.into(); let request = self.base.request(Method::GET, route_str, &format!("/tft/match/v1/matches/{}", match_id)); - let future = self - .base - .execute_opt::("tft-match-v1.getMatch", route_str, request); - + let future = self.base.execute_opt::("tft-match-v1.getMatch", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("tft-match-v1.getMatch")); - future } @@ -1787,13 +1575,9 @@ impl<'a> TftSummonerV1<'a> { { let route_str = route.into(); let request = self.base.request(Method::GET, route_str, &format!("/tft/summoner/v1/summoners/by-account/{}", encrypted_account_id)); - let future = self - .base - .execute_val::("tft-summoner-v1.getByAccountId", route_str, request); - + let future = self.base.execute_val::("tft-summoner-v1.getByAccountId", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("tft-summoner-v1.getByAccountId")); - future } @@ -1810,13 +1594,9 @@ impl<'a> TftSummonerV1<'a> { { let route_str = route.into(); let request = self.base.request(Method::GET, route_str, &format!("/tft/summoner/v1/summoners/by-name/{}", summoner_name)); - let future = self - .base - .execute_opt::("tft-summoner-v1.getBySummonerName", route_str, request); - + let future = self.base.execute_opt::("tft-summoner-v1.getBySummonerName", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("tft-summoner-v1.getBySummonerName")); - future } @@ -1833,13 +1613,9 @@ impl<'a> TftSummonerV1<'a> { { let route_str = route.into(); let request = self.base.request(Method::GET, route_str, &format!("/tft/summoner/v1/summoners/by-puuid/{}", encrypted_puuid)); - let future = self - .base - .execute_val::("tft-summoner-v1.getByPUUID", route_str, request); - + let future = self.base.execute_val::("tft-summoner-v1.getByPUUID", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("tft-summoner-v1.getByPUUID")); - future } @@ -1857,13 +1633,9 @@ impl<'a> TftSummonerV1<'a> { let route_str = route.into(); let request = self.base.request(Method::GET, route_str, "/tft/summoner/v1/summoners/me"); let mut request = request; if let Some(authorization) = authorization { request = request.header("Authorization", authorization); } - let future = self - .base - .execute_val::("tft-summoner-v1.getByAccessToken", route_str, request); - + let future = self.base.execute_val::("tft-summoner-v1.getByAccessToken", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("tft-summoner-v1.getByAccessToken")); - future } @@ -1880,13 +1652,9 @@ impl<'a> TftSummonerV1<'a> { { let route_str = route.into(); let request = self.base.request(Method::GET, route_str, &format!("/tft/summoner/v1/summoners/{}", encrypted_summoner_id)); - let future = self - .base - .execute_val::("tft-summoner-v1.getBySummonerId", route_str, request); - + let future = self.base.execute_val::("tft-summoner-v1.getBySummonerId", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("tft-summoner-v1.getBySummonerId")); - future } @@ -1915,13 +1683,9 @@ impl<'a> ThirdPartyCodeV4<'a> { { let route_str = route.into(); let request = self.base.request(Method::GET, route_str, &format!("/lol/platform/v4/third-party-code/by-summoner/{}", encrypted_summoner_id)); - let future = self - .base - .execute_val::("third-party-code-v4.getThirdPartyCodeBySummonerId", route_str, request); - + let future = self.base.execute_val::("third-party-code-v4.getThirdPartyCodeBySummonerId", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("third-party-code-v4.getThirdPartyCodeBySummonerId")); - future } @@ -1954,13 +1718,9 @@ impl<'a> TournamentStubV4<'a> { let request = request.query(&[ ("tournamentId", tournament_id) ]); let mut request = request; if let Some(count) = count { request = request.query(&[ ("count", count) ]); } let request = request.body(serde_json::ser::to_vec(body).unwrap()); - let future = self - .base - .execute_val::>("tournament-stub-v4.createTournamentCode", route_str, request); - + let future = self.base.execute_val::>("tournament-stub-v4.createTournamentCode", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("tournament-stub-v4.createTournamentCode")); - future } @@ -1977,13 +1737,9 @@ impl<'a> TournamentStubV4<'a> { { let route_str = route.into(); let request = self.base.request(Method::GET, route_str, &format!("/lol/tournament-stub/v4/lobby-events/by-code/{}", tournament_code)); - let future = self - .base - .execute_val::("tournament-stub-v4.getLobbyEventsByCode", route_str, request); - + let future = self.base.execute_val::("tournament-stub-v4.getLobbyEventsByCode", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("tournament-stub-v4.getLobbyEventsByCode")); - future } @@ -2002,13 +1758,9 @@ impl<'a> TournamentStubV4<'a> { let route_str = route.into(); let request = self.base.request(Method::POST, route_str, "/lol/tournament-stub/v4/providers"); let request = request.body(serde_json::ser::to_vec(body).unwrap()); - let future = self - .base - .execute_val::("tournament-stub-v4.registerProviderData", route_str, request); - + let future = self.base.execute_val::("tournament-stub-v4.registerProviderData", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("tournament-stub-v4.registerProviderData")); - future } @@ -2025,13 +1777,9 @@ impl<'a> TournamentStubV4<'a> { let route_str = route.into(); let request = self.base.request(Method::POST, route_str, "/lol/tournament-stub/v4/tournaments"); let request = request.body(serde_json::ser::to_vec(body).unwrap()); - let future = self - .base - .execute_val::("tournament-stub-v4.registerTournament", route_str, request); - + let future = self.base.execute_val::("tournament-stub-v4.registerTournament", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("tournament-stub-v4.registerTournament")); - future } @@ -2064,13 +1812,9 @@ impl<'a> TournamentV4<'a> { let request = request.query(&[ ("tournamentId", tournament_id) ]); let mut request = request; if let Some(count) = count { request = request.query(&[ ("count", count) ]); } let request = request.body(serde_json::ser::to_vec(body).unwrap()); - let future = self - .base - .execute_val::>("tournament-v4.createTournamentCode", route_str, request); - + let future = self.base.execute_val::>("tournament-v4.createTournamentCode", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("tournament-v4.createTournamentCode")); - future } @@ -2087,13 +1831,9 @@ impl<'a> TournamentV4<'a> { { let route_str = route.into(); let request = self.base.request(Method::GET, route_str, &format!("/lol/tournament/v4/codes/{}", tournament_code)); - let future = self - .base - .execute_val::("tournament-v4.getTournamentCode", route_str, request); - + let future = self.base.execute_val::("tournament-v4.getTournamentCode", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("tournament-v4.getTournamentCode")); - future } @@ -2111,13 +1851,9 @@ impl<'a> TournamentV4<'a> { let route_str = route.into(); let request = self.base.request(Method::PUT, route_str, &format!("/lol/tournament/v4/codes/{}", tournament_code)); let request = request.body(serde_json::ser::to_vec(body).unwrap()); - let future = self - .base - .execute("tournament-v4.updateCode", route_str, request); - + let future = self.base.execute("tournament-v4.updateCode", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("tournament-v4.updateCode")); - future } @@ -2134,13 +1870,9 @@ impl<'a> TournamentV4<'a> { { let route_str = route.into(); let request = self.base.request(Method::GET, route_str, &format!("/lol/tournament/v4/lobby-events/by-code/{}", tournament_code)); - let future = self - .base - .execute_val::("tournament-v4.getLobbyEventsByCode", route_str, request); - + let future = self.base.execute_val::("tournament-v4.getLobbyEventsByCode", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("tournament-v4.getLobbyEventsByCode")); - future } @@ -2159,13 +1891,9 @@ impl<'a> TournamentV4<'a> { let route_str = route.into(); let request = self.base.request(Method::POST, route_str, "/lol/tournament/v4/providers"); let request = request.body(serde_json::ser::to_vec(body).unwrap()); - let future = self - .base - .execute_val::("tournament-v4.registerProviderData", route_str, request); - + let future = self.base.execute_val::("tournament-v4.registerProviderData", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("tournament-v4.registerProviderData")); - future } @@ -2182,13 +1910,9 @@ impl<'a> TournamentV4<'a> { let route_str = route.into(); let request = self.base.request(Method::POST, route_str, "/lol/tournament/v4/tournaments"); let request = request.body(serde_json::ser::to_vec(body).unwrap()); - let future = self - .base - .execute_val::("tournament-v4.registerTournament", route_str, request); - + let future = self.base.execute_val::("tournament-v4.registerTournament", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("tournament-v4.registerTournament")); - future } @@ -2218,13 +1942,9 @@ impl<'a> ValContentV1<'a> { let route_str = route.into(); let request = self.base.request(Method::GET, route_str, "/val/content/v1/contents"); let mut request = request; if let Some(locale) = locale { request = request.query(&[ ("locale", locale) ]); } - let future = self - .base - .execute_val::("val-content-v1.getContent", route_str, request); - + let future = self.base.execute_val::("val-content-v1.getContent", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("val-content-v1.getContent")); - future } @@ -2253,13 +1973,9 @@ impl<'a> ValMatchV1<'a> { { let route_str = route.into(); let request = self.base.request(Method::GET, route_str, &format!("/val/match/v1/matches/{}", match_id)); - let future = self - .base - .execute_opt::("val-match-v1.getMatch", route_str, request); - + let future = self.base.execute_opt::("val-match-v1.getMatch", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("val-match-v1.getMatch")); - future } @@ -2276,13 +1992,9 @@ impl<'a> ValMatchV1<'a> { { let route_str = route.into(); let request = self.base.request(Method::GET, route_str, &format!("/val/match/v1/matchlists/by-puuid/{}", puuid)); - let future = self - .base - .execute_val::("val-match-v1.getMatchlist", route_str, request); - + let future = self.base.execute_val::("val-match-v1.getMatchlist", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("val-match-v1.getMatchlist")); - future } @@ -2301,13 +2013,9 @@ impl<'a> ValMatchV1<'a> { { let route_str = route.into(); let request = self.base.request(Method::GET, route_str, &format!("/val/match/v1/recent-matches/by-queue/{}", queue)); - let future = self - .base - .execute_val::("val-match-v1.getRecent", route_str, request); - + let future = self.base.execute_val::("val-match-v1.getRecent", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("val-match-v1.getRecent")); - future } @@ -2340,13 +2048,9 @@ impl<'a> ValRankedV1<'a> { let request = self.base.request(Method::GET, route_str, &format!("/val/ranked/v1/leaderboards/by-act/{}", act_id)); let mut request = request; if let Some(size) = size { request = request.query(&[ ("size", size) ]); } let mut request = request; if let Some(start_index) = start_index { request = request.query(&[ ("startIndex", start_index) ]); } - let future = self - .base - .execute_opt::("val-ranked-v1.getLeaderboard", route_str, request); - + let future = self.base.execute_opt::("val-ranked-v1.getLeaderboard", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("val-ranked-v1.getLeaderboard")); - future } @@ -2374,13 +2078,9 @@ impl<'a> ValStatusV1<'a> { { let route_str = route.into(); let request = self.base.request(Method::GET, route_str, "/val/status/v1/platform-data"); - let future = self - .base - .execute_val::("val-status-v1.getPlatformData", route_str, request); - + let future = self.base.execute_val::("val-status-v1.getPlatformData", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("val-status-v1.getPlatformData")); - future } diff --git a/src/meta.rs b/src/meta.rs index 27b9b8c..6616a5d 100644 --- a/src/meta.rs +++ b/src/meta.rs @@ -7,7 +7,7 @@ /////////////////////////////////////////////// // http://www.mingweisamuel.com/riotapi-schema/tool/ -// Version 8fec9617c247f0ee5c96feecc8526fdc9dca0369 +// Version 653f68e2d03da44548ff93bc4ffe558e5e70e906 //! Metadata about the Riot API and Riven. //! diff --git a/src/models.rs b/src/models.rs index 1b1c44f..456bf1b 100644 --- a/src/models.rs +++ b/src/models.rs @@ -7,7 +7,7 @@ /////////////////////////////////////////////// // http://www.mingweisamuel.com/riotapi-schema/tool/ -// Version 8fec9617c247f0ee5c96feecc8526fdc9dca0369 +// Version 653f68e2d03da44548ff93bc4ffe558e5e70e906 //! Data transfer structs. //! @@ -1505,24 +1505,24 @@ pub mod match_v5 { #[derive(serde::Serialize, serde::Deserialize)] pub struct MatchInfoParticipantPerksStatPerks { #[serde(rename = "defense")] - pub defense: i64, + pub defense: i32, #[serde(rename = "flex")] - pub flex: i64, + pub flex: i32, #[serde(rename = "offense")] - pub offense: i64, + pub offense: i32, } /// MatchInfoParticipantPerksStyleSelection data object. #[derive(Debug)] #[derive(serde::Serialize, serde::Deserialize)] pub struct MatchInfoParticipantPerksStyleSelection { #[serde(rename = "perk")] - pub perk: i64, + pub perk: i32, #[serde(rename = "var1")] - pub var1: i64, + pub var1: i32, #[serde(rename = "var2")] - pub var2: i64, + pub var2: i32, #[serde(rename = "var3")] - pub var3: i64, + pub var3: i32, } /// MatchInfoParticipantPerksStyle data object. #[derive(Debug)] @@ -1533,7 +1533,7 @@ pub mod match_v5 { #[serde(rename = "selections")] pub selections: std::vec::Vec, #[serde(rename = "style")] - pub style: i64, + pub style: i32, } /// MatchInfoParticipantPerks data object. #[derive(Debug)] @@ -1549,39 +1549,39 @@ pub mod match_v5 { #[derive(serde::Serialize, serde::Deserialize)] pub struct MatchInfoParticipant { #[serde(rename = "assists")] - pub assists: i64, + pub assists: i32, #[serde(rename = "baronKills")] - pub baron_kills: i64, + pub baron_kills: i32, #[serde(rename = "bountyLevel")] - pub bounty_level: i64, + pub bounty_level: i32, #[serde(rename = "champExperience")] - pub champ_experience: i64, + pub champ_experience: i32, #[serde(rename = "champLevel")] - pub champ_level: i64, + pub champ_level: i32, #[serde(rename = "championId")] pub champion_id: crate::consts::Champion, #[serde(rename = "championName")] pub champion_name: String, #[serde(rename = "championTransform")] - pub champion_transform: i64, + pub champion_transform: i32, #[serde(rename = "consumablesPurchased")] - pub consumables_purchased: i64, + pub consumables_purchased: i32, #[serde(rename = "damageDealtToBuildings")] - pub damage_dealt_to_buildings: i64, + pub damage_dealt_to_buildings: i32, #[serde(rename = "damageDealtToObjectives")] - pub damage_dealt_to_objectives: i64, + pub damage_dealt_to_objectives: i32, #[serde(rename = "damageDealtToTurrets")] - pub damage_dealt_to_turrets: i64, + pub damage_dealt_to_turrets: i32, #[serde(rename = "damageSelfMitigated")] - pub damage_self_mitigated: i64, + pub damage_self_mitigated: i32, #[serde(rename = "deaths")] - pub deaths: i64, + pub deaths: i32, #[serde(rename = "detectorWardsPlaced")] - pub detector_wards_placed: i64, + pub detector_wards_placed: i32, #[serde(rename = "doubleKills")] - pub double_kills: i64, + pub double_kills: i32, #[serde(rename = "dragonKills")] - pub dragon_kills: i64, + pub dragon_kills: i32, #[serde(rename = "firstBloodAssist")] pub first_blood_assist: bool, #[serde(rename = "firstBloodKill")] @@ -1595,79 +1595,79 @@ pub mod match_v5 { #[serde(rename = "gameEndedInSurrender")] pub game_ended_in_surrender: bool, #[serde(rename = "goldEarned")] - pub gold_earned: i64, + pub gold_earned: i32, #[serde(rename = "goldSpent")] - pub gold_spent: i64, + pub gold_spent: i32, #[serde(rename = "individualPosition")] pub individual_position: String, #[serde(rename = "inhibitorKills")] - pub inhibitor_kills: i64, + pub inhibitor_kills: i32, #[serde(rename = "inhibitorsLost")] - pub inhibitors_lost: i64, + pub inhibitors_lost: i32, #[serde(rename = "item0")] - pub item0: i64, + pub item0: i32, #[serde(rename = "item1")] - pub item1: i64, + pub item1: i32, #[serde(rename = "item2")] - pub item2: i64, + pub item2: i32, #[serde(rename = "item3")] - pub item3: i64, + pub item3: i32, #[serde(rename = "item4")] - pub item4: i64, + pub item4: i32, #[serde(rename = "item5")] - pub item5: i64, + pub item5: i32, #[serde(rename = "item6")] - pub item6: i64, + pub item6: i32, #[serde(rename = "itemsPurchased")] - pub items_purchased: i64, + pub items_purchased: i32, #[serde(rename = "killingSprees")] - pub killing_sprees: i64, + pub killing_sprees: i32, #[serde(rename = "kills")] - pub kills: i64, + pub kills: i32, #[serde(rename = "lane")] pub lane: String, #[serde(rename = "largestCriticalStrike")] - pub largest_critical_strike: i64, + pub largest_critical_strike: i32, #[serde(rename = "largestKillingSpree")] - pub largest_killing_spree: i64, + pub largest_killing_spree: i32, #[serde(rename = "largestMultiKill")] - pub largest_multi_kill: i64, + pub largest_multi_kill: i32, #[serde(rename = "longestTimeSpentLiving")] - pub longest_time_spent_living: i64, + pub longest_time_spent_living: i32, #[serde(rename = "magicDamageDealt")] - pub magic_damage_dealt: i64, + pub magic_damage_dealt: i32, #[serde(rename = "magicDamageDealtToChampions")] - pub magic_damage_dealt_to_champions: i64, + pub magic_damage_dealt_to_champions: i32, #[serde(rename = "magicDamageTaken")] - pub magic_damage_taken: i64, + pub magic_damage_taken: i32, #[serde(rename = "neutralMinionsKilled")] - pub neutral_minions_killed: i64, + pub neutral_minions_killed: i32, #[serde(rename = "nexusKills")] - pub nexus_kills: i64, + pub nexus_kills: i32, #[serde(rename = "nexusLost")] - pub nexus_lost: i64, + pub nexus_lost: i32, #[serde(rename = "objectivesStolen")] - pub objectives_stolen: i64, + pub objectives_stolen: i32, #[serde(rename = "objectivesStolenAssists")] - pub objectives_stolen_assists: i64, + pub objectives_stolen_assists: i32, #[serde(rename = "participantId")] - pub participant_id: i64, + pub participant_id: i32, #[serde(rename = "pentaKills")] - pub penta_kills: i64, + pub penta_kills: i32, #[serde(rename = "perks")] pub perks: MatchInfoParticipantPerks, #[serde(rename = "physicalDamageDealt")] - pub physical_damage_dealt: i64, + pub physical_damage_dealt: i32, #[serde(rename = "physicalDamageDealtToChampions")] - pub physical_damage_dealt_to_champions: i64, + pub physical_damage_dealt_to_champions: i32, #[serde(rename = "physicalDamageTaken")] - pub physical_damage_taken: i64, + pub physical_damage_taken: i32, #[serde(rename = "profileIcon")] - pub profile_icon: i64, + pub profile_icon: i32, #[serde(rename = "puuid")] pub puuid: String, #[serde(rename = "quadraKills")] - pub quadra_kills: i64, + pub quadra_kills: i32, #[serde(rename = "riotIdName")] pub riot_id_name: String, #[serde(rename = "riotIdTagline")] @@ -1675,27 +1675,27 @@ pub mod match_v5 { #[serde(rename = "role")] pub role: String, #[serde(rename = "sightWardsBoughtInGame")] - pub sight_wards_bought_in_game: i64, + pub sight_wards_bought_in_game: i32, #[serde(rename = "spell1Casts")] - pub spell1_casts: i64, + pub spell1_casts: i32, #[serde(rename = "spell2Casts")] - pub spell2_casts: i64, + pub spell2_casts: i32, #[serde(rename = "spell3Casts")] - pub spell3_casts: i64, + pub spell3_casts: i32, #[serde(rename = "spell4Casts")] - pub spell4_casts: i64, + pub spell4_casts: i32, #[serde(rename = "summoner1Casts")] - pub summoner1_casts: i64, + pub summoner1_casts: i32, #[serde(rename = "summoner1Id")] - pub summoner1_id: i64, + pub summoner1_id: i32, #[serde(rename = "summoner2Casts")] - pub summoner2_casts: i64, + pub summoner2_casts: i32, #[serde(rename = "summoner2Id")] - pub summoner2_id: i64, + pub summoner2_id: i32, #[serde(rename = "summonerId")] pub summoner_id: String, #[serde(rename = "summonerLevel")] - pub summoner_level: i64, + pub summoner_level: i32, #[serde(rename = "summonerName")] pub summoner_name: String, #[serde(rename = "teamEarlySurrendered")] @@ -1705,51 +1705,51 @@ pub mod match_v5 { #[serde(rename = "teamPosition")] pub team_position: String, #[serde(rename = "timeCCingOthers")] - pub time_c_cing_others: i64, + pub time_c_cing_others: i32, #[serde(rename = "timePlayed")] - pub time_played: i64, + pub time_played: i32, #[serde(rename = "totalDamageDealt")] - pub total_damage_dealt: i64, + pub total_damage_dealt: i32, #[serde(rename = "totalDamageDealtToChampions")] - pub total_damage_dealt_to_champions: i64, + pub total_damage_dealt_to_champions: i32, #[serde(rename = "totalDamageShieldedOnTeammates")] - pub total_damage_shielded_on_teammates: i64, + pub total_damage_shielded_on_teammates: i32, #[serde(rename = "totalDamageTaken")] - pub total_damage_taken: i64, + pub total_damage_taken: i32, #[serde(rename = "totalHeal")] - pub total_heal: i64, + pub total_heal: i32, #[serde(rename = "totalHealsOnTeammates")] - pub total_heals_on_teammates: i64, + pub total_heals_on_teammates: i32, #[serde(rename = "totalMinionsKilled")] - pub total_minions_killed: i64, + pub total_minions_killed: i32, #[serde(rename = "totalTimeCCDealt")] - pub total_time_cc_dealt: i64, + pub total_time_cc_dealt: i32, #[serde(rename = "totalTimeSpentDead")] - pub total_time_spent_dead: i64, + pub total_time_spent_dead: i32, #[serde(rename = "totalUnitsHealed")] - pub total_units_healed: i64, + pub total_units_healed: i32, #[serde(rename = "tripleKills")] - pub triple_kills: i64, + pub triple_kills: i32, #[serde(rename = "trueDamageDealt")] - pub true_damage_dealt: i64, + pub true_damage_dealt: i32, #[serde(rename = "trueDamageDealtToChampions")] - pub true_damage_dealt_to_champions: i64, + pub true_damage_dealt_to_champions: i32, #[serde(rename = "trueDamageTaken")] - pub true_damage_taken: i64, + pub true_damage_taken: i32, #[serde(rename = "turretKills")] - pub turret_kills: i64, + pub turret_kills: i32, #[serde(rename = "turretsLost")] - pub turrets_lost: i64, + pub turrets_lost: i32, #[serde(rename = "unrealKills")] - pub unreal_kills: i64, + pub unreal_kills: i32, #[serde(rename = "visionScore")] - pub vision_score: i64, + pub vision_score: i32, #[serde(rename = "visionWardsBoughtInGame")] - pub vision_wards_bought_in_game: i64, + pub vision_wards_bought_in_game: i32, #[serde(rename = "wardsKilled")] - pub wards_killed: i64, + pub wards_killed: i32, #[serde(rename = "wardsPlaced")] - pub wards_placed: i64, + pub wards_placed: i32, #[serde(rename = "win")] pub win: bool, } @@ -1760,7 +1760,7 @@ pub mod match_v5 { #[serde(rename = "championId")] pub champion_id: crate::consts::Champion, #[serde(rename = "pickTurn")] - pub pick_turn: i64, + pub pick_turn: i32, } /// MatchInfoTeamObjective data object. #[derive(Debug)] @@ -1769,7 +1769,7 @@ pub mod match_v5 { #[serde(rename = "first")] pub first: bool, #[serde(rename = "kills")] - pub kills: i64, + pub kills: i32, } /// MatchInfoTeamObjectives data object. #[derive(Debug)] @@ -1808,7 +1808,7 @@ pub mod match_v5 { #[serde(rename = "gameCreation")] pub game_creation: i64, #[serde(rename = "gameDuration")] - pub game_duration: i64, + pub game_duration: i32, #[serde(rename = "gameId")] pub game_id: i64, #[serde(rename = "gameMode")] @@ -1841,44 +1841,44 @@ pub mod match_v5 { pub struct MatchTimelineInfoFrameEvent { #[serde(rename = "realTimestamp")] #[serde(skip_serializing_if = "Option::is_none")] - pub real_timestamp: Option, + pub real_timestamp: Option, #[serde(rename = "timestamp")] - pub timestamp: i64, + pub timestamp: i32, #[serde(rename = "type")] pub r#type: String, #[serde(rename = "itemId")] #[serde(skip_serializing_if = "Option::is_none")] - pub item_id: Option, + pub item_id: Option, #[serde(rename = "participantId")] #[serde(skip_serializing_if = "Option::is_none")] - pub participant_id: Option, + pub participant_id: Option, #[serde(rename = "levelUpType")] #[serde(skip_serializing_if = "Option::is_none")] pub level_up_type: Option, #[serde(rename = "skillSlot")] #[serde(skip_serializing_if = "Option::is_none")] - pub skill_slot: Option, + pub skill_slot: Option, #[serde(rename = "creatorId")] #[serde(skip_serializing_if = "Option::is_none")] - pub creator_id: Option, + pub creator_id: Option, #[serde(rename = "wardType")] #[serde(skip_serializing_if = "Option::is_none")] pub ward_type: Option, #[serde(rename = "level")] #[serde(skip_serializing_if = "Option::is_none")] - pub level: Option, + pub level: Option, #[serde(rename = "assistingParticipantIds")] #[serde(skip_serializing_if = "Option::is_none")] - pub assisting_participant_ids: Option>, + pub assisting_participant_ids: Option>, #[serde(rename = "bounty")] #[serde(skip_serializing_if = "Option::is_none")] - pub bounty: Option, + pub bounty: Option, #[serde(rename = "killStreakLength")] #[serde(skip_serializing_if = "Option::is_none")] - pub kill_streak_length: Option, + pub kill_streak_length: Option, #[serde(rename = "killerId")] #[serde(skip_serializing_if = "Option::is_none")] - pub killer_id: Option, + pub killer_id: Option, #[serde(rename = "position")] #[serde(skip_serializing_if = "Option::is_none")] pub position: Option, @@ -1890,7 +1890,7 @@ pub mod match_v5 { pub victim_damage_received: Option>, #[serde(rename = "victimId")] #[serde(skip_serializing_if = "Option::is_none")] - pub victim_id: Option, + pub victim_id: Option, #[serde(rename = "killType")] #[serde(skip_serializing_if = "Option::is_none")] pub kill_type: Option, @@ -1902,7 +1902,7 @@ pub mod match_v5 { pub team_id: Option, #[serde(rename = "multiKillLength")] #[serde(skip_serializing_if = "Option::is_none")] - pub multi_kill_length: Option, + pub multi_kill_length: Option, #[serde(rename = "killerTeamId")] #[serde(skip_serializing_if = "Option::is_none")] pub killer_team_id: Option, @@ -1920,19 +1920,19 @@ pub mod match_v5 { pub tower_type: Option, #[serde(rename = "afterId")] #[serde(skip_serializing_if = "Option::is_none")] - pub after_id: Option, + pub after_id: Option, #[serde(rename = "beforeId")] #[serde(skip_serializing_if = "Option::is_none")] - pub before_id: Option, + pub before_id: Option, #[serde(rename = "goldGain")] #[serde(skip_serializing_if = "Option::is_none")] - pub gold_gain: Option, + pub gold_gain: Option, #[serde(rename = "gameId")] #[serde(skip_serializing_if = "Option::is_none")] - pub game_id: Option, + pub game_id: Option, #[serde(rename = "winningTeam")] #[serde(skip_serializing_if = "Option::is_none")] - pub winning_team: Option, + pub winning_team: Option, #[serde(rename = "transformType")] #[serde(skip_serializing_if = "Option::is_none")] pub transform_type: Option, @@ -1945,93 +1945,93 @@ pub mod match_v5 { #[derive(serde::Serialize, serde::Deserialize)] pub struct MatchTimelineInfoFrameParticipantFrameChampionStats { #[serde(rename = "abilityHaste")] - pub ability_haste: i64, + pub ability_haste: i32, #[serde(rename = "abilityPower")] - pub ability_power: i64, + pub ability_power: i32, #[serde(rename = "armor")] - pub armor: i64, + pub armor: i32, #[serde(rename = "armorPen")] - pub armor_pen: i64, + pub armor_pen: i32, #[serde(rename = "armorPenPercent")] - pub armor_pen_percent: i64, + pub armor_pen_percent: i32, #[serde(rename = "attackDamage")] - pub attack_damage: i64, + pub attack_damage: i32, #[serde(rename = "attackSpeed")] - pub attack_speed: i64, + pub attack_speed: i32, #[serde(rename = "bonusArmorPenPercent")] - pub bonus_armor_pen_percent: i64, + pub bonus_armor_pen_percent: i32, #[serde(rename = "bonusMagicPenPercent")] - pub bonus_magic_pen_percent: i64, + pub bonus_magic_pen_percent: i32, #[serde(rename = "ccReduction")] - pub cc_reduction: i64, + pub cc_reduction: i32, #[serde(rename = "cooldownReduction")] - pub cooldown_reduction: i64, + pub cooldown_reduction: i32, #[serde(rename = "health")] - pub health: i64, + pub health: i32, #[serde(rename = "healthMax")] - pub health_max: i64, + pub health_max: i32, #[serde(rename = "healthRegen")] - pub health_regen: i64, + pub health_regen: i32, #[serde(rename = "lifesteal")] - pub lifesteal: i64, + pub lifesteal: i32, #[serde(rename = "magicPen")] - pub magic_pen: i64, + pub magic_pen: i32, #[serde(rename = "magicPenPercent")] - pub magic_pen_percent: i64, + pub magic_pen_percent: i32, #[serde(rename = "magicResist")] - pub magic_resist: i64, + pub magic_resist: i32, #[serde(rename = "movementSpeed")] - pub movement_speed: i64, + pub movement_speed: i32, #[serde(rename = "omnivamp")] - pub omnivamp: i64, + pub omnivamp: i32, #[serde(rename = "physicalVamp")] - pub physical_vamp: i64, + pub physical_vamp: i32, #[serde(rename = "power")] - pub power: i64, + pub power: i32, #[serde(rename = "powerMax")] - pub power_max: i64, + pub power_max: i32, #[serde(rename = "powerRegen")] - pub power_regen: i64, + pub power_regen: i32, #[serde(rename = "spellVamp")] - pub spell_vamp: i64, + pub spell_vamp: i32, } /// MatchTimelineInfoFrameParticipantFrameDamageStats data object. #[derive(Debug)] #[derive(serde::Serialize, serde::Deserialize)] pub struct MatchTimelineInfoFrameParticipantFrameDamageStats { #[serde(rename = "magicDamageDone")] - pub magic_damage_done: i64, + pub magic_damage_done: i32, #[serde(rename = "magicDamageDoneToChampions")] - pub magic_damage_done_to_champions: i64, + pub magic_damage_done_to_champions: i32, #[serde(rename = "magicDamageTaken")] - pub magic_damage_taken: i64, + pub magic_damage_taken: i32, #[serde(rename = "physicalDamageDone")] - pub physical_damage_done: i64, + pub physical_damage_done: i32, #[serde(rename = "physicalDamageDoneToChampions")] - pub physical_damage_done_to_champions: i64, + pub physical_damage_done_to_champions: i32, #[serde(rename = "physicalDamageTaken")] - pub physical_damage_taken: i64, + pub physical_damage_taken: i32, #[serde(rename = "totalDamageDone")] - pub total_damage_done: i64, + pub total_damage_done: i32, #[serde(rename = "totalDamageDoneToChampions")] - pub total_damage_done_to_champions: i64, + pub total_damage_done_to_champions: i32, #[serde(rename = "totalDamageTaken")] - pub total_damage_taken: i64, + pub total_damage_taken: i32, #[serde(rename = "trueDamageDone")] - pub true_damage_done: i64, + pub true_damage_done: i32, #[serde(rename = "trueDamageDoneToChampions")] - pub true_damage_done_to_champions: i64, + pub true_damage_done_to_champions: i32, #[serde(rename = "trueDamageTaken")] - pub true_damage_taken: i64, + pub true_damage_taken: i32, } /// MatchTimelineInfoFrameParticipantFramePosition data object. #[derive(Debug)] #[derive(serde::Serialize, serde::Deserialize)] pub struct MatchTimelineInfoFrameParticipantFramePosition { #[serde(rename = "x")] - pub x: i64, + pub x: i32, #[serde(rename = "y")] - pub y: i64, + pub y: i32, } /// MatchTimelineInfoFrameParticipantFrame data object. #[derive(Debug)] @@ -2040,27 +2040,27 @@ pub mod match_v5 { #[serde(rename = "championStats")] pub champion_stats: MatchTimelineInfoFrameParticipantFrameChampionStats, #[serde(rename = "currentGold")] - pub current_gold: i64, + pub current_gold: i32, #[serde(rename = "damageStats")] pub damage_stats: MatchTimelineInfoFrameParticipantFrameDamageStats, #[serde(rename = "goldPerSecond")] - pub gold_per_second: i64, + pub gold_per_second: i32, #[serde(rename = "jungleMinionsKilled")] - pub jungle_minions_killed: i64, + pub jungle_minions_killed: i32, #[serde(rename = "level")] - pub level: i64, + pub level: i32, #[serde(rename = "minionsKilled")] - pub minions_killed: i64, + pub minions_killed: i32, #[serde(rename = "participantId")] - pub participant_id: i64, + pub participant_id: i32, #[serde(rename = "position")] pub position: MatchTimelineInfoFrameParticipantFramePosition, #[serde(rename = "timeEnemySpentControlled")] - pub time_enemy_spent_controlled: i64, + pub time_enemy_spent_controlled: i32, #[serde(rename = "totalGold")] - pub total_gold: i64, + pub total_gold: i32, #[serde(rename = "xp")] - pub xp: i64, + pub xp: i32, } /// MatchTimelineInfoFrameParticipantFrames data object. #[derive(Debug)] @@ -2096,7 +2096,7 @@ pub mod match_v5 { #[serde(rename = "participantFrames")] pub participant_frames: MatchTimelineInfoFrameParticipantFrames, #[serde(rename = "timestamp")] - pub timestamp: i64, + pub timestamp: i32, } /// MatchTimelineInfoFrameEventVictimDamageDealt data object. #[derive(Debug)] @@ -2105,19 +2105,19 @@ pub mod match_v5 { #[serde(rename = "basic")] pub basic: bool, #[serde(rename = "magicDamage")] - pub magic_damage: i64, + pub magic_damage: i32, #[serde(rename = "name")] pub name: String, #[serde(rename = "participantId")] - pub participant_id: i64, + pub participant_id: i32, #[serde(rename = "physicalDamage")] - pub physical_damage: i64, + pub physical_damage: i32, #[serde(rename = "spellName")] pub spell_name: String, #[serde(rename = "spellSlot")] - pub spell_slot: i64, + pub spell_slot: i32, #[serde(rename = "trueDamage")] - pub true_damage: i64, + pub true_damage: i32, #[serde(rename = "type")] pub r#type: String, } @@ -2126,7 +2126,7 @@ pub mod match_v5 { #[derive(serde::Serialize, serde::Deserialize)] pub struct MatchTimelineInfoParticipant { #[serde(rename = "participantId")] - pub participant_id: i64, + pub participant_id: i32, #[serde(rename = "puuid")] pub puuid: String, } @@ -2135,11 +2135,11 @@ pub mod match_v5 { #[derive(serde::Serialize, serde::Deserialize)] pub struct MatchTimelineInfo { #[serde(rename = "frameInterval")] - pub frame_interval: i64, + pub frame_interval: i32, #[serde(rename = "frames")] pub frames: std::vec::Vec, #[serde(rename = "gameId")] - pub game_id: i64, + pub game_id: i32, #[serde(rename = "participants")] pub participants: std::vec::Vec, } diff --git a/srcgen/endpoints.rs.dt b/srcgen/endpoints.rs.dt index d90eddc..b929eaf 100644 --- a/srcgen/endpoints.rs.dt +++ b/srcgen/endpoints.rs.dt @@ -199,13 +199,9 @@ impl<'a> {{= endpoint }}<'a> { {{? bodyType }} let request = request.body(serde_json::ser::to_vec(body).unwrap()); {{?}} - let future = self - .base - .execute{{= hasReturn ? (returnOptional ? '_opt' : '_val') : '' }}{{= returnTypeTurbofish }}("{{= operationId }}", route_str, request); - + let future = self.base.execute{{= hasReturn ? (returnOptional ? '_opt' : '_val') : '' }}{{= returnTypeTurbofish }}("{{= operationId }}", route_str, request); #[cfg(feature = "tracing")] let future = future.instrument(tracing::info_span!("{{= operationId }}")); - future }