diff --git a/riven/src/consts/game_mode.rs b/riven/src/consts/game_mode.rs index 8981ca9..8f1317f 100644 --- a/riven/src/consts/game_mode.rs +++ b/riven/src/consts/game_mode.rs @@ -29,7 +29,7 @@ pub enum GameMode { ASCENSION, /// Blood Hunt Assassin games ASSASSINATE, - /// 2v2v2v2 + /// 2v2v2v2 Arena CHERRY, /// Classic Summoner's Rift and Twisted Treeline games CLASSIC, @@ -59,6 +59,8 @@ pub enum GameMode { SIEGE, /// Star Guardian Invasion games STARGUARDIAN, + /// Swarm + STRAWBERRY, /// Teamfight Tactics. TFT, /// Tutorial games diff --git a/riven/src/consts/map.rs b/riven/src/consts/map.rs index 56982a8..a8289d3 100644 --- a/riven/src/consts/map.rs +++ b/riven/src/consts/map.rs @@ -74,5 +74,9 @@ newtype_enum! { /// 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 ARENA = 30, + /// `33`. + /// Swarm + /// Map for Swarm (`STRAWBERRY`). Team up with a friend or venture solo in this horde survival mode. + SWARM = 33, } } diff --git a/riven/src/consts/queue.rs b/riven/src/consts/queue.rs index ac8b31c..312dd79 100644 --- a/riven/src/consts/queue.rs +++ b/riven/src/consts/queue.rs @@ -382,6 +382,18 @@ newtype_enum! { /// `1710`. /// Arena (`CHERRY` games) games on Rings of Wrath 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`. /// Pick URF games on Summoner's Rift SUMMONERS_RIFT_PICK_URF = 1900, diff --git a/riven/src/endpoints.rs b/riven/src/endpoints.rs index 521e83d..8fd2f5b 100644 --- a/riven/src/endpoints.rs +++ b/riven/src/endpoints.rs @@ -8,7 +8,7 @@ /////////////////////////////////////////////// // http://www.mingweisamuel.com/riotapi-schema/tool/ -// Version 54ad38717276da9ce06bc6da8b27008d59d109f2 +// Version db87f38b04ca43dab4aa172bf66ad33bce803528 //! Automatically generated endpoint handles. #![allow(clippy::let_and_return, clippy::too_many_arguments)] @@ -90,6 +90,15 @@ impl RiotApi { pub fn lol_challenges_v1(&self) -> LolChallengesV1 { LolChallengesV1 { base: self } } + /// Returns a handle for accessing [LolRsoMatchV1](crate::endpoints::LolRsoMatchV1) endpoints. + /// # Riot Developer API Reference + /// `lol-rso-match-v1` + /// + /// 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. /// # Riot Developer API Reference /// `lol-status-v4` @@ -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 +/// `lol-rso-match-v1` +/// +/// 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 + /// `lol-rso-match-v1.getMatchIds` + /// + /// Note: this method is automatically generated. + pub fn get_match_ids(&self, route: RegionalRoute, access_token: impl std::fmt::Display, count: Option, end_time: Option, queue: Option, start: Option, start_time: Option, r#type: Option<&str>) + -> impl Future>> + '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::>("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 + /// `lol-rso-match-v1.getMatch` + /// + /// Note: this method is automatically generated. + pub fn get_match(&self, route: RegionalRoute, access_token: impl std::fmt::Display, match_id: &str) + -> impl Future> + '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.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 + /// `lol-rso-match-v1.getTimeline` + /// + /// Note: this method is automatically generated. + pub fn get_timeline(&self, route: RegionalRoute, access_token: impl std::fmt::Display, match_id: &str) + -> impl Future> + '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.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. /// # Riot Developer API Reference /// `lol-status-v4` diff --git a/riven/src/meta.rs b/riven/src/meta.rs index 554dc6f..c35eb19 100644 --- a/riven/src/meta.rs +++ b/riven/src/meta.rs @@ -8,7 +8,7 @@ /////////////////////////////////////////////// // http://www.mingweisamuel.com/riotapi-schema/tool/ -// Version 54ad38717276da9ce06bc6da8b27008d59d109f2 +// Version db87f38b04ca43dab4aa172bf66ad33bce803528 //! Metadata about the Riot API and Riven. //! @@ -16,7 +16,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); 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-riot-id/{gameName}/{tagLine}", "account-v1.getByRiotId"), (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}/percentiles", "lol-challenges-v1.getChallengePercentiles"), (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, "/lor/deck/v1/decks/me", "lor-deck-v1.getDecks"), (reqwest::Method::POST, "/lor/deck/v1/decks/me", "lor-deck-v1.createDeck"), diff --git a/riven/src/models.rs b/riven/src/models.rs index 43e3c8a..d5f61fb 100644 --- a/riven/src/models.rs +++ b/riven/src/models.rs @@ -8,7 +8,7 @@ /////////////////////////////////////////////// // http://www.mingweisamuel.com/riotapi-schema/tool/ -// Version 54ad38717276da9ce06bc6da8b27008d59d109f2 +// Version db87f38b04ca43dab4aa172bf66ad33bce803528 #![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). /// /// Note: this module is automatically generated.