Regen for `QueueType::CHERRY`, removed `champion-mastery-v4` summoner ID endpoints

pull/62/head
Mingwei Samuel 2024-01-04 09:53:15 -08:00
parent 4391d214aa
commit 4265d7e3c9
5 changed files with 10 additions and 91 deletions

View File

@ -32,11 +32,13 @@ pub enum QueueType {
/// Ranked Teamfight Tactics (Hyper Roll) games /// Ranked Teamfight Tactics (Hyper Roll) games
RANKED_TFT_TURBO, RANKED_TFT_TURBO,
/// Ranked Teamfight Tactics (Double Up Workshop) games /// Ranked Teamfight Tactics (Double Up Workshop) games
/// 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")] #[deprecated(note="Deprecated in patch 12.11 in favor of queueId 1160 (`RANKED_TFT_DOUBLE_UP`)")]
RANKED_TFT_PAIRS, RANKED_TFT_PAIRS,
/// Ranked Teamfight Tactics (Double Up Workshop) games /// Ranked Teamfight Tactics (Double Up Workshop) games
RANKED_TFT_DOUBLE_UP, RANKED_TFT_DOUBLE_UP,
/// 2v2v2v2 "Arena" games
CHERRY,
} }
serde_strum_unknown!(QueueType); serde_strum_unknown!(QueueType);

View File

@ -108,7 +108,7 @@ pub enum PlatformRoute {
#[strum(to_string="NA1", serialize="NA")] #[strum(to_string="NA1", serialize="NA")]
NA1 = 23, NA1 = 23,
/// Oceana. /// Oceania.
/// ///
/// `24` (riotapi-schema ID/repr) /// `24` (riotapi-schema ID/repr)
#[strum(to_string="OC1", serialize="OCE")] #[strum(to_string="OC1", serialize="OCE")]
@ -335,7 +335,7 @@ pub enum TournamentRegion {
LAS = 22, LAS = 22,
/// North America. /// North America.
NA = 23, NA = 23,
/// Oceana. /// Oceania.
OCE = 24, OCE = 24,
/// Turkey /// Turkey
TR = 26, TR = 26,

View File

@ -7,7 +7,7 @@
/////////////////////////////////////////////// ///////////////////////////////////////////////
// http://www.mingweisamuel.com/riotapi-schema/tool/ // http://www.mingweisamuel.com/riotapi-schema/tool/
// Version cd204d7d764a025c280943766bc498278e439a6c // Version d712d94a43004a22ad9f31b9ebfbcaa9e0820305
//! Automatically generated endpoint handles. //! Automatically generated endpoint handles.
#![allow(clippy::let_and_return, clippy::too_many_arguments)] #![allow(clippy::let_and_return, clippy::too_many_arguments)]
@ -432,66 +432,6 @@ impl<'a> ChampionMasteryV4<'a> {
future 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
/// <a href="https://developer.riotgames.com/api-methods/#champion-mastery-v4/GET_getAllChampionMasteries" target="_blank">`champion-mastery-v4.getAllChampionMasteries`</a>
///
/// Note: this method is automatically generated.
pub fn get_all_champion_masteries(&self, route: PlatformRoute, encrypted_summoner_id: &str)
-> impl Future<Output = Result<Vec<champion_mastery_v4::ChampionMastery>>> + '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::<Vec<champion_mastery_v4::ChampionMastery>>("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
/// <a href="https://developer.riotgames.com/api-methods/#champion-mastery-v4/GET_getChampionMastery" target="_blank">`champion-mastery-v4.getChampionMastery`</a>
///
/// 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<Output = Result<Option<champion_mastery_v4::ChampionMastery>>> + '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::ChampionMastery>("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
/// <a href="https://developer.riotgames.com/api-methods/#champion-mastery-v4/GET_getTopChampionMasteries" target="_blank">`champion-mastery-v4.getTopChampionMasteries`</a>
///
/// Note: this method is automatically generated.
pub fn get_top_champion_masteries(&self, route: PlatformRoute, encrypted_summoner_id: &str, count: Option<i32>)
-> impl Future<Output = Result<Vec<champion_mastery_v4::ChampionMastery>>> + '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::<Vec<champion_mastery_v4::ChampionMastery>>("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. /// Get a player's total champion mastery score, which is the sum of individual champion mastery levels.
/// # Parameters /// # Parameters
/// * `route` - Route to query. /// * `route` - Route to query.
@ -511,25 +451,6 @@ impl<'a> ChampionMasteryV4<'a> {
future 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
/// <a href="https://developer.riotgames.com/api-methods/#champion-mastery-v4/GET_getChampionMasteryScore" target="_blank">`champion-mastery-v4.getChampionMasteryScore`</a>
///
/// Note: this method is automatically generated.
pub fn get_champion_mastery_score(&self, route: PlatformRoute, encrypted_summoner_id: &str)
-> impl Future<Output = Result<i32>> + '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::<i32>("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. /// ChampionV3 endpoints handle, accessed by calling [`champion_v3()`](crate::RiotApi::champion_v3) on a [`RiotApi`](crate::RiotApi) instance.

View File

@ -7,7 +7,7 @@
/////////////////////////////////////////////// ///////////////////////////////////////////////
// http://www.mingweisamuel.com/riotapi-schema/tool/ // http://www.mingweisamuel.com/riotapi-schema/tool/
// Version cd204d7d764a025c280943766bc498278e439a6c // Version d712d94a43004a22ad9f31b9ebfbcaa9e0820305
//! Metadata about the Riot API and Riven. //! Metadata about the Riot API and Riven.
//! //!
@ -15,7 +15,7 @@
/// Metadata for endpoints. Each tuple corresponds to one endpoint and contains /// Metadata for endpoints. Each tuple corresponds to one endpoint and contains
/// the HTTP [`Method`](reqwest::Method), `str` path, and the method's `str` ID. /// 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-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/by-riot-id/{gameName}/{tagLine}", "account-v1.getByRiotId"),
(reqwest::Method::GET, "/riot/account/v1/accounts/me", "account-v1.getByAccessToken"), (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}", "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}/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-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-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/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/players/by-summoner/{summonerId}", "clash-v1.getPlayersBySummoner"),
(reqwest::Method::GET, "/lol/clash/v1/teams/{teamId}", "clash-v1.getTeamById"), (reqwest::Method::GET, "/lol/clash/v1/teams/{teamId}", "clash-v1.getTeamById"),

View File

@ -7,7 +7,7 @@
/////////////////////////////////////////////// ///////////////////////////////////////////////
// http://www.mingweisamuel.com/riotapi-schema/tool/ // http://www.mingweisamuel.com/riotapi-schema/tool/
// Version cd204d7d764a025c280943766bc498278e439a6c // Version d712d94a43004a22ad9f31b9ebfbcaa9e0820305
#![allow(missing_docs)] #![allow(missing_docs)]