forked from mirror/Riven
Regen for `Hwei`, removal of `clash-v1.getPlayersByPUUID`, and changed/new `match-v5.ParticipantDto.riotIdGameName` field
parent
ce2cd7c7a2
commit
904a6b083f
|
@ -59,6 +59,7 @@ newtype_enum! {
|
|||
/// `GWEN` | "Gwen" | "Gwen" | 887
|
||||
/// `HECARIM` | "Hecarim" | "Hecarim" | 120
|
||||
/// `HEIMERDINGER` | "Heimerdinger" | "Heimerdinger" | 74
|
||||
/// `HWEI` | "Hwei" | "Hwei" | 910
|
||||
/// `ILLAOI` | "Illaoi" | "Illaoi" | 420
|
||||
/// `IRELIA` | "Irelia" | "Irelia" | 39
|
||||
/// `IVERN` | "Ivern" | "Ivern" | 427
|
||||
|
@ -271,6 +272,8 @@ newtype_enum! {
|
|||
HECARIM = 120,
|
||||
/// `74`.
|
||||
HEIMERDINGER = 74,
|
||||
/// `910`.
|
||||
HWEI = 910,
|
||||
/// `420`.
|
||||
ILLAOI = 420,
|
||||
/// `39`.
|
||||
|
@ -565,6 +568,7 @@ impl Champion {
|
|||
Self::GWEN => Some("Gwen"),
|
||||
Self::HECARIM => Some("Hecarim"),
|
||||
Self::HEIMERDINGER => Some("Heimerdinger"),
|
||||
Self::HWEI => Some("Hwei"),
|
||||
Self::ILLAOI => Some("Illaoi"),
|
||||
Self::IRELIA => Some("Irelia"),
|
||||
Self::IVERN => Some("Ivern"),
|
||||
|
@ -754,6 +758,7 @@ impl Champion {
|
|||
Self::GWEN => Some("Gwen"),
|
||||
Self::HECARIM => Some("Hecarim"),
|
||||
Self::HEIMERDINGER => Some("Heimerdinger"),
|
||||
Self::HWEI => Some("Hwei"),
|
||||
Self::ILLAOI => Some("Illaoi"),
|
||||
Self::IRELIA => Some("Irelia"),
|
||||
Self::IVERN => Some("Ivern"),
|
||||
|
@ -976,6 +981,7 @@ impl std::str::FromStr for Champion {
|
|||
/* GWEN */ [ 'G', 'W', 'E', 'N'] => Ok(Champion::GWEN),
|
||||
/* HECA */ [ 'H', 'E', 'C', 'A'] => Ok(Champion::HECARIM),
|
||||
/* HEIM */ [ 'H', 'E', 'I', 'M'] => Ok(Champion::HEIMERDINGER),
|
||||
/* HWEI */ [ 'H', 'W', 'E', 'I'] => Ok(Champion::HWEI),
|
||||
/* ILLA */ [ 'I', 'L', 'L', 'A'] => Ok(Champion::ILLAOI),
|
||||
/* IREL */ [ 'I', 'R', 'E', 'L'] => Ok(Champion::IRELIA),
|
||||
/* IVER */ [ 'I', 'V', 'E', 'R'] => Ok(Champion::IVERN),
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
///////////////////////////////////////////////
|
||||
|
||||
// http://www.mingweisamuel.com/riotapi-schema/tool/
|
||||
// Version b554b42a14de337810d5a510d533453eaf6de207
|
||||
// Version a5a3a5f5d5f2a617a56302a0afac77c745e4fd56
|
||||
|
||||
//! Automatically generated endpoint handles.
|
||||
#![allow(clippy::let_and_return, clippy::too_many_arguments)]
|
||||
|
@ -572,27 +572,6 @@ 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.
|
||||
/// * `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, 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/{}", 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 b554b42a14de337810d5a510d533453eaf6de207
|
||||
// Version a5a3a5f5d5f2a617a56302a0afac77c745e4fd56
|
||||
|
||||
//! 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); 85] = [
|
||||
pub static ALL_ENDPOINTS: [(reqwest::Method, &str, &str); 84] = [
|
||||
(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"),
|
||||
|
@ -29,7 +29,6 @@ pub static ALL_ENDPOINTS: [(reqwest::Method, &str, &str); 85] = [
|
|||
(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-puuid/{puuid}", "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 b554b42a14de337810d5a510d533453eaf6de207
|
||||
// Version a5a3a5f5d5f2a617a56302a0afac77c745e4fd56
|
||||
|
||||
#![allow(missing_docs)]
|
||||
|
||||
|
@ -1160,7 +1160,11 @@ pub mod match_v5 {
|
|||
#[serde(rename = "quadraKills")]
|
||||
pub quadra_kills: i32,
|
||||
#[serde(rename = "riotIdName")]
|
||||
pub riot_id_name: String,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub riot_id_name: Option<String>,
|
||||
#[serde(rename = "riotIdGameName")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub riot_id_game_name: Option<String>,
|
||||
#[serde(rename = "riotIdTagline")]
|
||||
pub riot_id_tagline: String,
|
||||
#[serde(rename = "role")]
|
||||
|
|
Loading…
Reference in New Issue