Regen for removal of spectator-v4

This commit is contained in:
Mingwei Samuel 2024-04-08 12:05:39 -07:00
parent c25b546968
commit f408e0f6bc
4 changed files with 7 additions and 427 deletions

View file

@ -59,7 +59,7 @@ pub enum GameMode {
SIEGE, SIEGE,
/// Star Guardian Invasion games /// Star Guardian Invasion games
STARGUARDIAN, STARGUARDIAN,
/// Teamfight Tactics, used in `spectator-v4` endpoints. /// Teamfight Tactics.
TFT, TFT,
/// Tutorial games /// Tutorial games
TUTORIAL, TUTORIAL,

View file

@ -8,7 +8,7 @@
/////////////////////////////////////////////// ///////////////////////////////////////////////
// http://www.mingweisamuel.com/riotapi-schema/tool/ // http://www.mingweisamuel.com/riotapi-schema/tool/
// Version 09d8c1d0fc1a3876de2513931c9cb27a616c8768 // Version 50e0dd62c27c4cbb1b353fc311529f937c279806
//! 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,15 +90,6 @@ 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 [LolStatusV3](crate::endpoints::LolStatusV3) endpoints.
/// # Riot Developer API Reference
/// <a href="https://developer.riotgames.com/apis#lol-status-v3" target="_blank">`lol-status-v3`</a>
///
/// Note: this method is automatically generated.
#[inline]
pub fn lol_status_v3(&self) -> LolStatusV3 {
LolStatusV3 { 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>
@ -171,15 +162,6 @@ impl RiotApi {
pub fn spectator_tft_v5(&self) -> SpectatorTftV5 { pub fn spectator_tft_v5(&self) -> SpectatorTftV5 {
SpectatorTftV5 { base: self } SpectatorTftV5 { base: self }
} }
/// Returns a handle for accessing [SpectatorV4](crate::endpoints::SpectatorV4) endpoints.
/// # Riot Developer API Reference
/// <a href="https://developer.riotgames.com/apis#spectator-v4" target="_blank">`spectator-v4`</a>
///
/// Note: this method is automatically generated.
#[inline]
pub fn spectator_v4(&self) -> SpectatorV4 {
SpectatorV4 { base: self }
}
/// Returns a handle for accessing [SpectatorV5](crate::endpoints::SpectatorV5) endpoints. /// Returns a handle for accessing [SpectatorV5](crate::endpoints::SpectatorV5) endpoints.
/// # Riot Developer API Reference /// # Riot Developer API Reference
/// <a href="https://developer.riotgames.com/apis#spectator-v5" target="_blank">`spectator-v5`</a> /// <a href="https://developer.riotgames.com/apis#spectator-v5" target="_blank">`spectator-v5`</a>
@ -902,38 +884,6 @@ impl<'a> LolChallengesV1<'a> {
} }
/// LolStatusV3 endpoints handle, accessed by calling [`lol_status_v3()`](crate::RiotApi::lol_status_v3) on a [`RiotApi`](crate::RiotApi) instance.
/// # Riot Developer API Reference
/// <a href="https://developer.riotgames.com/apis#lol-status-v3" target="_blank">`lol-status-v3`</a>
///
/// Note: this struct is automatically generated.
#[repr(transparent)]
pub struct LolStatusV3<'a> {
base: &'a RiotApi,
}
impl<'a> LolStatusV3<'a> {
/// Get League of Legends status for the given shard.
/// ## Rate Limit Notes
/// Requests to this API are not counted against the application Rate Limits.
/// # Parameters
/// * `route` - Route to query.
/// # Riot Developer API Reference
/// <a href="https://developer.riotgames.com/api-methods/#lol-status-v3/GET_getShardData" target="_blank">`lol-status-v3.getShardData`</a>
///
/// Note: this method is automatically generated.
pub fn get_shard_data(&self, route: PlatformRoute)
-> impl Future<Output = Result<lol_status_v3::ShardStatus>> + 'a
{
let route_str = route.into();
let request = self.base.request(Method::GET, route_str, "/lol/status/v3/shard-data");
let future = self.base.execute_val::<lol_status_v3::ShardStatus>("lol-status-v3.getShardData", route_str, request);
#[cfg(feature = "tracing")]
let future = future.instrument(tracing::info_span!("lol-status-v3.getShardData"));
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>
@ -1289,55 +1239,6 @@ impl<'a> SpectatorTftV5<'a> {
} }
/// SpectatorV4 endpoints handle, accessed by calling [`spectator_v4()`](crate::RiotApi::spectator_v4) on a [`RiotApi`](crate::RiotApi) instance.
/// # Riot Developer API Reference
/// <a href="https://developer.riotgames.com/apis#spectator-v4" target="_blank">`spectator-v4`</a>
///
/// Note: this struct is automatically generated.
#[repr(transparent)]
pub struct SpectatorV4<'a> {
base: &'a RiotApi,
}
impl<'a> SpectatorV4<'a> {
/// Get current game information for the given summoner ID.
/// # Parameters
/// * `route` - Route to query.
/// * `encrypted_summoner_id` (required, in path) - The ID of the summoner.
/// # Riot Developer API Reference
/// <a href="https://developer.riotgames.com/api-methods/#spectator-v4/GET_getCurrentGameInfoBySummoner" target="_blank">`spectator-v4.getCurrentGameInfoBySummoner`</a>
///
/// Note: this method is automatically generated.
pub fn get_current_game_info_by_summoner(&self, route: PlatformRoute, encrypted_summoner_id: &str)
-> impl Future<Output = Result<Option<spectator_v4::CurrentGameInfo>>> + 'a
{
let route_str = route.into();
let request = self.base.request(Method::GET, route_str, &format!("/lol/spectator/v4/active-games/by-summoner/{}", encrypted_summoner_id));
let future = self.base.execute_opt::<spectator_v4::CurrentGameInfo>("spectator-v4.getCurrentGameInfoBySummoner", route_str, request);
#[cfg(feature = "tracing")]
let future = future.instrument(tracing::info_span!("spectator-v4.getCurrentGameInfoBySummoner"));
future
}
/// Get list of featured games.
/// # Parameters
/// * `route` - Route to query.
/// # Riot Developer API Reference
/// <a href="https://developer.riotgames.com/api-methods/#spectator-v4/GET_getFeaturedGames" target="_blank">`spectator-v4.getFeaturedGames`</a>
///
/// Note: this method is automatically generated.
pub fn get_featured_games(&self, route: PlatformRoute)
-> impl Future<Output = Result<spectator_v4::FeaturedGames>> + 'a
{
let route_str = route.into();
let request = self.base.request(Method::GET, route_str, "/lol/spectator/v4/featured-games");
let future = self.base.execute_val::<spectator_v4::FeaturedGames>("spectator-v4.getFeaturedGames", route_str, request);
#[cfg(feature = "tracing")]
let future = future.instrument(tracing::info_span!("spectator-v4.getFeaturedGames"));
future
}
}
/// SpectatorV5 endpoints handle, accessed by calling [`spectator_v5()`](crate::RiotApi::spectator_v5) on a [`RiotApi`](crate::RiotApi) instance. /// SpectatorV5 endpoints handle, accessed by calling [`spectator_v5()`](crate::RiotApi::spectator_v5) on a [`RiotApi`](crate::RiotApi) instance.
/// # Riot Developer API Reference /// # Riot Developer API Reference
/// <a href="https://developer.riotgames.com/apis#spectator-v5" target="_blank">`spectator-v5`</a> /// <a href="https://developer.riotgames.com/apis#spectator-v5" target="_blank">`spectator-v5`</a>

View file

@ -8,7 +8,7 @@
/////////////////////////////////////////////// ///////////////////////////////////////////////
// http://www.mingweisamuel.com/riotapi-schema/tool/ // http://www.mingweisamuel.com/riotapi-schema/tool/
// Version 09d8c1d0fc1a3876de2513931c9cb27a616c8768 // Version 50e0dd62c27c4cbb1b353fc311529f937c279806
//! 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); 84] = [ pub static ALL_ENDPOINTS: [(reqwest::Method, &str, &str); 81] = [
(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,7 +44,6 @@ pub static ALL_ENDPOINTS: [(reqwest::Method, &str, &str); 84] = [
(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/status/v3/shard-data", "lol-status-v3.getShardData"),
(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"),
@ -58,8 +57,6 @@ pub static ALL_ENDPOINTS: [(reqwest::Method, &str, &str); 84] = [
(reqwest::Method::GET, "/lol/match/v5/matches/{matchId}/timeline", "match-v5.getTimeline"), (reqwest::Method::GET, "/lol/match/v5/matches/{matchId}/timeline", "match-v5.getTimeline"),
(reqwest::Method::GET, "/lol/spectator/tft/v5/active-games/by-puuid/{encryptedPUUID}", "spectator-tft-v5.getCurrentGameInfoByPuuid"), (reqwest::Method::GET, "/lol/spectator/tft/v5/active-games/by-puuid/{encryptedPUUID}", "spectator-tft-v5.getCurrentGameInfoByPuuid"),
(reqwest::Method::GET, "/lol/spectator/tft/v5/featured-games", "spectator-tft-v5.getFeaturedGames"), (reqwest::Method::GET, "/lol/spectator/tft/v5/featured-games", "spectator-tft-v5.getFeaturedGames"),
(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, "/lol/spectator/v5/active-games/by-summoner/{encryptedPUUID}", "spectator-v5.getCurrentGameInfoByPuuid"), (reqwest::Method::GET, "/lol/spectator/v5/active-games/by-summoner/{encryptedPUUID}", "spectator-v5.getCurrentGameInfoByPuuid"),
(reqwest::Method::GET, "/lol/spectator/v5/featured-games", "spectator-v5.getFeaturedGames"), (reqwest::Method::GET, "/lol/spectator/v5/featured-games", "spectator-v5.getFeaturedGames"),
(reqwest::Method::GET, "/fulfillment/v1/summoners/by-puuid/{rsoPUUID}", "summoner-v4.getByRSOPUUID"), (reqwest::Method::GET, "/fulfillment/v1/summoners/by-puuid/{rsoPUUID}", "summoner-v4.getByRSOPUUID"),

View file

@ -8,7 +8,7 @@
/////////////////////////////////////////////// ///////////////////////////////////////////////
// http://www.mingweisamuel.com/riotapi-schema/tool/ // http://www.mingweisamuel.com/riotapi-schema/tool/
// Version 09d8c1d0fc1a3876de2513931c9cb27a616c8768 // Version 50e0dd62c27c4cbb1b353fc311529f937c279806
#![allow(missing_docs)] #![allow(missing_docs)]
@ -535,93 +535,6 @@ pub mod lol_challenges_v1 {
} }
} }
/// Data structs used by [`LolStatusV3`](crate::endpoints::LolStatusV3).
///
/// Note: this module is automatically generated.
#[allow(dead_code)]
pub mod lol_status_v3 {
/// ShardStatus data object.
#[derive(Clone, Debug)]
#[derive(serde::Serialize, serde::Deserialize)]
#[cfg_attr(feature = "deny-unknown-fields", serde(deny_unknown_fields))]
pub struct ShardStatus {
#[serde(rename = "locales")]
pub locales: std::vec::Vec<String>,
#[serde(rename = "hostname")]
pub hostname: String,
#[serde(rename = "name")]
pub name: String,
#[serde(rename = "services")]
pub services: std::vec::Vec<Service>,
#[serde(rename = "slug")]
pub slug: String,
#[serde(rename = "region_tag")]
pub region_tag: String,
}
/// Service data object.
#[derive(Clone, Debug)]
#[derive(serde::Serialize, serde::Deserialize)]
#[cfg_attr(feature = "deny-unknown-fields", serde(deny_unknown_fields))]
pub struct Service {
#[serde(rename = "name")]
pub name: String,
#[serde(rename = "slug")]
pub slug: String,
#[serde(rename = "status")]
pub status: String,
#[serde(rename = "incidents")]
pub incidents: std::vec::Vec<Incident>,
}
/// Incident data object.
#[derive(Clone, Debug)]
#[derive(serde::Serialize, serde::Deserialize)]
#[cfg_attr(feature = "deny-unknown-fields", serde(deny_unknown_fields))]
pub struct Incident {
#[serde(rename = "id")]
pub id: i64,
#[serde(rename = "active")]
pub active: bool,
#[serde(rename = "created_at")]
pub created_at: String,
#[serde(rename = "updates")]
pub updates: std::vec::Vec<Message>,
}
/// Message data object.
#[derive(Clone, Debug)]
#[derive(serde::Serialize, serde::Deserialize)]
#[cfg_attr(feature = "deny-unknown-fields", serde(deny_unknown_fields))]
pub struct Message {
#[serde(rename = "id")]
pub id: String,
#[serde(rename = "author")]
pub author: String,
#[serde(rename = "heading")]
pub heading: String,
#[serde(rename = "content")]
pub content: String,
#[serde(rename = "severity")]
pub severity: String,
#[serde(rename = "created_at")]
pub created_at: String,
#[serde(rename = "updated_at")]
pub updated_at: String,
#[serde(rename = "translations")]
pub translations: std::vec::Vec<Translation>,
}
/// Translation data object.
#[derive(Clone, Debug)]
#[derive(serde::Serialize, serde::Deserialize)]
#[cfg_attr(feature = "deny-unknown-fields", serde(deny_unknown_fields))]
pub struct Translation {
#[serde(rename = "updated_at")]
pub updated_at: String,
#[serde(rename = "locale")]
pub locale: String,
#[serde(rename = "content")]
pub content: String,
}
}
/// 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.
@ -2494,237 +2407,6 @@ pub mod spectator_tft_v5 {
} }
} }
/// Data structs used by [`SpectatorV4`](crate::endpoints::SpectatorV4).
///
/// Note: this module is automatically generated.
#[allow(dead_code)]
pub mod spectator_v4 {
/// CurrentGameInfo data object.
#[derive(Clone, Debug)]
#[derive(serde::Serialize, serde::Deserialize)]
#[cfg_attr(feature = "deny-unknown-fields", serde(deny_unknown_fields))]
pub struct CurrentGameInfo {
/// The ID of the game
#[serde(rename = "gameId")]
pub game_id: i64,
/// The game type
#[serde(rename = "gameType")]
pub game_type: crate::consts::GameType,
/// The game start time represented in epoch milliseconds
#[serde(rename = "gameStartTime")]
pub game_start_time: i64,
/// The ID of the map
#[serde(rename = "mapId")]
pub map_id: crate::consts::Map,
/// The amount of time in seconds that has passed since the game started
#[serde(rename = "gameLength")]
pub game_length: i64,
/// The ID of the platform on which the game is being played
#[serde(rename = "platformId")]
pub platform_id: String,
/// The game mode
#[serde(rename = "gameMode")]
pub game_mode: crate::consts::GameMode,
/// Banned champion information
#[serde(rename = "bannedChampions")]
pub banned_champions: std::vec::Vec<BannedChampion>,
/// The queue type (queue types are documented on the Game Constants page)
#[serde(rename = "gameQueueConfigId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub game_queue_config_id: Option<crate::consts::Queue>,
/// The observer information
#[serde(rename = "observers")]
pub observers: Observer,
/// The participant information
#[serde(rename = "participants")]
pub participants: std::vec::Vec<CurrentGameParticipant>,
}
/// BannedChampion data object.
#[derive(Clone, Debug)]
#[derive(serde::Serialize, serde::Deserialize)]
#[cfg_attr(feature = "deny-unknown-fields", serde(deny_unknown_fields))]
pub struct BannedChampion {
/// The turn during which the champion was banned
#[serde(rename = "pickTurn")]
pub pick_turn: i32,
/// The ID of the banned champion
#[serde(rename = "championId")]
pub champion_id: crate::consts::Champion,
/// The ID of the team that banned the champion
#[serde(rename = "teamId")]
pub team_id: crate::consts::Team,
}
/// Observer data object.
#[derive(Clone, Debug)]
#[derive(serde::Serialize, serde::Deserialize)]
#[cfg_attr(feature = "deny-unknown-fields", serde(deny_unknown_fields))]
pub struct Observer {
/// Key used to decrypt the spectator grid game data for playback
#[serde(rename = "encryptionKey")]
pub encryption_key: String,
}
/// CurrentGameParticipant data object.
#[derive(Clone, Debug)]
#[derive(serde::Serialize, serde::Deserialize)]
#[cfg_attr(feature = "deny-unknown-fields", serde(deny_unknown_fields))]
pub struct CurrentGameParticipant {
/// The ID of the champion played by this participant
#[serde(rename = "championId")]
pub champion_id: crate::consts::Champion,
/// Perks/Runes Reforged Information
#[serde(rename = "perks")]
#[serde(skip_serializing_if = "Option::is_none")]
pub perks: Option<Perks>,
/// The ID of the profile icon used by this participant
#[serde(rename = "profileIconId")]
pub profile_icon_id: i64,
/// Flag indicating whether or not this participant is a bot
#[serde(rename = "bot")]
pub bot: bool,
/// The team ID of this participant, indicating the participant's team
#[serde(rename = "teamId")]
pub team_id: crate::consts::Team,
/// The summoner name of this participant
#[serde(rename = "summonerName")]
pub summoner_name: String,
/// The encrypted summoner ID of this participant
#[serde(rename = "summonerId")]
pub summoner_id: String,
/// The encrypted puuid of this participant
#[serde(rename = "puuid")]
#[serde(skip_serializing_if = "Option::is_none")]
pub puuid: Option<String>,
/// The ID of the first summoner spell used by this participant
#[serde(rename = "spell1Id")]
pub spell1_id: i64,
/// The ID of the second summoner spell used by this participant
#[serde(rename = "spell2Id")]
pub spell2_id: i64,
/// List of Game Customizations
#[serde(rename = "gameCustomizationObjects")]
pub game_customization_objects: std::vec::Vec<GameCustomizationObject>,
#[serde(rename = "riotId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub riot_id: Option<String>,
}
/// Perks data object.
#[derive(Clone, Debug)]
#[derive(serde::Serialize, serde::Deserialize)]
#[cfg_attr(feature = "deny-unknown-fields", serde(deny_unknown_fields))]
pub struct Perks {
/// IDs of the perks/runes assigned.
#[serde(rename = "perkIds")]
pub perk_ids: std::vec::Vec<i64>,
/// Primary runes path
#[serde(rename = "perkStyle")]
pub perk_style: i64,
/// Secondary runes path
#[serde(rename = "perkSubStyle")]
pub perk_sub_style: i64,
}
/// GameCustomizationObject data object.
#[derive(Clone, Debug)]
#[derive(serde::Serialize, serde::Deserialize)]
#[cfg_attr(feature = "deny-unknown-fields", serde(deny_unknown_fields))]
pub struct GameCustomizationObject {
/// Category identifier for Game Customization
#[serde(rename = "category")]
pub category: String,
/// Game Customization content
#[serde(rename = "content")]
pub content: String,
}
/// FeaturedGames data object.
#[derive(Clone, Debug)]
#[derive(serde::Serialize, serde::Deserialize)]
#[cfg_attr(feature = "deny-unknown-fields", serde(deny_unknown_fields))]
pub struct FeaturedGames {
/// The list of featured games
#[serde(rename = "gameList")]
pub game_list: std::vec::Vec<FeaturedGameInfo>,
/// The suggested interval to wait before requesting FeaturedGames again
#[serde(rename = "clientRefreshInterval")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_refresh_interval: Option<i64>,
}
/// FeaturedGameInfo data object.
#[derive(Clone, Debug)]
#[derive(serde::Serialize, serde::Deserialize)]
#[cfg_attr(feature = "deny-unknown-fields", serde(deny_unknown_fields))]
pub struct FeaturedGameInfo {
/// The game mode<br>
/// (Legal values: CLASSIC, ODIN, ARAM, TUTORIAL, ONEFORALL, ASCENSION, FIRSTBLOOD, KINGPORO)
#[serde(rename = "gameMode")]
pub game_mode: crate::consts::GameMode,
/// The amount of time in seconds that has passed since the game started
#[serde(rename = "gameLength")]
pub game_length: i64,
/// The ID of the map
#[serde(rename = "mapId")]
pub map_id: crate::consts::Map,
/// The game type<br>
/// (Legal values: CUSTOM_GAME, MATCHED_GAME, TUTORIAL_GAME)
#[serde(rename = "gameType")]
pub game_type: crate::consts::GameType,
/// Banned champion information
#[serde(rename = "bannedChampions")]
pub banned_champions: std::vec::Vec<BannedChampion>,
/// The ID of the game
#[serde(rename = "gameId")]
pub game_id: i64,
/// The observer information
#[serde(rename = "observers")]
pub observers: Observer,
/// The queue type (queue types are documented on the Game Constants page)
#[serde(rename = "gameQueueConfigId")]
pub game_queue_config_id: crate::consts::Queue,
/// The participant information
#[serde(rename = "participants")]
pub participants: std::vec::Vec<Participant>,
/// The ID of the platform on which the game is being played
#[serde(rename = "platformId")]
pub platform_id: String,
}
/// Participant data object.
#[derive(Clone, Debug)]
#[derive(serde::Serialize, serde::Deserialize)]
#[cfg_attr(feature = "deny-unknown-fields", serde(deny_unknown_fields))]
pub struct Participant {
/// Flag indicating whether or not this participant is a bot
#[serde(rename = "bot")]
pub bot: bool,
/// The ID of the second summoner spell used by this participant
#[serde(rename = "spell2Id")]
pub spell2_id: i64,
/// The ID of the profile icon used by this participant
#[serde(rename = "profileIconId")]
pub profile_icon_id: i64,
/// The summoner name of this participant
#[serde(rename = "summonerName")]
pub summoner_name: String,
/// Encrypted summoner ID of this participant
#[serde(rename = "summonerId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub summoner_id: Option<String>,
/// Encrypted puuid of this participant
#[serde(rename = "puuid")]
#[serde(skip_serializing_if = "Option::is_none")]
pub puuid: Option<String>,
/// The ID of the champion played by this participant
#[serde(rename = "championId")]
pub champion_id: crate::consts::Champion,
/// The team ID of this participant, indicating the participant's team
#[serde(rename = "teamId")]
pub team_id: crate::consts::Team,
/// The ID of the first summoner spell used by this participant
#[serde(rename = "spell1Id")]
pub spell1_id: i64,
#[serde(rename = "riotId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub riot_id: Option<String>,
}
}
/// Data structs used by [`SpectatorV5`](crate::endpoints::SpectatorV5). /// Data structs used by [`SpectatorV5`](crate::endpoints::SpectatorV5).
/// ///
/// Note: this module is automatically generated. /// Note: this module is automatically generated.
@ -3788,7 +3470,7 @@ pub mod tournament_v5 {
#[serde(rename = "id")] #[serde(rename = "id")]
pub id: i32, pub id: i32,
/// The tournament code's region.<br> /// The tournament code's region.<br>
/// (Legal values: BR, EUNE, EUW, JP, LAN, LAS, NA, OCE, PBE, RU, TR, KR) /// (Legal values: BR, EUNE, EUW, JP, LAN, LAS, NA, OCE, PBE, RU, TR, KR, PH, SG, TH, TW, VN)
#[serde(rename = "region")] #[serde(rename = "region")]
pub region: String, pub region: String,
/// The game map for the tournament code game /// The game map for the tournament code game
@ -3889,7 +3571,7 @@ pub mod tournament_v5 {
#[cfg_attr(feature = "deny-unknown-fields", serde(deny_unknown_fields))] #[cfg_attr(feature = "deny-unknown-fields", serde(deny_unknown_fields))]
pub struct ProviderRegistrationParametersV5 { pub struct ProviderRegistrationParametersV5 {
/// The region in which the provider will be running tournaments.<br> /// The region in which the provider will be running tournaments.<br>
/// (Legal values: BR, EUNE, EUW, JP, LAN, LAS, NA, OCE, PBE, RU, TR, KR) /// (Legal values: BR, EUNE, EUW, JP, LAN, LAS, NA, OCE, PBE, RU, TR, KR, PH, SG, TH, TW, VN)
#[serde(rename = "region")] #[serde(rename = "region")]
pub region: String, pub region: String,
/// The provider's callback URL to which tournament game results in this region should be posted. The URL must be well-formed, use the http or https protocol, and use the default port for the protocol (http URLs must use port 80, https URLs must use port 443). /// The provider's callback URL to which tournament game results in this region should be posted. The URL must be well-formed, use the http or https protocol, and use the default port for the protocol (http URLs must use port 80, https URLs must use port 443).