mirror of
https://github.com/MingweiSamuel/Riven.git
synced 2024-12-26 10:56:34 +00:00
Regen for clash-v1.getPlayersByPUUID
(new) and tft-league-v1.LeagueListDTO
optional fields
This commit is contained in:
parent
fa3e7a4bab
commit
e5803092bf
3 changed files with 32 additions and 7 deletions
|
@ -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
|
||||
/// <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.
|
||||
/// ## 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.
|
||||
|
|
|
@ -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"),
|
||||
|
|
|
@ -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<String>,
|
||||
#[serde(rename = "entries")]
|
||||
pub entries: std::vec::Vec<LeagueItem>,
|
||||
#[serde(rename = "tier")]
|
||||
pub tier: crate::consts::Tier,
|
||||
#[serde(rename = "name")]
|
||||
pub name: String,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub name: Option<String>,
|
||||
#[serde(rename = "queue")]
|
||||
pub queue: crate::consts::QueueType,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub queue: Option<crate::consts::QueueType>,
|
||||
}
|
||||
/// LeagueItem data object.
|
||||
#[derive(Clone, Debug)]
|
||||
|
|
Loading…
Reference in a new issue