From c9bca855f2a9c5d6e884b08a77bccb5b996dc189 Mon Sep 17 00:00:00 2001 From: Mingwei Samuel Date: Sat, 7 Jan 2023 17:56:47 -0800 Subject: [PATCH] Regen for K'Sante, `getByRSOPUUID` --- riven/src/consts/champion.rs | 7 +++++++ riven/src/endpoints.rs | 21 ++++++++++++++++++++- riven/src/meta.rs | 5 +++-- riven/src/models.rs | 2 +- 4 files changed, 31 insertions(+), 4 deletions(-) diff --git a/riven/src/consts/champion.rs b/riven/src/consts/champion.rs index ce691b2..75bf66b 100644 --- a/riven/src/consts/champion.rs +++ b/riven/src/consts/champion.rs @@ -67,6 +67,7 @@ newtype_enum! { /// `JAYCE` | "Jayce" | "Jayce" | 126 /// `JHIN` | "Jhin" | "Jhin" | 202 /// `JINX` | "Jinx" | "Jinx" | 222 + /// `K_SANTE` | "K'Sante" | "KSante" | 897 /// `KAI_SA` | "Kai'Sa" | "Kaisa" | 145 /// `KALISTA` | "Kalista" | "Kalista" | 429 /// `KARMA` | "Karma" | "Karma" | 43 @@ -283,6 +284,8 @@ newtype_enum! { JHIN = 202, /// `222`. JINX = 222, + /// `897`. + K_SANTE = 897, /// `145`. KAI_SA = 145, /// `429`. @@ -561,6 +564,7 @@ impl Champion { Self::JAYCE => Some("Jayce"), Self::JHIN => Some("Jhin"), Self::JINX => Some("Jinx"), + Self::K_SANTE => Some("K'Sante"), Self::KAI_SA => Some("Kai'Sa"), Self::KALISTA => Some("Kalista"), Self::KARMA => Some("Karma"), @@ -746,6 +750,7 @@ impl Champion { Self::JAYCE => Some("Jayce"), Self::JHIN => Some("Jhin"), Self::JINX => Some("Jinx"), + Self::K_SANTE => Some("KSante"), Self::KAI_SA => Some("Kaisa"), Self::KALISTA => Some("Kalista"), Self::KARMA => Some("Karma"), @@ -964,6 +969,8 @@ impl std::str::FromStr for Champion { /* JAYC */ [ 'J', 'A', 'Y', 'C'] => Ok(Champion::JAYCE), /* JHIN */ [ 'J', 'H', 'I', 'N'] => Ok(Champion::JHIN), /* JINX */ [ 'J', 'I', 'N', 'X'] => Ok(Champion::JINX), + /* KSAN */ [ 'K', 'S', 'A', 'N'] => Ok(Champion::K_SANTE), + /* K */ [ 'K', '\0', '\0', '\0'] => Ok(Champion::K_SANTE), /* KAIS */ [ 'K', 'A', 'I', 'S'] => Ok(Champion::KAI_SA), /* KAI */ [ 'K', 'A', 'I', '\0'] => Ok(Champion::KAI_SA), /* KALI */ [ 'K', 'A', 'L', 'I'] => Ok(Champion::KALISTA), diff --git a/riven/src/endpoints.rs b/riven/src/endpoints.rs index 485a040..16222a5 100644 --- a/riven/src/endpoints.rs +++ b/riven/src/endpoints.rs @@ -7,7 +7,7 @@ /////////////////////////////////////////////// // http://www.mingweisamuel.com/riotapi-schema/tool/ -// Version dae26e2703c82eb19447d1b27f1209801cb83beb +// Version a9b6936baced1f181b550b7fb921ab72b216076c //! Automatically generated endpoint handles. #![allow(clippy::let_and_return, clippy::too_many_arguments)] @@ -1280,6 +1280,25 @@ pub struct SummonerV4<'a> { base: &'a RiotApi, } impl<'a> SummonerV4<'a> { + /// Get a summoner by its RSO encrypted PUUID. + /// # Parameters + /// * `route` - Route to query. + /// * `rso_puuid` (required, in path) - Summoner ID + /// # Riot Developer API Reference + /// `summoner-v4.getByRSOPUUID` + /// + /// Note: this method is automatically generated. + pub fn get_by_rsopuuid(&self, route: PlatformRoute, rso_puuid: &str) + -> impl Future> + 'a + { + let route_str = route.into(); + let request = self.base.request(Method::GET, route_str, &format!("/fulfillment/v1/summoners/by-puuid/{}", rso_puuid)); + let future = self.base.execute_val::("summoner-v4.getByRSOPUUID", route_str, request); + #[cfg(feature = "tracing")] + let future = future.instrument(tracing::info_span!("summoner-v4.getByRSOPUUID")); + future + } + /// Get a summoner by account ID. /// # Parameters /// * `route` - Route to query. diff --git a/riven/src/meta.rs b/riven/src/meta.rs index b3cfb62..12fc4ba 100644 --- a/riven/src/meta.rs +++ b/riven/src/meta.rs @@ -7,7 +7,7 @@ /////////////////////////////////////////////// // http://www.mingweisamuel.com/riotapi-schema/tool/ -// Version dae26e2703c82eb19447d1b27f1209801cb83beb +// Version a9b6936baced1f181b550b7fb921ab72b216076c //! Metadata about the Riot API and Riven. //! @@ -15,7 +15,7 @@ /// Metadata for endpoints. Each tuple corresponds to one endpoint and contains /// the HTTP [`Method`](reqwest::Method), `str` path, and the method's `str` ID. -pub static ALL_ENDPOINTS: [(reqwest::Method, &str, &str); 77] = [ +pub static ALL_ENDPOINTS: [(reqwest::Method, &str, &str); 78] = [ (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"), @@ -57,6 +57,7 @@ pub static ALL_ENDPOINTS: [(reqwest::Method, &str, &str); 77] = [ (reqwest::Method::GET, "/lol/match/v5/matches/{matchId}/timeline", "match-v5.getTimeline"), (reqwest::Method::GET, "/lol/spectator/v4/active-games/by-summoner/{encryptedSummonerId}", "spectator-v4.getCurrentGameInfoBySummoner"), (reqwest::Method::GET, "/lol/spectator/v4/featured-games", "spectator-v4.getFeaturedGames"), + (reqwest::Method::GET, "/fulfillment/v1/summoners/by-puuid/{rsoPUUID}", "summoner-v4.getByRSOPUUID"), (reqwest::Method::GET, "/lol/summoner/v4/summoners/by-account/{encryptedAccountId}", "summoner-v4.getByAccountId"), (reqwest::Method::GET, "/lol/summoner/v4/summoners/by-name/{summonerName}", "summoner-v4.getBySummonerName"), (reqwest::Method::GET, "/lol/summoner/v4/summoners/by-puuid/{encryptedPUUID}", "summoner-v4.getByPUUID"), diff --git a/riven/src/models.rs b/riven/src/models.rs index e4424e2..7ce613c 100644 --- a/riven/src/models.rs +++ b/riven/src/models.rs @@ -7,7 +7,7 @@ /////////////////////////////////////////////// // http://www.mingweisamuel.com/riotapi-schema/tool/ -// Version dae26e2703c82eb19447d1b27f1209801cb83beb +// Version a9b6936baced1f181b550b7fb921ab72b216076c #![allow(missing_docs)]