mirror of
https://github.com/MingweiSamuel/Riven.git
synced 2024-12-26 10:56:34 +00:00
Regen for STRAWBERRY
This commit is contained in:
parent
a584d07aef
commit
3626b84326
6 changed files with 160 additions and 5 deletions
|
@ -29,7 +29,7 @@ pub enum GameMode {
|
||||||
ASCENSION,
|
ASCENSION,
|
||||||
/// Blood Hunt Assassin games
|
/// Blood Hunt Assassin games
|
||||||
ASSASSINATE,
|
ASSASSINATE,
|
||||||
/// 2v2v2v2
|
/// 2v2v2v2 Arena
|
||||||
CHERRY,
|
CHERRY,
|
||||||
/// Classic Summoner's Rift and Twisted Treeline games
|
/// Classic Summoner's Rift and Twisted Treeline games
|
||||||
CLASSIC,
|
CLASSIC,
|
||||||
|
@ -59,6 +59,8 @@ pub enum GameMode {
|
||||||
SIEGE,
|
SIEGE,
|
||||||
/// Star Guardian Invasion games
|
/// Star Guardian Invasion games
|
||||||
STARGUARDIAN,
|
STARGUARDIAN,
|
||||||
|
/// Swarm
|
||||||
|
STRAWBERRY,
|
||||||
/// Teamfight Tactics.
|
/// Teamfight Tactics.
|
||||||
TFT,
|
TFT,
|
||||||
/// Tutorial games
|
/// Tutorial games
|
||||||
|
|
|
@ -74,5 +74,9 @@ newtype_enum! {
|
||||||
/// Arena
|
/// Arena
|
||||||
/// Map for 2v2v2v2 (`CHERRY`). Team up with a friend or venture solo in this new game mode. Face against multiple teams in chaotic battles across diverse arenas
|
/// Map for 2v2v2v2 (`CHERRY`). Team up with a friend or venture solo in this new game mode. Face against multiple teams in chaotic battles across diverse arenas
|
||||||
ARENA = 30,
|
ARENA = 30,
|
||||||
|
/// `33`.
|
||||||
|
/// Swarm
|
||||||
|
/// Map for Swarm (`STRAWBERRY`). Team up with a friend or venture solo in this horde survival mode.
|
||||||
|
SWARM = 33,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -382,6 +382,18 @@ newtype_enum! {
|
||||||
/// `1710`.
|
/// `1710`.
|
||||||
/// Arena (`CHERRY` games) games on Rings of Wrath
|
/// Arena (`CHERRY` games) games on Rings of Wrath
|
||||||
RINGS_OF_WRATH_ARENA_CHERRY_GAMES = 1710,
|
RINGS_OF_WRATH_ARENA_CHERRY_GAMES = 1710,
|
||||||
|
/// `1810`.
|
||||||
|
/// Swarm solo (`STRAWBERRY` games) games on Swarm
|
||||||
|
SWARM_SOLO_STRAWBERRY_GAMES = 1810,
|
||||||
|
/// `1820`.
|
||||||
|
/// Swarm duo (`STRAWBERRY` games) games on Swarm
|
||||||
|
SWARM_DUO_STRAWBERRY_GAMES = 1820,
|
||||||
|
/// `1830`.
|
||||||
|
/// Swarm trio (`STRAWBERRY` games) games on Swarm
|
||||||
|
SWARM_TRIO_STRAWBERRY_GAMES = 1830,
|
||||||
|
/// `1840`.
|
||||||
|
/// Swarm quad (`STRAWBERRY` games) games on Swarm
|
||||||
|
SWARM_QUAD_STRAWBERRY_GAMES = 1840,
|
||||||
/// `1900`.
|
/// `1900`.
|
||||||
/// Pick URF games on Summoner's Rift
|
/// Pick URF games on Summoner's Rift
|
||||||
SUMMONERS_RIFT_PICK_URF = 1900,
|
SUMMONERS_RIFT_PICK_URF = 1900,
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
///////////////////////////////////////////////
|
///////////////////////////////////////////////
|
||||||
|
|
||||||
// http://www.mingweisamuel.com/riotapi-schema/tool/
|
// http://www.mingweisamuel.com/riotapi-schema/tool/
|
||||||
// Version 54ad38717276da9ce06bc6da8b27008d59d109f2
|
// Version db87f38b04ca43dab4aa172bf66ad33bce803528
|
||||||
|
|
||||||
//! 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)]
|
||||||
|
@ -90,6 +90,15 @@ impl RiotApi {
|
||||||
pub fn lol_challenges_v1(&self) -> LolChallengesV1 {
|
pub fn lol_challenges_v1(&self) -> LolChallengesV1 {
|
||||||
LolChallengesV1 { base: self }
|
LolChallengesV1 { base: self }
|
||||||
}
|
}
|
||||||
|
/// Returns a handle for accessing [LolRsoMatchV1](crate::endpoints::LolRsoMatchV1) endpoints.
|
||||||
|
/// # Riot Developer API Reference
|
||||||
|
/// <a href="https://developer.riotgames.com/apis#lol-rso-match-v1" target="_blank">`lol-rso-match-v1`</a>
|
||||||
|
///
|
||||||
|
/// Note: this method is automatically generated.
|
||||||
|
#[inline]
|
||||||
|
pub fn lol_rso_match_v1(&self) -> LolRsoMatchV1 {
|
||||||
|
LolRsoMatchV1 { base: self }
|
||||||
|
}
|
||||||
/// Returns a handle for accessing [LolStatusV4](crate::endpoints::LolStatusV4) endpoints.
|
/// Returns a handle for accessing [LolStatusV4](crate::endpoints::LolStatusV4) endpoints.
|
||||||
/// # Riot Developer API Reference
|
/// # Riot Developer API Reference
|
||||||
/// <a href="https://developer.riotgames.com/apis#lol-status-v4" target="_blank">`lol-status-v4`</a>
|
/// <a href="https://developer.riotgames.com/apis#lol-status-v4" target="_blank">`lol-status-v4`</a>
|
||||||
|
@ -897,6 +906,104 @@ impl<'a> LolChallengesV1<'a> {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// LolRsoMatchV1 endpoints handle, accessed by calling [`lol_rso_match_v1()`](crate::RiotApi::lol_rso_match_v1) on a [`RiotApi`](crate::RiotApi) instance.
|
||||||
|
/// # Riot Developer API Reference
|
||||||
|
/// <a href="https://developer.riotgames.com/apis#lol-rso-match-v1" target="_blank">`lol-rso-match-v1`</a>
|
||||||
|
///
|
||||||
|
/// Note: this struct is automatically generated.
|
||||||
|
#[repr(transparent)]
|
||||||
|
pub struct LolRsoMatchV1<'a> {
|
||||||
|
base: &'a RiotApi,
|
||||||
|
}
|
||||||
|
impl<'a> LolRsoMatchV1<'a> {
|
||||||
|
/// Get a list of match ids by player access token - Includes custom matches
|
||||||
|
/// # Parameters
|
||||||
|
/// * `route` - Route to query.
|
||||||
|
/// * `access_token` - RSO access token.
|
||||||
|
/// * `count` (optional, in query) - Defaults to 20. Valid values: 0 to 100. Number of match ids to return.
|
||||||
|
/// * `start` (optional, in query) - Defaults to 0. Start index.
|
||||||
|
/// * `type` (optional, in query) - Filter the list of match ids by the type of match. This filter is mutually inclusive of the queue filter meaning any match ids returned must match both the queue and type filters.
|
||||||
|
/// * `queue` (optional, in query) - Filter the list of match ids by a specific queue id. This filter is mutually inclusive of the type filter meaning any match ids returned must match both the queue and type filters.
|
||||||
|
/// * `end_time` (optional, in query) - Epoch timestamp in seconds.
|
||||||
|
/// * `start_time` (optional, in query) - Epoch timestamp in seconds. The matchlist started storing timestamps on June 16th, 2021. Any matches played before June 16th, 2021 won't be included in the results if the startTime filter is set.
|
||||||
|
/// # RSO
|
||||||
|
/// This endpoint uses [Riot Sign On](https://developer.riotgames.com/docs/lol#rso-integration)
|
||||||
|
/// via the `access_token` parameter, instead of the Riot API key.
|
||||||
|
/// # Riot Developer API Reference
|
||||||
|
/// <a href="https://developer.riotgames.com/api-methods/#lol-rso-match-v1/GET_getMatchIds" target="_blank">`lol-rso-match-v1.getMatchIds`</a>
|
||||||
|
///
|
||||||
|
/// Note: this method is automatically generated.
|
||||||
|
pub fn get_match_ids(&self, route: RegionalRoute, access_token: impl std::fmt::Display, count: Option<i32>, end_time: Option<i64>, queue: Option<i32>, start: Option<i32>, start_time: Option<i64>, r#type: Option<&str>)
|
||||||
|
-> impl Future<Output = Result<Vec<String>>> + 'a
|
||||||
|
{
|
||||||
|
let route_str = route.into();
|
||||||
|
let request = self.base.request(Method::GET, route_str, "/lol/rso-match/v1/matches/ids");
|
||||||
|
let mut request = request.bearer_auth(access_token);
|
||||||
|
if let Some(clear) = self.base.get_rso_clear_header() { request = request.header(clear, "") }
|
||||||
|
let request = if let Some(count) = count { request.query(&[ ("count", count) ]) } else { request };
|
||||||
|
let request = if let Some(end_time) = end_time { request.query(&[ ("endTime", end_time) ]) } else { request };
|
||||||
|
let request = if let Some(queue) = queue { request.query(&[ ("queue", queue) ]) } else { request };
|
||||||
|
let request = if let Some(start) = start { request.query(&[ ("start", start) ]) } else { request };
|
||||||
|
let request = if let Some(start_time) = start_time { request.query(&[ ("startTime", start_time) ]) } else { request };
|
||||||
|
let request = if let Some(r#type) = r#type { request.query(&[ ("type", r#type) ]) } else { request };
|
||||||
|
let future = self.base.execute_val::<Vec<String>>("lol-rso-match-v1.getMatchIds", route_str, request);
|
||||||
|
#[cfg(feature = "tracing")]
|
||||||
|
let future = future.instrument(tracing::info_span!("lol-rso-match-v1.getMatchIds"));
|
||||||
|
future
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Get a match by match id
|
||||||
|
/// # Parameters
|
||||||
|
/// * `route` - Route to query.
|
||||||
|
/// * `access_token` - RSO access token.
|
||||||
|
/// * `match_id` (required, in path)
|
||||||
|
/// # RSO
|
||||||
|
/// This endpoint uses [Riot Sign On](https://developer.riotgames.com/docs/lol#rso-integration)
|
||||||
|
/// via the `access_token` parameter, instead of the Riot API key.
|
||||||
|
/// # Riot Developer API Reference
|
||||||
|
/// <a href="https://developer.riotgames.com/api-methods/#lol-rso-match-v1/GET_getMatch" target="_blank">`lol-rso-match-v1.getMatch`</a>
|
||||||
|
///
|
||||||
|
/// Note: this method is automatically generated.
|
||||||
|
pub fn get_match(&self, route: RegionalRoute, access_token: impl std::fmt::Display, match_id: &str)
|
||||||
|
-> impl Future<Output = Result<lol_rso_match_v1::Match>> + 'a
|
||||||
|
{
|
||||||
|
let route_str = route.into();
|
||||||
|
let request = self.base.request(Method::GET, route_str, &format!("/lol/rso-match/v1/matches/{}", match_id));
|
||||||
|
let mut request = request.bearer_auth(access_token);
|
||||||
|
if let Some(clear) = self.base.get_rso_clear_header() { request = request.header(clear, "") }
|
||||||
|
let future = self.base.execute_val::<lol_rso_match_v1::Match>("lol-rso-match-v1.getMatch", route_str, request);
|
||||||
|
#[cfg(feature = "tracing")]
|
||||||
|
let future = future.instrument(tracing::info_span!("lol-rso-match-v1.getMatch"));
|
||||||
|
future
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Get a match timeline by match id
|
||||||
|
/// # Parameters
|
||||||
|
/// * `route` - Route to query.
|
||||||
|
/// * `access_token` - RSO access token.
|
||||||
|
/// * `match_id` (required, in path)
|
||||||
|
/// # RSO
|
||||||
|
/// This endpoint uses [Riot Sign On](https://developer.riotgames.com/docs/lol#rso-integration)
|
||||||
|
/// via the `access_token` parameter, instead of the Riot API key.
|
||||||
|
/// # Riot Developer API Reference
|
||||||
|
/// <a href="https://developer.riotgames.com/api-methods/#lol-rso-match-v1/GET_getTimeline" target="_blank">`lol-rso-match-v1.getTimeline`</a>
|
||||||
|
///
|
||||||
|
/// Note: this method is automatically generated.
|
||||||
|
pub fn get_timeline(&self, route: RegionalRoute, access_token: impl std::fmt::Display, match_id: &str)
|
||||||
|
-> impl Future<Output = Result<lol_rso_match_v1::Timeline>> + 'a
|
||||||
|
{
|
||||||
|
let route_str = route.into();
|
||||||
|
let request = self.base.request(Method::GET, route_str, &format!("/lol/rso-match/v1/matches/{}/timeline", match_id));
|
||||||
|
let mut request = request.bearer_auth(access_token);
|
||||||
|
if let Some(clear) = self.base.get_rso_clear_header() { request = request.header(clear, "") }
|
||||||
|
let future = self.base.execute_val::<lol_rso_match_v1::Timeline>("lol-rso-match-v1.getTimeline", route_str, request);
|
||||||
|
#[cfg(feature = "tracing")]
|
||||||
|
let future = future.instrument(tracing::info_span!("lol-rso-match-v1.getTimeline"));
|
||||||
|
future
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/// LolStatusV4 endpoints handle, accessed by calling [`lol_status_v4()`](crate::RiotApi::lol_status_v4) on a [`RiotApi`](crate::RiotApi) instance.
|
/// LolStatusV4 endpoints handle, accessed by calling [`lol_status_v4()`](crate::RiotApi::lol_status_v4) on a [`RiotApi`](crate::RiotApi) instance.
|
||||||
/// # Riot Developer API Reference
|
/// # Riot Developer API Reference
|
||||||
/// <a href="https://developer.riotgames.com/apis#lol-status-v4" target="_blank">`lol-status-v4`</a>
|
/// <a href="https://developer.riotgames.com/apis#lol-status-v4" target="_blank">`lol-status-v4`</a>
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
///////////////////////////////////////////////
|
///////////////////////////////////////////////
|
||||||
|
|
||||||
// http://www.mingweisamuel.com/riotapi-schema/tool/
|
// http://www.mingweisamuel.com/riotapi-schema/tool/
|
||||||
// Version 54ad38717276da9ce06bc6da8b27008d59d109f2
|
// Version db87f38b04ca43dab4aa172bf66ad33bce803528
|
||||||
|
|
||||||
//! Metadata about the Riot API and Riven.
|
//! Metadata about the Riot API and Riven.
|
||||||
//!
|
//!
|
||||||
|
@ -16,7 +16,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); 82] = [
|
pub static ALL_ENDPOINTS: [(reqwest::Method, &str, &str); 85] = [
|
||||||
(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"),
|
||||||
|
@ -44,6 +44,9 @@ pub static ALL_ENDPOINTS: [(reqwest::Method, &str, &str); 82] = [
|
||||||
(reqwest::Method::GET, "/lol/challenges/v1/challenges/{challengeId}/leaderboards/by-level/{level}", "lol-challenges-v1.getChallengeLeaderboards"),
|
(reqwest::Method::GET, "/lol/challenges/v1/challenges/{challengeId}/leaderboards/by-level/{level}", "lol-challenges-v1.getChallengeLeaderboards"),
|
||||||
(reqwest::Method::GET, "/lol/challenges/v1/challenges/{challengeId}/percentiles", "lol-challenges-v1.getChallengePercentiles"),
|
(reqwest::Method::GET, "/lol/challenges/v1/challenges/{challengeId}/percentiles", "lol-challenges-v1.getChallengePercentiles"),
|
||||||
(reqwest::Method::GET, "/lol/challenges/v1/player-data/{puuid}", "lol-challenges-v1.getPlayerData"),
|
(reqwest::Method::GET, "/lol/challenges/v1/player-data/{puuid}", "lol-challenges-v1.getPlayerData"),
|
||||||
|
(reqwest::Method::GET, "/lol/rso-match/v1/matches/ids", "lol-rso-match-v1.getMatchIds"),
|
||||||
|
(reqwest::Method::GET, "/lol/rso-match/v1/matches/{matchId}", "lol-rso-match-v1.getMatch"),
|
||||||
|
(reqwest::Method::GET, "/lol/rso-match/v1/matches/{matchId}/timeline", "lol-rso-match-v1.getTimeline"),
|
||||||
(reqwest::Method::GET, "/lol/status/v4/platform-data", "lol-status-v4.getPlatformData"),
|
(reqwest::Method::GET, "/lol/status/v4/platform-data", "lol-status-v4.getPlatformData"),
|
||||||
(reqwest::Method::GET, "/lor/deck/v1/decks/me", "lor-deck-v1.getDecks"),
|
(reqwest::Method::GET, "/lor/deck/v1/decks/me", "lor-deck-v1.getDecks"),
|
||||||
(reqwest::Method::POST, "/lor/deck/v1/decks/me", "lor-deck-v1.createDeck"),
|
(reqwest::Method::POST, "/lor/deck/v1/decks/me", "lor-deck-v1.createDeck"),
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
///////////////////////////////////////////////
|
///////////////////////////////////////////////
|
||||||
|
|
||||||
// http://www.mingweisamuel.com/riotapi-schema/tool/
|
// http://www.mingweisamuel.com/riotapi-schema/tool/
|
||||||
// Version 54ad38717276da9ce06bc6da8b27008d59d109f2
|
// Version db87f38b04ca43dab4aa172bf66ad33bce803528
|
||||||
|
|
||||||
#![allow(missing_docs)]
|
#![allow(missing_docs)]
|
||||||
|
|
||||||
|
@ -579,6 +579,33 @@ pub mod lol_challenges_v1 {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Data structs used by [`LolRsoMatchV1`](crate::endpoints::LolRsoMatchV1).
|
||||||
|
///
|
||||||
|
/// Note: this module is automatically generated.
|
||||||
|
#[allow(dead_code)]
|
||||||
|
pub mod lol_rso_match_v1 {
|
||||||
|
/// Match data object.
|
||||||
|
/// # Description
|
||||||
|
/// UNKNOWN TYPE.
|
||||||
|
///
|
||||||
|
/// Note: This struct is automatically generated
|
||||||
|
#[derive(Clone, Debug)]
|
||||||
|
#[derive(serde::Serialize, serde::Deserialize)]
|
||||||
|
#[cfg_attr(feature = "deny-unknown-fields", serde(deny_unknown_fields))]
|
||||||
|
pub struct Match {
|
||||||
|
}
|
||||||
|
/// Timeline data object.
|
||||||
|
/// # Description
|
||||||
|
/// UNKNOWN TYPE.
|
||||||
|
///
|
||||||
|
/// Note: This struct is automatically generated
|
||||||
|
#[derive(Clone, Debug)]
|
||||||
|
#[derive(serde::Serialize, serde::Deserialize)]
|
||||||
|
#[cfg_attr(feature = "deny-unknown-fields", serde(deny_unknown_fields))]
|
||||||
|
pub struct Timeline {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// Data structs used by [`LolStatusV4`](crate::endpoints::LolStatusV4).
|
/// Data structs used by [`LolStatusV4`](crate::endpoints::LolStatusV4).
|
||||||
///
|
///
|
||||||
/// Note: this module is automatically generated.
|
/// Note: this module is automatically generated.
|
||||||
|
|
Loading…
Reference in a new issue