Update to use mingweisamuel.com/riotapi-schema/enums

https://github.com/RiotGames/developer-relations/issues/340
This commit is contained in:
Mingwei Samuel 2020-07-28 09:45:35 -07:00
parent 7105c778f4
commit 0f9d783b94
11 changed files with 295 additions and 375 deletions

View file

@ -16,42 +16,44 @@ use strum_macros::{ EnumString, Display, AsRefStr, IntoStaticStr };
#[derive(EnumString, Display, AsRefStr, IntoStaticStr)]
#[repr(u8)]
pub enum GameMode {
/// Classic Summoner's Rift and Twisted Treeline games
CLASSIC,
/// Dominion/Crystal Scar games
ODIN,
/// ARAM games
ARAM,
/// All Random Summoner's Rift games
ARSR,
/// Ascension games
ASCENSION,
/// Blood Hunt Assassin games
ASSASSINATE,
/// Classic Summoner's Rift and Twisted Treeline games
CLASSIC,
/// Dark Star: Singularity games
DARKSTAR,
/// Doom Bot games
DOOMBOTSTEEMO,
/// Snowdown Showdown games
FIRSTBLOOD,
/// Nexus Blitz games, deprecated in patch 9.2 in favor of gameMode NEXUSBLITZ.
GAMEMODEX,
/// Legend of the Poro King games
KINGPORO,
/// Nexus Blitz games.
NEXUSBLITZ,
/// Dominion/Crystal Scar games
ODIN,
/// Odyssey: Extraction games
ODYSSEY,
/// One for All games
ONEFORALL,
/// PROJECT: Hunters games
PROJECT,
/// Nexus Siege games
SIEGE,
/// Star Guardian Invasion games
STARGUARDIAN,
/// Tutorial games
TUTORIAL,
/// URF games
URF,
/// Doom Bot games
DOOMBOTSTEEMO,
/// One for All games
ONEFORALL,
/// Ascension games
ASCENSION,
/// Snowdown Showdown games
FIRSTBLOOD,
/// Legend of the Poro King games
KINGPORO,
/// Nexus Siege games
SIEGE,
/// Blood Hunt Assassin games
ASSASSINATE,
/// All Random Summoner's Rift games
ARSR,
/// Dark Star: Singularity games
DARKSTAR,
/// Star Guardian Invasion games
STARGUARDIAN,
/// PROJECT: Hunters games
PROJECT,
/// Nexus Blitz games
GAMEMODEX,
/// Odyssey: Extraction games
ODYSSEY,
}
serde_string!(GameMode);

View file

@ -16,10 +16,10 @@ use strum_macros::{ EnumString, Display, AsRefStr, IntoStaticStr };
pub enum GameType {
/// Custom games
CUSTOM_GAME,
/// Tutorial games
TUTORIAL_GAME,
/// all other games
MATCHED_GAME,
/// Tutorial games
TUTORIAL_GAME,
}
serde_string!(GameType);

View file

@ -17,57 +17,49 @@ use num_enum::{ IntoPrimitive, TryFromPrimitive };
#[derive(IntoPrimitive, TryFromPrimitive)]
#[repr(u8)]
pub enum Map {
/// Summoner's Rift
/// <br>Original Summer variant
/// Original Summer variant
SUMMONERS_RIFT_ORIGINAL_SUMMER_VARIANT = 1,
/// Summoner's Rift
/// <br>Original Autumn variant
/// Original Autumn variant
SUMMONERS_RIFT_ORIGINAL_AUTUMN_VARIANT = 2,
/// Summoner's Rift
/// <br>Current Version
SUMMONERS_RIFT = 11,
/// The Proving Grounds
/// <br>Tutorial Map
/// Tutorial Map
THE_PROVING_GROUNDS = 3,
/// Twisted Treeline
/// <br>Original Version
/// Original Version
TWISTED_TREELINE_ORIGINAL_VERSION = 4,
/// Twisted Treeline
/// <br>Last TT map
TWISTED_TREELINE = 10,
/// The Crystal Scar
/// <br>Dominion map
/// Dominion map
THE_CRYSTAL_SCAR = 8,
/// Twisted Treeline
/// Last TT map
TWISTED_TREELINE = 10,
/// Summoner's Rift
/// Current Version
SUMMONERS_RIFT = 11,
/// Howling Abyss
/// <br>ARAM map
/// ARAM map
HOWLING_ABYSS = 12,
/// Butcher's Bridge
/// <br>Alternate ARAM map
/// Alternate ARAM map
BUTCHERS_BRIDGE = 14,
/// Cosmic Ruins
/// <br>Dark Star: Singularity map
/// Dark Star: Singularity map
COSMIC_RUINS = 16,
/// Valoran City Park
/// <br>Star Guardian Invasion map
/// Star Guardian Invasion map
VALORAN_CITY_PARK = 18,
/// Substructure 43
/// <br>PROJECT: Hunters map
SUBSTRUCTURE43 = 19,
/// PROJECT: Hunters map
SUBSTRUCTURE_43 = 19,
/// Crash Site
/// <br>Odyssey: Extraction map
/// Odyssey: Extraction map
CRASH_SITE = 20,
/// Nexus Blitz
/// <br>Nexus Blitz map
/// Nexus Blitz map
NEXUS_BLITZ = 21,
/// Convergence
/// Teamfight Tactics map
CONVERGENCE = 22,
}

