mirror of
https://github.com/MingweiSamuel/Riven.git
synced 2024-12-26 10:56:34 +00:00
Regen for K'Sante, getByRSOPUUID
This commit is contained in:
parent
342c87e682
commit
c9bca855f2
4 changed files with 31 additions and 4 deletions
|
@ -67,6 +67,7 @@ newtype_enum! {
|
|||
/// `JAYCE` | "Jayce" | "Jayce" | 126
|
||||
/// `JHIN` | "Jhin" | "Jhin" | 202
|
||||
/// `JINX` | "Jinx" | "Jinx" | 222
|
||||
/// `K_SANTE` | "K'Sante" | "KSante" | 897
|
||||
/// `KAI_SA` | "Kai'Sa" | "Kaisa" | 145
|
||||
/// `KALISTA` | "Kalista" | "Kalista" | 429
|
||||
/// `KARMA` | "Karma" | "Karma" | 43
|
||||
|
@ -283,6 +284,8 @@ newtype_enum! {
|
|||
JHIN = 202,
|
||||
/// `222`.
|
||||
JINX = 222,
|
||||
/// `897`.
|
||||
K_SANTE = 897,
|
||||
/// `145`.
|
||||
KAI_SA = 145,
|
||||
/// `429`.
|
||||
|
@ -561,6 +564,7 @@ impl Champion {
|
|||
Self::JAYCE => Some("Jayce"),
|
||||
Self::JHIN => Some("Jhin"),
|
||||
Self::JINX => Some("Jinx"),
|
||||
Self::K_SANTE => Some("K'Sante"),
|
||||
Self::KAI_SA => Some("Kai'Sa"),
|
||||
Self::KALISTA => Some("Kalista"),
|
||||
Self::KARMA => Some("Karma"),
|
||||
|
@ -746,6 +750,7 @@ impl Champion {
|
|||
Self::JAYCE => Some("Jayce"),
|
||||
Self::JHIN => Some("Jhin"),
|
||||
Self::JINX => Some("Jinx"),
|
||||
Self::K_SANTE => Some("KSante"),
|
||||
Self::KAI_SA => Some("Kaisa"),
|
||||
Self::KALISTA => Some("Kalista"),
|
||||
Self::KARMA => Some("Karma"),
|
||||
|
@ -964,6 +969,8 @@ impl std::str::FromStr for Champion {
|
|||
/* JAYC */ [ 'J', 'A', 'Y', 'C'] => Ok(Champion::JAYCE),
|
||||
/* JHIN */ [ 'J', 'H', 'I', 'N'] => Ok(Champion::JHIN),
|
||||
/* JINX */ [ 'J', 'I', 'N', 'X'] => Ok(Champion::JINX),
|
||||
/* KSAN */ [ 'K', 'S', 'A', 'N'] => Ok(Champion::K_SANTE),
|
||||
/* K */ [ 'K', '\0', '\0', '\0'] => Ok(Champion::K_SANTE),
|
||||
/* KAIS */ [ 'K', 'A', 'I', 'S'] => Ok(Champion::KAI_SA),
|
||||
/* KAI */ [ 'K', 'A', 'I', '\0'] => Ok(Champion::KAI_SA),
|
||||
/* KALI */ [ 'K', 'A', 'L', 'I'] => Ok(Champion::KALISTA),
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
///////////////////////////////////////////////
|
||||
|
||||
// http://www.mingweisamuel.com/riotapi-schema/tool/
|
||||
// Version dae26e2703c82eb19447d1b27f1209801cb83beb
|
||||
// Version a9b6936baced1f181b550b7fb921ab72b216076c
|
||||
|
||||
//! Automatically generated endpoint handles.
|
||||
#![allow(clippy::let_and_return, clippy::too_many_arguments)]
|
||||
|
@ -1280,6 +1280,25 @@ pub struct SummonerV4<'a> {
|
|||
base: &'a RiotApi,
|
||||
}
|
||||
impl<'a> SummonerV4<'a> {
|
||||
/// Get a summoner by its RSO encrypted PUUID.
|
||||
/// # Parameters
|
||||
/// * `route` - Route to query.
|
||||
/// * `rso_puuid` (required, in path) - Summoner ID
|
||||
/// # Riot Developer API Reference
|
||||
/// <a href="https://developer.riotgames.com/api-methods/#summoner-v4/GET_getByRSOPUUID" target="_blank">`summoner-v4.getByRSOPUUID`</a>
|
||||
///
|
||||
/// Note: this method is automatically generated.
|
||||
pub fn get_by_rsopuuid(&self, route: PlatformRoute, rso_puuid: &str)
|
||||
-> impl Future<Output = Result<summoner_v4::Summoner>> + 'a
|
||||
{
|
||||
let route_str = route.into();
|
||||
let request = self.base.request(Method::GET, route_str, &format!("/fulfillment/v1/summoners/by-puuid/{}", rso_puuid));
|
||||
let future = self.base.execute_val::<summoner_v4::Summoner>("summoner-v4.getByRSOPUUID", route_str, request);
|
||||
#[cfg(feature = "tracing")]
|
||||
let future = future.instrument(tracing::info_span!("summoner-v4.getByRSOPUUID"));
|
||||
future
|
||||
}
|
||||
|
||||
/// Get a summoner by account ID.
|
||||
/// # Parameters
|
||||
/// * `route` - Route to query.
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
///////////////////////////////////////////////
|
||||
|
||||
// http://www.mingweisamuel.com/riotapi-schema/tool/
|
||||
// Version dae26e2703c82eb19447d1b27f1209801cb83beb
|
||||
// Version a9b6936baced1f181b550b7fb921ab72b216076c
|
||||
|
||||
//! 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); 77] = [
|
||||
pub static ALL_ENDPOINTS: [(reqwest::Method, &str, &str); 78] = [
|
||||
(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"),
|
||||
|
@ -57,6 +57,7 @@ pub static ALL_ENDPOINTS: [(reqwest::Method, &str, &str); 77] = [
|
|||
(reqwest::Method::GET, "/lol/match/v5/matches/{matchId}/timeline", "match-v5.getTimeline"),
|
||||
(reqwest::Method::GET, "/lol/spectator/v4/active-games/by-summoner/{encryptedSummonerId}", "spectator-v4.getCurrentGameInfoBySummoner"),
|
||||
(reqwest::Method::GET, "/lol/spectator/v4/featured-games", "spectator-v4.getFeaturedGames"),
|
||||
(reqwest::Method::GET, "/fulfillment/v1/summoners/by-puuid/{rsoPUUID}", "summoner-v4.getByRSOPUUID"),
|
||||
(reqwest::Method::GET, "/lol/summoner/v4/summoners/by-account/{encryptedAccountId}", "summoner-v4.getByAccountId"),
|
||||
(reqwest::Method::GET, "/lol/summoner/v4/summoners/by-name/{summonerName}", "summoner-v4.getBySummonerName"),
|
||||
(reqwest::Method::GET, "/lol/summoner/v4/summoners/by-puuid/{encryptedPUUID}", "summoner-v4.getByPUUID"),
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
///////////////////////////////////////////////
|
||||
|
||||
// http://www.mingweisamuel.com/riotapi-schema/tool/
|
||||
// Version dae26e2703c82eb19447d1b27f1209801cb83beb
|
||||
// Version a9b6936baced1f181b550b7fb921ab72b216076c
|
||||
|
||||
#![allow(missing_docs)]
|
||||
|
||||
|
|
Loading…
Reference in a new issue