diff --git a/riven/src/endpoints.rs b/riven/src/endpoints.rs index a5b1747..ccabce8 100644 --- a/riven/src/endpoints.rs +++ b/riven/src/endpoints.rs @@ -7,7 +7,7 @@ /////////////////////////////////////////////// // http://www.mingweisamuel.com/riotapi-schema/tool/ -// Version 00881b2fe08decaf43fb24d252c955e4d7e97019 +// Version 675e4fa61821a0c21181c967ab2c6eca33a599c6 //! Automatically generated endpoint handles. #![allow(clippy::let_and_return, clippy::too_many_arguments)] @@ -493,6 +493,27 @@ pub struct ClashV1<'a> { base: &'a RiotApi, } impl<'a> ClashV1<'a> { + /// Get players by puuid + /// ## Implementation Notes + /// This endpoint returns a list of active Clash players for a given PUUID. If a summoner registers for multiple tournaments at the same time (e.g., Saturday and Sunday) then both registrations would appear in this list. + /// # Parameters + /// * `route` - Route to query. + /// * `encrypted_puuid` (required, in path) + /// # Riot Developer API Reference + /// `clash-v1.getPlayersByPUUID` + /// + /// Note: this method is automatically generated. + pub fn get_players_by_puuid(&self, route: PlatformRoute, encrypted_puuid: &str) + -> impl Future>> + 'a + { + let route_str = route.into(); + let request = self.base.request(Method::GET, route_str, &format!("/lol/clash/v1/players/by-puuid/{}", encrypted_puuid)); + let future = self.base.execute_val::>("clash-v1.getPlayersByPUUID", route_str, request); + #[cfg(feature = "tracing")] + let future = future.instrument(tracing::info_span!("clash-v1.getPlayersByPUUID")); + future + } + /// Get players by summoner ID. /// ## Implementation Notes /// This endpoint returns a list of active Clash players for a given summoner ID. If a summoner registers for multiple tournaments at the same time (e.g., Saturday and Sunday) then both registrations would appear in this list. diff --git a/riven/src/meta.rs b/riven/src/meta.rs index a46f7a0..2f1ca67 100644 --- a/riven/src/meta.rs +++ b/riven/src/meta.rs @@ -7,7 +7,7 @@ /////////////////////////////////////////////// // http://www.mingweisamuel.com/riotapi-schema/tool/ -// Version 00881b2fe08decaf43fb24d252c955e4d7e97019 +// Version 675e4fa61821a0c21181c967ab2c6eca33a599c6 //! 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); 78] = [ +pub static ALL_ENDPOINTS: [(reqwest::Method, &str, &str); 79] = [ (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"), @@ -25,6 +25,7 @@ pub static ALL_ENDPOINTS: [(reqwest::Method, &str, &str); 78] = [ (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-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-puuid/{encryptedPUUID}", "clash-v1.getPlayersByPUUID"), (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/tournaments", "clash-v1.getTournaments"), diff --git a/riven/src/models.rs b/riven/src/models.rs index 31224a9..a1f0078 100644 --- a/riven/src/models.rs +++ b/riven/src/models.rs @@ -7,7 +7,7 @@ /////////////////////////////////////////////// // http://www.mingweisamuel.com/riotapi-schema/tool/ -// Version 00881b2fe08decaf43fb24d252c955e4d7e97019 +// Version 675e4fa61821a0c21181c967ab2c6eca33a599c6 #![allow(missing_docs)] @@ -2388,15 +2388,18 @@ pub mod tft_league_v1 { #[cfg_attr(feature = "deny-unknown-fields", serde(deny_unknown_fields))] pub struct LeagueList { #[serde(rename = "leagueId")] - pub league_id: String, + #[serde(skip_serializing_if = "Option::is_none")] + pub league_id: Option, #[serde(rename = "entries")] pub entries: std::vec::Vec, #[serde(rename = "tier")] pub tier: crate::consts::Tier, #[serde(rename = "name")] - pub name: String, + #[serde(skip_serializing_if = "Option::is_none")] + pub name: Option, #[serde(rename = "queue")] - pub queue: crate::consts::QueueType, + #[serde(skip_serializing_if = "Option::is_none")] + pub queue: Option, } /// LeagueItem data object. #[derive(Clone, Debug)]