View file

@ -17,298 +17,234 @@ use num_enum::{ IntoPrimitive, TryFromPrimitive };
#[derive(IntoPrimitive, TryFromPrimitive)]
#[repr(u16)]
pub enum Queue {
/// Custom games.
CUSTOM_GAMES_ = 0,
/// 5v5 Blind Pick games games on Summoner's Rift.
/// <br>Deprecated in patch 7.19 in favor of queueId 430
/// Games on Custom games
CUSTOM = 0,
/// 5v5 Blind Pick games on Summoner's Rift
/// Deprecated in patch 7.19 in favor of queueId 430
#[deprecated(note="Deprecated in patch 7.19 in favor of queueId 430")]
SUMMONERS_RIFT_5V5_BLIND_PICK_GAMES_DEPRECATED_2 = 2,
/// 5v5 Blind Pick games games on Summoner's Rift.
SUMMONERS_RIFT_5V5_BLIND_PICK_GAMES = 430,
/// 5v5 Ranked Solo games games on Summoner's Rift.
/// <br>Deprecated in favor of queueId 420
SUMMONERS_RIFT_5V5_BLIND_PICK_DEPRECATED_2 = 2,
/// 5v5 Ranked Solo games on Summoner's Rift
/// Deprecated in favor of queueId 420
#[deprecated(note="Deprecated in favor of queueId 420")]
SUMMONERS_RIFT_5V5_RANKED_SOLO_GAMES_DEPRECATED_4 = 4,
/// 5v5 Ranked Solo games games on Summoner's Rift.
SUMMONERS_RIFT_5V5_RANKED_SOLO_GAMES = 420,
/// 5v5 Ranked Premade games games on Summoner's Rift.
/// <br>Game mode deprecated
SUMMONERS_RIFT_5V5_RANKED_SOLO_DEPRECATED_4 = 4,
/// 5v5 Ranked Premade games on Summoner's Rift
/// Game mode deprecated
#[deprecated(note="Game mode deprecated")]
SUMMONERS_RIFT_5V5_RANKED_PREMADE_GAMES = 6,
/// Co-op vs AI games games on Summoner's Rift.
/// <br>Deprecated in favor of queueId 32 and 33
SUMMONERS_RIFT_5V5_RANKED_PREMADE = 6,
/// Co-op vs AI games on Summoner's Rift
/// Deprecated in favor of queueId 32 and 33
#[deprecated(note="Deprecated in favor of queueId 32 and 33")]
SUMMONERS_RIFT_CO_OP_VS_AI_GAMES = 7,
/// 3v3 Normal games games on Twisted Treeline.
/// <br>Deprecated in patch 7.19 in favor of queueId 460
SUMMONERS_RIFT_CO_OP_VS_AI = 7,
/// 3v3 Normal games on Twisted Treeline
/// Deprecated in patch 7.19 in favor of queueId 460
#[deprecated(note="Deprecated in patch 7.19 in favor of queueId 460")]
TWISTED_TREELINE_3V3_NORMAL_GAMES = 8,
/// 3v3 Ranked Flex games games on Twisted Treeline.
/// <br>Deprecated in patch 7.19 in favor of queueId 470
TWISTED_TREELINE_3V3_NORMAL = 8,
/// 3v3 Ranked Flex games on Twisted Treeline
/// Deprecated in patch 7.19 in favor of queueId 470
#[deprecated(note="Deprecated in patch 7.19 in favor of queueId 470")]
TWISTED_TREELINE_3V3_RANKED_FLEX_GAMES_DEPRECATED_9 = 9,
/// 3v3 Ranked Flex games games on Twisted Treeline.
/// <br>Deprecated in patch 9.23
#[deprecated(note="Deprecated in patch 9.23")]
TWISTED_TREELINE_3V3_RANKED_FLEX_GAMES_DEPRECATED_470 = 470,
/// 5v5 Draft Pick games games on Summoner's Rift.
/// <br>Deprecated in favor of queueId 400
TWISTED_TREELINE_3V3_RANKED_FLEX_DEPRECATED_9 = 9,
/// 5v5 Draft Pick games on Summoner's Rift
/// Deprecated in favor of queueId 400
#[deprecated(note="Deprecated in favor of queueId 400")]
SUMMONERS_RIFT_5V5_DRAFT_PICK_GAMES_DEPRECATED_14 = 14,
/// 5v5 Draft Pick games games on Summoner's Rift.
SUMMONERS_RIFT_5V5_DRAFT_PICK_GAMES = 400,
/// 5v5 Dominion Blind Pick games games on Crystal Scar.
/// <br>Game mode deprecated
SUMMONERS_RIFT_5V5_DRAFT_PICK_DEPRECATED_14 = 14,
/// 5v5 Dominion Blind Pick games on Crystal Scar
/// Game mode deprecated
#[deprecated(note="Game mode deprecated")]
CRYSTAL_SCAR_5V5_DOMINION_BLIND_PICK_GAMES = 16,
/// 5v5 Dominion Draft Pick games games on Crystal Scar.
/// <br>Game mode deprecated
CRYSTAL_SCAR_5V5_DOMINION_BLIND_PICK = 16,
/// 5v5 Dominion Draft Pick games on Crystal Scar
/// Game mode deprecated
#[deprecated(note="Game mode deprecated")]
CRYSTAL_SCAR_5V5_DOMINION_DRAFT_PICK_GAMES = 17,
/// Dominion Co-op vs AI games games on Crystal Scar.
/// <br>Game mode deprecated
CRYSTAL_SCAR_5V5_DOMINION_DRAFT_PICK = 17,
/// Dominion Co-op vs AI games on Crystal Scar
/// Game mode deprecated
#[deprecated(note="Game mode deprecated")]
CRYSTAL_SCAR_DOMINION_CO_OP_VS_AI_GAMES = 25,
/// Co-op vs AI Intro Bot games games on Summoner's Rift.
/// <br>Deprecated in patch 7.19 in favor of queueId 830
CRYSTAL_SCAR_DOMINION_CO_OP_VS_AI = 25,
/// Co-op vs AI Intro Bot games on Summoner's Rift
/// Deprecated in patch 7.19 in favor of queueId 830
#[deprecated(note="Deprecated in patch 7.19 in favor of queueId 830")]
SUMMONERS_RIFT_CO_OP_VS_AI_INTRO_BOT_GAMES_DEPRECATED_31 = 31,
/// Co-op vs. AI Intro Bot games games on Summoner's Rift.
SUMMONERS_RIFT_CO_OP_VS_AI_INTRO_BOT_GAMES = 830,
/// Co-op vs AI Beginner Bot games games on Summoner's Rift.
/// <br>Deprecated in patch 7.19 in favor of queueId 840
SUMMONERS_RIFT_CO_OP_VS_AI_INTRO_BOT_DEPRECATED_31 = 31,
/// Co-op vs AI Beginner Bot games on Summoner's Rift
/// Deprecated in patch 7.19 in favor of queueId 840
#[deprecated(note="Deprecated in patch 7.19 in favor of queueId 840")]
SUMMONERS_RIFT_CO_OP_VS_AI_BEGINNER_BOT_GAMES_DEPRECATED_32 = 32,
/// Co-op vs. AI Beginner Bot games games on Summoner's Rift.
SUMMONERS_RIFT_CO_OP_VS_AI_BEGINNER_BOT_GAMES = 840,
/// Co-op vs AI Intermediate Bot games games on Summoner's Rift.
/// <br>Deprecated in patch 7.19 in favor of queueId 850
SUMMONERS_RIFT_CO_OP_VS_AI_BEGINNER_BOT_DEPRECATED_32 = 32,
/// Co-op vs AI Intermediate Bot games on Summoner's Rift
/// Deprecated in patch 7.19 in favor of queueId 850
#[deprecated(note="Deprecated in patch 7.19 in favor of queueId 850")]
SUMMONERS_RIFT_CO_OP_VS_AI_INTERMEDIATE_BOT_GAMES_DEPRECATED_33 = 33,
/// Co-op vs. AI Intermediate Bot games games on Summoner's Rift.
SUMMONERS_RIFT_CO_OP_VS_AI_INTERMEDIATE_BOT_GAMES = 850,
/// 3v3 Ranked Team games games on Twisted Treeline.
/// <br>Game mode deprecated
SUMMONERS_RIFT_CO_OP_VS_AI_INTERMEDIATE_BOT_DEPRECATED_33 = 33,
/// 3v3 Ranked Team games on Twisted Treeline
/// Game mode deprecated
#[deprecated(note="Game mode deprecated")]
TWISTED_TREELINE_3V3_RANKED_TEAM_GAMES = 41,
/// 5v5 Ranked Team games games on Summoner's Rift.
/// <br>Game mode deprecated
TWISTED_TREELINE_3V3_RANKED_TEAM = 41,
/// 5v5 Ranked Team games on Summoner's Rift
/// Game mode deprecated
#[deprecated(note="Game mode deprecated")]
SUMMONERS_RIFT_5V5_RANKED_TEAM_GAMES = 42,
/// Co-op vs AI games games on Twisted Treeline.
/// <br>Deprecated in patch 7.19 in favor of queueId 800
SUMMONERS_RIFT_5V5_RANKED_TEAM = 42,
/// Co-op vs AI games on Twisted Treeline
/// Deprecated in patch 7.19 in favor of queueId 800
#[deprecated(note="Deprecated in patch 7.19 in favor of queueId 800")]
TWISTED_TREELINE_CO_OP_VS_AI_GAMES = 52,
/// 5v5 Team Builder games games on Summoner's Rift.
/// <br>Game mode deprecated
TWISTED_TREELINE_CO_OP_VS_AI = 52,
/// 5v5 Team Builder games on Summoner's Rift
/// Game mode deprecated
#[deprecated(note="Game mode deprecated")]
SUMMONERS_RIFT_5V5_TEAM_BUILDER_GAMES = 61,
/// 5v5 ARAM games games on Howling Abyss.
/// <br>Deprecated in patch 7.19 in favor of queueId 450
SUMMONERS_RIFT_5V5_TEAM_BUILDER = 61,
/// 5v5 ARAM games on Howling Abyss
/// Deprecated in patch 7.19 in favor of queueId 450
#[deprecated(note="Deprecated in patch 7.19 in favor of queueId 450")]
HOWLING_ABYSS_5V5_ARAM_GAMES_DEPRECATED_65 = 65,
/// 5v5 ARAM games games on Howling Abyss.
HOWLING_ABYSS_5V5_ARAM_GAMES = 450,
/// ARAM Co-op vs AI games games on Howling Abyss.
/// <br>Game mode deprecated
HOWLING_ABYSS_5V5_ARAM_DEPRECATED_65 = 65,
/// ARAM Co-op vs AI games on Howling Abyss
/// Game mode deprecated
#[deprecated(note="Game mode deprecated")]
HOWLING_ABYSS_ARAM_CO_OP_VS_AI_GAMES = 67,
/// One for All games games on Summoner's Rift.
/// <br>Deprecated in patch 8.6 in favor of queueId 1020
HOWLING_ABYSS_ARAM_CO_OP_VS_AI = 67,
/// One for All games on Summoner's Rift
/// Deprecated in patch 8.6 in favor of queueId 1020
#[deprecated(note="Deprecated in patch 8.6 in favor of queueId 1020")]
SUMMONERS_RIFT_ONE_FOR_ALL_GAMES_DEPRECATED_70 = 70,
/// One for All games games on Summoner's Rift.
SUMMONERS_RIFT_ONE_FOR_ALL_GAMES = 1020,
/// 1v1 Snowdown Showdown games games on Howling Abyss.
HOWLING_ABYSS_1V1_SNOWDOWN_SHOWDOWN_GAMES = 72,
/// 2v2 Snowdown Showdown games games on Howling Abyss.
HOWLING_ABYSS_2V2_SNOWDOWN_SHOWDOWN_GAMES = 73,
/// 6v6 Hexakill games games on Summoner's Rift.
SUMMONERS_RIFT_6V6_HEXAKILL_GAMES = 75,
/// Ultra Rapid Fire games games on Summoner's Rift.
SUMMONERS_RIFT_ULTRA_RAPID_FIRE_GAMES = 76,
/// One For All: Mirror Mode games games on Howling Abyss.
HOWLING_ABYSS_ONE_FOR_ALL_MIRROR_MODE_GAMES = 78,
/// Co-op vs AI Ultra Rapid Fire games games on Summoner's Rift.
SUMMONERS_RIFT_CO_OP_VS_AI_ULTRA_RAPID_FIRE_GAMES = 83,
/// Doom Bots Rank 1 games games on Summoner's Rift.
/// <br>Deprecated in patch 7.19 in favor of queueId 950
SUMMONERS_RIFT_ONE_FOR_ALL_DEPRECATED_70 = 70,
/// 1v1 Snowdown Showdown games on Howling Abyss
HOWLING_ABYSS_1V1_SNOWDOWN_SHOWDOWN = 72,
/// 2v2 Snowdown Showdown games on Howling Abyss
HOWLING_ABYSS_2V2_SNOWDOWN_SHOWDOWN = 73,
/// 6v6 Hexakill games on Summoner's Rift
SUMMONERS_RIFT_6V6_HEXAKILL = 75,
/// Ultra Rapid Fire games on Summoner's Rift
SUMMONERS_RIFT_ULTRA_RAPID_FIRE = 76,
/// One For All: Mirror Mode games on Howling Abyss
HOWLING_ABYSS_ONE_FOR_ALL_MIRROR_MODE = 78,
/// Co-op vs AI Ultra Rapid Fire games on Summoner's Rift
SUMMONERS_RIFT_CO_OP_VS_AI_ULTRA_RAPID_FIRE = 83,
/// Doom Bots Rank 1 games on Summoner's Rift
/// Deprecated in patch 7.19 in favor of queueId 950
#[deprecated(note="Deprecated in patch 7.19 in favor of queueId 950")]
SUMMONERS_RIFT_DOOM_BOTS_RANK1_GAMES = 91,
/// Doom Bots Rank 2 games games on Summoner's Rift.
/// <br>Deprecated in patch 7.19 in favor of queueId 950
SUMMONERS_RIFT_DOOM_BOTS_RANK_1 = 91,
/// Doom Bots Rank 2 games on Summoner's Rift
/// Deprecated in patch 7.19 in favor of queueId 950
#[deprecated(note="Deprecated in patch 7.19 in favor of queueId 950")]
SUMMONERS_RIFT_DOOM_BOTS_RANK2_GAMES = 92,
/// Doom Bots Rank 5 games games on Summoner's Rift.
/// <br>Deprecated in patch 7.19 in favor of queueId 950
SUMMONERS_RIFT_DOOM_BOTS_RANK_2 = 92,
/// Doom Bots Rank 5 games on Summoner's Rift
/// Deprecated in patch 7.19 in favor of queueId 950
#[deprecated(note="Deprecated in patch 7.19 in favor of queueId 950")]
SUMMONERS_RIFT_DOOM_BOTS_RANK5_GAMES = 93,
/// Ascension games games on Crystal Scar.
/// <br>Deprecated in patch 7.19 in favor of queueId 910
SUMMONERS_RIFT_DOOM_BOTS_RANK_5 = 93,
/// Ascension games on Crystal Scar
/// Deprecated in patch 7.19 in favor of queueId 910
#[deprecated(note="Deprecated in patch 7.19 in favor of queueId 910")]
CRYSTAL_SCAR_ASCENSION_GAMES_DEPRECATED_96 = 96,
/// Ascension games games on Crystal Scar.
CRYSTAL_SCAR_ASCENSION_GAMES = 910,
/// 6v6 Hexakill games games on Twisted Treeline.
TWISTED_TREELINE_6V6_HEXAKILL_GAMES = 98,
/// 5v5 ARAM games games on Butcher's Bridge.
BUTCHERS_BRIDGE_5V5_ARAM_GAMES = 100,
/// Legend of the Poro King games games on Howling Abyss.
/// <br>Deprecated in patch 7.19 in favor of queueId 920
CRYSTAL_SCAR_ASCENSION_DEPRECATED_96 = 96,
/// 6v6 Hexakill games on Twisted Treeline
TWISTED_TREELINE_6V6_HEXAKILL = 98,
/// 5v5 ARAM games on Butcher's Bridge
BUTCHERS_BRIDGE_5V5_ARAM = 100,
/// Legend of the Poro King games on Howling Abyss
/// Deprecated in patch 7.19 in favor of queueId 920
#[deprecated(note="Deprecated in patch 7.19 in favor of queueId 920")]
HOWLING_ABYSS_LEGEND_OF_THE_PORO_KING_GAMES_DEPRECATED_300 = 300,
/// Legend of the Poro King games games on Howling Abyss.
HOWLING_ABYSS_LEGEND_OF_THE_PORO_KING_GAMES = 920,
/// Nemesis games games on Summoner's Rift.
SUMMONERS_RIFT_NEMESIS_GAMES = 310,
/// Black Market Brawlers games games on Summoner's Rift.
SUMMONERS_RIFT_BLACK_MARKET_BRAWLERS_GAMES = 313,
/// Nexus Siege games games on Summoner's Rift.
/// <br>Deprecated in patch 7.19 in favor of queueId 940
HOWLING_ABYSS_LEGEND_OF_THE_PORO_KING_DEPRECATED_300 = 300,
/// Nemesis games on Summoner's Rift
SUMMONERS_RIFT_NEMESIS = 310,
/// Black Market Brawlers games on Summoner's Rift
SUMMONERS_RIFT_BLACK_MARKET_BRAWLERS = 313,
/// Nexus Siege games on Summoner's Rift
/// Deprecated in patch 7.19 in favor of queueId 940
#[deprecated(note="Deprecated in patch 7.19 in favor of queueId 940")]
SUMMONERS_RIFT_NEXUS_SIEGE_GAMES_DEPRECATED_315 = 315,
/// Nexus Siege games games on Summoner's Rift.
SUMMONERS_RIFT_NEXUS_SIEGE_GAMES = 940,
/// Definitely Not Dominion games games on Crystal Scar.
CRYSTAL_SCAR_DEFINITELY_NOT_DOMINION_GAMES = 317,
/// ARURF games games on Summoner's Rift.
/// <br>Deprecated in patch 7.19 in favor of queueId 900
SUMMONERS_RIFT_NEXUS_SIEGE_DEPRECATED_315 = 315,
/// Definitely Not Dominion games on Crystal Scar
CRYSTAL_SCAR_DEFINITELY_NOT_DOMINION = 317,
/// ARURF games on Summoner's Rift
/// Deprecated in patch 7.19 in favor of queueId 900
#[deprecated(note="Deprecated in patch 7.19 in favor of queueId 900")]
SUMMONERS_RIFT_ARURF_GAMES = 318,
/// All Random games games on Summoner's Rift.
SUMMONERS_RIFT_ALL_RANDOM_GAMES = 325,
/// 5v5 Ranked Dynamic games games on Summoner's Rift.
/// <br>Game mode deprecated in patch 6.22
SUMMONERS_RIFT_ARURF = 318,
/// All Random games on Summoner's Rift
SUMMONERS_RIFT_ALL_RANDOM = 325,
/// 5v5 Draft Pick games on Summoner's Rift
SUMMONERS_RIFT_5V5_DRAFT_PICK = 400,
/// 5v5 Ranked Dynamic games on Summoner's Rift
/// Game mode deprecated in patch 6.22
#[deprecated(note="Game mode deprecated in patch 6.22")]
SUMMONERS_RIFT_5V5_RANKED_DYNAMIC_GAMES = 410,
/// 5v5 Ranked Flex games games on Summoner's Rift.
SUMMONERS_RIFT_5V5_RANKED_FLEX_GAMES = 440,
/// 3v3 Blind Pick games games on Twisted Treeline.
/// <br>Deprecated in patch 9.23
SUMMONERS_RIFT_5V5_RANKED_DYNAMIC = 410,
/// 5v5 Ranked Solo games on Summoner's Rift
SUMMONERS_RIFT_5V5_RANKED_SOLO = 420,
/// 5v5 Blind Pick games on Summoner's Rift
SUMMONERS_RIFT_5V5_BLIND_PICK = 430,
/// 5v5 Ranked Flex games on Summoner's Rift
SUMMONERS_RIFT_5V5_RANKED_FLEX = 440,
/// 5v5 ARAM games on Howling Abyss
HOWLING_ABYSS_5V5_ARAM = 450,
/// 3v3 Blind Pick games on Twisted Treeline
/// Deprecated in patch 9.23
#[deprecated(note="Deprecated in patch 9.23")]
TWISTED_TREELINE_3V3_BLIND_PICK_GAMES = 460,
/// Blood Hunt Assassin games games on Summoner's Rift.
SUMMONERS_RIFT_BLOOD_HUNT_ASSASSIN_GAMES = 600,
/// Dark Star: Singularity games games on Cosmic Ruins.
COSMIC_RUINS_DARK_STAR_SINGULARITY_GAMES = 610,
/// Clash games games on Summoner's Rift.
SUMMONERS_RIFT_CLASH_GAMES = 700,
/// Co-op vs. AI Intermediate Bot games games on Twisted Treeline.
/// <br>Deprecated in patch 9.23
TWISTED_TREELINE_3V3_BLIND_PICK = 460,
/// 3v3 Ranked Flex games on Twisted Treeline
/// Deprecated in patch 9.23
#[deprecated(note="Deprecated in patch 9.23")]
TWISTED_TREELINE_CO_OP_VS_AI_INTERMEDIATE_BOT_GAMES = 800,
/// Co-op vs. AI Intro Bot games games on Twisted Treeline.
/// <br>Deprecated in patch 9.23
TWISTED_TREELINE_3V3_RANKED_FLEX_DEPRECATED_470 = 470,
/// Blood Hunt Assassin games on Summoner's Rift
SUMMONERS_RIFT_BLOOD_HUNT_ASSASSIN = 600,
/// Dark Star: Singularity games on Cosmic Ruins
COSMIC_RUINS_DARK_STAR_SINGULARITY = 610,
/// Clash games on Summoner's Rift
SUMMONERS_RIFT_CLASH = 700,
/// Co-op vs. AI Intermediate Bot games on Twisted Treeline
/// Deprecated in patch 9.23
#[deprecated(note="Deprecated in patch 9.23")]
TWISTED_TREELINE_CO_OP_VS_AI_INTRO_BOT_GAMES = 810,
/// Co-op vs. AI Beginner Bot games games on Twisted Treeline.
TWISTED_TREELINE_CO_OP_VS_AI_BEGINNER_BOT_GAMES = 820,
/// URF games games on Summoner's Rift.
SUMMONERS_RIFT_URF_GAMES = 900,
/// Doom Bots Voting games games on Summoner's Rift.
SUMMONERS_RIFT_DOOM_BOTS_VOTING_GAMES = 950,
/// Doom Bots Standard games games on Summoner's Rift.
SUMMONERS_RIFT_DOOM_BOTS_STANDARD_GAMES = 960,
/// Star Guardian Invasion: Normal games games on Valoran City Park.
VALORAN_CITY_PARK_STAR_GUARDIAN_INVASION_NORMAL_GAMES = 980,
/// Star Guardian Invasion: Onslaught games games on Valoran City Park.
VALORAN_CITY_PARK_STAR_GUARDIAN_INVASION_ONSLAUGHT_GAMES = 990,
/// PROJECT: Hunters games games on Overcharge.
OVERCHARGE_PROJECT_HUNTERS_GAMES = 1000,
/// Snow ARURF games games on Summoner's Rift.
SUMMONERS_RIFT_SNOW_ARURF_GAMES = 1010,
/// Odyssey Extraction: Intro games games on Crash Site.
CRASH_SITE_ODYSSEY_EXTRACTION_INTRO_GAMES = 1030,
/// Odyssey Extraction: Cadet games games on Crash Site.
CRASH_SITE_ODYSSEY_EXTRACTION_CADET_GAMES = 1040,
/// Odyssey Extraction: Crewmember games games on Crash Site.
CRASH_SITE_ODYSSEY_EXTRACTION_CREWMEMBER_GAMES = 1050,
/// Odyssey Extraction: Captain games games on Crash Site.
CRASH_SITE_ODYSSEY_EXTRACTION_CAPTAIN_GAMES = 1060,
/// Odyssey Extraction: Onslaught games games on Crash Site.
CRASH_SITE_ODYSSEY_EXTRACTION_ONSLAUGHT_GAMES = 1070,
/// Teamfight Tactics games games on Convergence.
CONVERGENCE_TEAMFIGHT_TACTICS_GAMES = 1090,
/// Ranked Teamfight Tactics games games on Convergence.
CONVERGENCE_RANKED_TEAMFIGHT_TACTICS_GAMES = 1100,
/// Teamfight Tactics Tutorial games games on Convergence.
CONVERGENCE_TEAMFIGHT_TACTICS_TUTORIAL_GAMES = 1110,
/// Nexus Blitz games games on Nexus Blitz.
/// <br>Deprecated in patch 9.2
#[deprecated(note="Deprecated in patch 9.2")]
NEXUS_BLITZ_NEXUS_BLITZ_GAMES = 1200,
/// Tutorial 1 games on Summoner's Rift.
SUMMONERS_RIFT_TUTORIAL1 = 2000,
/// Tutorial 2 games on Summoner's Rift.
SUMMONERS_RIFT_TUTORIAL2 = 2010,
/// Tutorial 3 games on Summoner's Rift.
SUMMONERS_RIFT_TUTORIAL3 = 2020,
TWISTED_TREELINE_CO_OP_VS_AI_INTERMEDIATE_BOT = 800,
/// Co-op vs. AI Intro Bot games on Twisted Treeline
/// Deprecated in patch 9.23
#[deprecated(note="Deprecated in patch 9.23")]
TWISTED_TREELINE_CO_OP_VS_AI_INTRO_BOT = 810,
/// Co-op vs. AI Beginner Bot games on Twisted Treeline
TWISTED_TREELINE_CO_OP_VS_AI_BEGINNER_BOT = 820,
/// Co-op vs. AI Intro Bot games on Summoner's Rift
SUMMONERS_RIFT_CO_OP_VS_AI_INTRO_BOT = 830,
/// Co-op vs. AI Beginner Bot games on Summoner's Rift
SUMMONERS_RIFT_CO_OP_VS_AI_BEGINNER_BOT = 840,
/// Co-op vs. AI Intermediate Bot games on Summoner's Rift
SUMMONERS_RIFT_CO_OP_VS_AI_INTERMEDIATE_BOT = 850,
/// URF games on Summoner's Rift
SUMMONERS_RIFT_URF = 900,
/// Ascension games on Crystal Scar
CRYSTAL_SCAR_ASCENSION = 910,
/// Legend of the Poro King games on Howling Abyss
HOWLING_ABYSS_LEGEND_OF_THE_PORO_KING = 920,
/// Nexus Siege games on Summoner's Rift
SUMMONERS_RIFT_NEXUS_SIEGE = 940,
/// Doom Bots Voting games on Summoner's Rift
SUMMONERS_RIFT_DOOM_BOTS_VOTING = 950,
/// Doom Bots Standard games on Summoner's Rift
SUMMONERS_RIFT_DOOM_BOTS_STANDARD = 960,
/// Star Guardian Invasion: Normal games on Valoran City Park
VALORAN_CITY_PARK_STAR_GUARDIAN_INVASION_NORMAL = 980,
/// Star Guardian Invasion: Onslaught games on Valoran City Park
VALORAN_CITY_PARK_STAR_GUARDIAN_INVASION_ONSLAUGHT = 990,
/// PROJECT: Hunters games on Overcharge
OVERCHARGE_PROJECT_HUNTERS = 1000,
/// Snow ARURF games on Summoner's Rift
SUMMONERS_RIFT_SNOW_ARURF = 1010,
/// One for All games on Summoner's Rift
SUMMONERS_RIFT_ONE_FOR_ALL = 1020,
/// Odyssey Extraction: Intro games on Crash Site
CRASH_SITE_ODYSSEY_EXTRACTION_INTRO = 1030,
/// Odyssey Extraction: Cadet games on Crash Site
CRASH_SITE_ODYSSEY_EXTRACTION_CADET = 1040,
/// Odyssey Extraction: Crewmember games on Crash Site
CRASH_SITE_ODYSSEY_EXTRACTION_CREWMEMBER = 1050,
/// Odyssey Extraction: Captain games on Crash Site
CRASH_SITE_ODYSSEY_EXTRACTION_CAPTAIN = 1060,
/// Odyssey Extraction: Onslaught games on Crash Site
CRASH_SITE_ODYSSEY_EXTRACTION_ONSLAUGHT = 1070,
/// Teamfight Tactics games on Convergence
CONVERGENCE_TEAMFIGHT_TACTICS = 1090,
/// Ranked Teamfight Tactics games on Convergence
CONVERGENCE_RANKED_TEAMFIGHT_TACTICS = 1100,
/// Teamfight Tactics Tutorial games on Convergence
CONVERGENCE_TEAMFIGHT_TACTICS_TUTORIAL = 1110,
/// Teamfight Tactics 1v0 testing games on Convergence
CONVERGENCE_TEAMFIGHT_TACTICS_1V0_TESTING = 1111,
/// Nexus Blitz games on Nexus Blitz
/// Deprecated in patch 9.2 in favor of queueId 1300
#[deprecated(note="Deprecated in patch 9.2 in favor of queueId 1300")]
NEXUS_BLITZ_NEXUS_BLITZ_DEPRECATED_1200 = 1200,
/// Nexus Blitz games on Nexus Blitz
NEXUS_BLITZ_NEXUS_BLITZ = 1300,
/// Tutorial 1 games on Summoner's Rift
SUMMONERS_RIFT_TUTORIAL_1 = 2000,
/// Tutorial 2 games on Summoner's Rift
SUMMONERS_RIFT_TUTORIAL_2 = 2010,
/// Tutorial 3 games on Summoner's Rift
SUMMONERS_RIFT_TUTORIAL_3 = 2020,
}

