forked from mirror/Riven
1
0
Fork 0

Regen for `clash-v1.getPlayersByPUUID` (new) and `tft-league-v1.LeagueListDTO` optional fields

users/mingwei/lints
Mingwei Samuel 2023-04-01 21:52:08 -07:00
parent fa3e7a4bab
commit e5803092bf
3 changed files with 32 additions and 7 deletions

View File

@ -7,7 +7,7 @@
/////////////////////////////////////////////// ///////////////////////////////////////////////
// http://www.mingweisamuel.com/riotapi-schema/tool/ // http://www.mingweisamuel.com/riotapi-schema/tool/
// Version 00881b2fe08decaf43fb24d252c955e4d7e97019 // Version 675e4fa61821a0c21181c967ab2c6eca33a599c6
//! 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)]
@ -493,6 +493,27 @@ pub struct ClashV1<'a> {
base: &'a RiotApi, base: &'a RiotApi,
} }
impl<'a> ClashV1<'a> { 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
/// <a href="https://developer.riotgames.com/api-methods/#clash-v1/GET_getPlayersByPUUID" target="_blank">`clash-v1.getPlayersByPUUID`</a>
///
/// Note: this method is automatically generated.
pub fn get_players_by_puuid(&self, route: PlatformRoute, encrypted_puuid: &str)
-> impl Future<Output = Result<Vec<clash_v1::Player>>> + '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::<Vec<clash_v1::Player>>("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. /// Get players by summoner ID.
/// ## Implementation Notes /// ## 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. /// 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.

View File

@ -7,7 +7,7 @@
/////////////////////////////////////////////// ///////////////////////////////////////////////
// http://www.mingweisamuel.com/riotapi-schema/tool/ // http://www.mingweisamuel.com/riotapi-schema/tool/
// Version 00881b2fe08decaf43fb24d252c955e4d7e97019 // Version 675e4fa61821a0c21181c967ab2c6eca33a599c6
//! 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); 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-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"),
@ -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/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/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-puuid/{encryptedPUUID}", "clash-v1.getPlayersByPUUID"),
(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"),
(reqwest::Method::GET, "/lol/clash/v1/tournaments", "clash-v1.getTournaments"), (reqwest::Method::GET, "/lol/clash/v1/tournaments", "clash-v1.getTournaments"),

View File

@ -7,7 +7,7 @@
/////////////////////////////////////////////// ///////////////////////////////////////////////
// http://www.mingweisamuel.com/riotapi-schema/tool/ // http://www.mingweisamuel.com/riotapi-schema/tool/
// Version 00881b2fe08decaf43fb24d252c955e4d7e97019 // Version 675e4fa61821a0c21181c967ab2c6eca33a599c6
#![allow(missing_docs)] #![allow(missing_docs)]
@ -2388,15 +2388,18 @@ pub mod tft_league_v1 {
#[cfg_attr(feature = "deny-unknown-fields", serde(deny_unknown_fields))] #[cfg_attr(feature = "deny-unknown-fields", serde(deny_unknown_fields))]
pub struct LeagueList { pub struct LeagueList {
#[serde(rename = "leagueId")] #[serde(rename = "leagueId")]
pub league_id: String, #[serde(skip_serializing_if = "Option::is_none")]
pub league_id: Option<String>,
#[serde(rename = "entries")] #[serde(rename = "entries")]
pub entries: std::vec::Vec<LeagueItem>, pub entries: std::vec::Vec<LeagueItem>,
#[serde(rename = "tier")] #[serde(rename = "tier")]
pub tier: crate::consts::Tier, pub tier: crate::consts::Tier,
#[serde(rename = "name")] #[serde(rename = "name")]
pub name: String, #[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "queue")] #[serde(rename = "queue")]
pub queue: crate::consts::QueueType, #[serde(skip_serializing_if = "Option::is_none")]
pub queue: Option<crate::consts::QueueType>,
} }
/// LeagueItem data object. /// LeagueItem data object.
#[derive(Clone, Debug)] #[derive(Clone, Debug)]