From 4265d7e3c90dd2baa7db55005ea91efc9011bdf5 Mon Sep 17 00:00:00 2001 From: Mingwei Samuel Date: Thu, 4 Jan 2024 09:53:15 -0800 Subject: [PATCH] Regen for `QueueType::CHERRY`, removed `champion-mastery-v4` summoner ID endpoints --- riven/src/consts/queue_type.rs | 6 ++- riven/src/consts/route.rs | 4 +- riven/src/endpoints.rs | 81 +--------------------------------- riven/src/meta.rs | 8 +--- riven/src/models.rs | 2 +- 5 files changed, 10 insertions(+), 91 deletions(-) diff --git a/riven/src/consts/queue_type.rs b/riven/src/consts/queue_type.rs index b8e595d..8f012bf 100644 --- a/riven/src/consts/queue_type.rs +++ b/riven/src/consts/queue_type.rs @@ -32,11 +32,13 @@ pub enum QueueType { /// Ranked Teamfight Tactics (Hyper Roll) games RANKED_TFT_TURBO, /// Ranked Teamfight Tactics (Double Up Workshop) games - /// Deprecated in patch 12.11 in favor of queueId 1160 - #[deprecated(note="Deprecated in patch 12.11 in favor of queueId 1160")] + /// Deprecated in patch 12.11 in favor of queueId 1160 (`RANKED_TFT_DOUBLE_UP`) + #[deprecated(note="Deprecated in patch 12.11 in favor of queueId 1160 (`RANKED_TFT_DOUBLE_UP`)")] RANKED_TFT_PAIRS, /// Ranked Teamfight Tactics (Double Up Workshop) games RANKED_TFT_DOUBLE_UP, + /// 2v2v2v2 "Arena" games + CHERRY, } serde_strum_unknown!(QueueType); diff --git a/riven/src/consts/route.rs b/riven/src/consts/route.rs index bd01dac..0069694 100644 --- a/riven/src/consts/route.rs +++ b/riven/src/consts/route.rs @@ -108,7 +108,7 @@ pub enum PlatformRoute { #[strum(to_string="NA1", serialize="NA")] NA1 = 23, - /// Oceana. + /// Oceania. /// /// `24` (riotapi-schema ID/repr) #[strum(to_string="OC1", serialize="OCE")] @@ -335,7 +335,7 @@ pub enum TournamentRegion { LAS = 22, /// North America. NA = 23, - /// Oceana. + /// Oceania. OCE = 24, /// Turkey TR = 26, diff --git a/riven/src/endpoints.rs b/riven/src/endpoints.rs index 3faf64f..707c595 100644 --- a/riven/src/endpoints.rs +++ b/riven/src/endpoints.rs @@ -7,7 +7,7 @@ /////////////////////////////////////////////// // http://www.mingweisamuel.com/riotapi-schema/tool/ -// Version cd204d7d764a025c280943766bc498278e439a6c +// Version d712d94a43004a22ad9f31b9ebfbcaa9e0820305 //! Automatically generated endpoint handles. #![allow(clippy::let_and_return, clippy::too_many_arguments)] @@ -432,66 +432,6 @@ impl<'a> ChampionMasteryV4<'a> { future } - /// Get all champion mastery entries sorted by number of champion points descending, - /// # Parameters - /// * `route` - Route to query. - /// * `encrypted_summoner_id` (required, in path) - Summoner ID associated with the player - /// # Riot Developer API Reference - /// `champion-mastery-v4.getAllChampionMasteries` - /// - /// Note: this method is automatically generated. - pub fn get_all_champion_masteries(&self, route: PlatformRoute, encrypted_summoner_id: &str) - -> impl Future>> + '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); - #[cfg(feature = "tracing")] - let future = future.instrument(tracing::info_span!("champion-mastery-v4.getAllChampionMasteries")); - future - } - - /// Get a champion mastery by player ID and champion ID. - /// # Parameters - /// * `route` - Route to query. - /// * `champion_id` (required, in path) - Champion ID to retrieve Champion Mastery for - /// * `encrypted_summoner_id` (required, in path) - Summoner ID associated with the player - /// # Riot Developer API Reference - /// `champion-mastery-v4.getChampionMastery` - /// - /// Note: this method is automatically generated. - pub fn get_champion_mastery(&self, route: PlatformRoute, encrypted_summoner_id: &str, champion_id: crate::consts::Champion) - -> impl Future>> + '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); - #[cfg(feature = "tracing")] - let future = future.instrument(tracing::info_span!("champion-mastery-v4.getChampionMastery")); - future - } - - /// Get specified number of top champion mastery entries sorted by number of champion points descending. - /// # Parameters - /// * `route` - Route to query. - /// * `encrypted_summoner_id` (required, in path) - Summoner ID associated with the player - /// * `count` (optional, in query) - Number of entries to retrieve, defaults to 3 - /// # Riot Developer API Reference - /// `champion-mastery-v4.getTopChampionMasteries` - /// - /// Note: this method is automatically generated. - pub fn get_top_champion_masteries(&self, route: PlatformRoute, encrypted_summoner_id: &str, count: Option) - -> impl Future>> + 'a - { - let route_str = route.into(); - let request = self.base.request(Method::GET, route_str, &format!("/lol/champion-mastery/v4/champion-masteries/by-summoner/{}/top", encrypted_summoner_id)); - let request = if let Some(count) = count { request.query(&[ ("count", count) ]) } else { request }; - let future = self.base.execute_val::>("champion-mastery-v4.getTopChampionMasteries", route_str, request); - #[cfg(feature = "tracing")] - let future = future.instrument(tracing::info_span!("champion-mastery-v4.getTopChampionMasteries")); - future - } - /// Get a player's total champion mastery score, which is the sum of individual champion mastery levels. /// # Parameters /// * `route` - Route to query. @@ -511,25 +451,6 @@ impl<'a> ChampionMasteryV4<'a> { future } - /// Get a player's total champion mastery score, which is the sum of individual champion mastery levels. - /// # Parameters - /// * `route` - Route to query. - /// * `encrypted_summoner_id` (required, in path) - Summoner ID associated with the player - /// # Riot Developer API Reference - /// `champion-mastery-v4.getChampionMasteryScore` - /// - /// Note: this method is automatically generated. - pub fn get_champion_mastery_score(&self, route: PlatformRoute, encrypted_summoner_id: &str) - -> impl Future> + '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); - #[cfg(feature = "tracing")] - let future = future.instrument(tracing::info_span!("champion-mastery-v4.getChampionMasteryScore")); - future - } - } /// ChampionV3 endpoints handle, accessed by calling [`champion_v3()`](crate::RiotApi::champion_v3) on a [`RiotApi`](crate::RiotApi) instance. diff --git a/riven/src/meta.rs b/riven/src/meta.rs index b904bd7..8c76862 100644 --- a/riven/src/meta.rs +++ b/riven/src/meta.rs @@ -7,7 +7,7 @@ /////////////////////////////////////////////// // http://www.mingweisamuel.com/riotapi-schema/tool/ -// Version cd204d7d764a025c280943766bc498278e439a6c +// Version d712d94a43004a22ad9f31b9ebfbcaa9e0820305 //! 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); 84] = [ +pub static ALL_ENDPOINTS: [(reqwest::Method, &str, &str); 80] = [ (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"), @@ -23,11 +23,7 @@ pub static ALL_ENDPOINTS: [(reqwest::Method, &str, &str); 84] = [ (reqwest::Method::GET, "/lol/champion-mastery/v4/champion-masteries/by-puuid/{encryptedPUUID}", "champion-mastery-v4.getAllChampionMasteriesByPUUID"), (reqwest::Method::GET, "/lol/champion-mastery/v4/champion-masteries/by-puuid/{encryptedPUUID}/by-champion/{championId}", "champion-mastery-v4.getChampionMasteryByPUUID"), (reqwest::Method::GET, "/lol/champion-mastery/v4/champion-masteries/by-puuid/{encryptedPUUID}/top", "champion-mastery-v4.getTopChampionMasteriesByPUUID"), - (reqwest::Method::GET, "/lol/champion-mastery/v4/champion-masteries/by-summoner/{encryptedSummonerId}", "champion-mastery-v4.getAllChampionMasteries"), - (reqwest::Method::GET, "/lol/champion-mastery/v4/champion-masteries/by-summoner/{encryptedSummonerId}/by-champion/{championId}", "champion-mastery-v4.getChampionMastery"), - (reqwest::Method::GET, "/lol/champion-mastery/v4/champion-masteries/by-summoner/{encryptedSummonerId}/top", "champion-mastery-v4.getTopChampionMasteries"), (reqwest::Method::GET, "/lol/champion-mastery/v4/scores/by-puuid/{encryptedPUUID}", "champion-mastery-v4.getChampionMasteryScoreByPUUID"), - (reqwest::Method::GET, "/lol/champion-mastery/v4/scores/by-summoner/{encryptedSummonerId}", "champion-mastery-v4.getChampionMasteryScore"), (reqwest::Method::GET, "/lol/platform/v3/champion-rotations", "champion-v3.getChampionInfo"), (reqwest::Method::GET, "/lol/clash/v1/players/by-summoner/{summonerId}", "clash-v1.getPlayersBySummoner"), (reqwest::Method::GET, "/lol/clash/v1/teams/{teamId}", "clash-v1.getTeamById"), diff --git a/riven/src/models.rs b/riven/src/models.rs index 804d7ea..78bb2a6 100644 --- a/riven/src/models.rs +++ b/riven/src/models.rs @@ -7,7 +7,7 @@ /////////////////////////////////////////////// // http://www.mingweisamuel.com/riotapi-schema/tool/ -// Version cd204d7d764a025c280943766bc498278e439a6c +// Version d712d94a43004a22ad9f31b9ebfbcaa9e0820305 #![allow(missing_docs)]