View file

@ -31,4 +31,6 @@ pub enum Season {
SEASON_2018 = 11,
PRESEASON_2019 = 12,
SEASON_2019 = 13,
PRESEASON_2020 = 14,
SEASON_2020 = 15,
}

View file

@ -14,10 +14,13 @@ use strum_macros::{ EnumString, Display, AsRefStr, IntoStaticStr };
#[repr(u8)]
pub enum GameMode {
{{
for (const { gameMode, description } of gameModes) {
for (const e of gameModes) {
const desc = e['x-desc'] ? e['x-desc'].split('\n') : [];
}}
/// {{= description }}
{{= gameMode }},
{{~ desc :line }}
/// {{= line }}
{{~}}
{{= e['x-name'] }},
{{
}
}}

View file

@ -12,10 +12,13 @@ use strum_macros::{ EnumString, Display, AsRefStr, IntoStaticStr };
#[repr(u8)]
pub enum GameType {
{{
for (const { gametype: gameType, description } of gameTypes) {
for (const e of gameTypes) {
const desc = e['x-desc'] ? e['x-desc'].split('\n') : [];
}}
/// {{= description }}
{{= gameType }},
{{~ desc :line }}
/// {{= line }}
{{~}}
{{= e['x-name'] }},
{{
}
}}

View file

@ -1,8 +1,6 @@
{{
const dotUtils = require('./dotUtils.js');
const maps = require('./.maps.json');
const groupedMaps = maps.groupBy(({ mapName }) =>
dotUtils.changeCase.constantCase(mapName.replace(/[ ']+/, '')));
}}{{= dotUtils.preamble() }}
use serde_repr::{ Serialize_repr, Deserialize_repr };
@ -17,20 +15,14 @@ use num_enum::{ IntoPrimitive, TryFromPrimitive };
#[repr(u8)]
pub enum Map {
{{
for (const [ groupName, colMaps ] of groupedMaps) {
for (const e of maps) {
const desc = e['x-desc'] ? e['x-desc'].split('\n') : [];
}}
{{~ desc :line }}
/// {{= line }}
{{~}}
{{= e['x-name'] }} = {{= e['x-value'] }},
{{
for (const [ i, { mapId, mapName, notes } ] of colMaps.entries()) {
let name = groupName;
if (i != colMaps.length - 1)
name += '_' + dotUtils.changeCase.constantCase(notes);
}}
/// {{= mapName }}
/// <br>{{= notes }}
{{= name }} = {{= mapId }},
{{
}
}
}}
}

View file

@ -1,12 +1,6 @@
{{
const dotUtils = require('./dotUtils.js');
const queues = require('./.queues.json');
const groupedQueues = queues.groupBy(({ map, description }) => {
const name = dotUtils.changeCase.constantCase((map || '').replace("'", ''))
+ '_' + dotUtils.changeCase.constantCase((description || '').replace(/\s+(?=\d)/g, ''));
return name;
});
}}{{= dotUtils.preamble() }}
use serde_repr::{ Serialize_repr, Deserialize_repr };
@ -21,25 +15,18 @@ use num_enum::{ IntoPrimitive, TryFromPrimitive };
#[repr(u16)]
pub enum Queue {
{{
for (let [ groupName, colQueues ] of groupedQueues) {
for (const e of queues) {
const desc = e['x-desc'] ? e['x-desc'].split('\n') : [];
}}
{{
for (let { queueId, map, description, notes } of colQueues) {
const doc = (description ? description + ' games on ' : '') + map;
const deprecated = (notes || '').toUpperCase().indexOf('DEPRECATED') >= 0;
const name = groupName + ((colQueues.length > 1 && deprecated) ? `_DEPRECATED_${queueId}` : '');
}}
/// {{= doc }}.
{{? notes }}
/// <br>{{= notes }}
{{~ desc :line }}
/// {{= line }}
{{~}}
{{? e['x-deprecated'] }}
/// {{= e.notes }}
#[deprecated(note="{{= e.notes }}")]
{{?}}
{{? deprecated}}
#[deprecated(note="{{= notes }}")]
{{?}}
{{= name }} = {{= queueId }},
{{= e['x-name'] }} = {{= e['x-value'] }},
{{
}
}
}}
}

View file

@ -15,10 +15,13 @@ use num_enum::{ IntoPrimitive, TryFromPrimitive };
#[repr(u8)]
pub enum Season {
{{
for (const { id, season } of seasons) {
const name = season.replace(' ', '_');
for (const e of seasons) {
const desc = e['x-desc'] ? e['x-desc'].split('\n') : [];
}}
{{= name }} = {{= id }},
{{~ desc :line }}
/// {{= line }}
{{~}}
{{= e['x-name'] }} = {{= e['x-value'] }},
{{
}
}}

View file

@ -16,23 +16,23 @@ const files = [
'.spec.json'
],
[
'http://static.developer.riotgames.com/docs/lol/seasons.json',
'http://www.mingweisamuel.com/riotapi-schema/enums/seasons.json',
'.seasons.json'
],
[
'http://static.developer.riotgames.com/docs/lol/queues.json',
'http://www.mingweisamuel.com/riotapi-schema/enums/queues.json',
'.queues.json'
],
[
'http://static.developer.riotgames.com/docs/lol/gameTypes.json',
'http://www.mingweisamuel.com/riotapi-schema/enums/gameTypes.json',
'.gameTypes.json'
],
[
'http://static.developer.riotgames.com/docs/lol/gameModes.json',
'http://www.mingweisamuel.com/riotapi-schema/enums/gameModes.json',
'.gameModes.json'
],
[
'http://static.developer.riotgames.com/docs/lol/maps.json',
'http://www.mingweisamuel.com/riotapi-schema/enums/maps.json',
'.maps.json'
]
]