forked from mirror/Riven
Add RANKED_TFT_DOUBLE_UP (renamed version of RANKED_TFT_PAIRS)
parent
056bacf67c
commit
b82a1725c1
|
@ -3,11 +3,15 @@ use strum_macros::{ EnumString, Display, AsRefStr, IntoStaticStr };
|
||||||
|
|
||||||
/// LoL or TFT ranked queue types.
|
/// LoL or TFT ranked queue types.
|
||||||
#[non_exhaustive]
|
#[non_exhaustive]
|
||||||
#[derive(Debug, Copy, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
#[derive(Eq, PartialEq, Hash)]
|
#[derive(Eq, PartialEq, Hash)]
|
||||||
#[derive(EnumString, Display, AsRefStr, IntoStaticStr)]
|
#[derive(EnumString, Display, AsRefStr, IntoStaticStr)]
|
||||||
#[derive(Serialize, Deserialize)]
|
#[derive(Serialize, Deserialize)]
|
||||||
pub enum QueueType {
|
pub enum QueueType {
|
||||||
|
/// Catch-all variant for new, unknown queue types.
|
||||||
|
#[strum(default)]
|
||||||
|
UNKNOWN(String),
|
||||||
|
|
||||||
/// League of Legends, Summoner's Rift (5v5), Ranked Solo Queue.
|
/// League of Legends, Summoner's Rift (5v5), Ranked Solo Queue.
|
||||||
RANKED_SOLO_5x5,
|
RANKED_SOLO_5x5,
|
||||||
/// League of Legends, Summoner's Rift (5v5), Flex Queue.
|
/// League of Legends, Summoner's Rift (5v5), Flex Queue.
|
||||||
|
@ -19,7 +23,11 @@ pub enum QueueType {
|
||||||
/// Ranked Teamfight Tactics, Hyper Roll gamemode.
|
/// Ranked Teamfight Tactics, Hyper Roll gamemode.
|
||||||
RANKED_TFT_TURBO,
|
RANKED_TFT_TURBO,
|
||||||
/// Ranked Teamfight Tactics, Double Up gamemode.
|
/// Ranked Teamfight Tactics, Double Up gamemode.
|
||||||
RANKED_TFT_PAIRS
|
RANKED_TFT_DOUBLE_UP,
|
||||||
|
|
||||||
|
/// Ranked Teamfight Tactics, OLD Double Up gamemode. Changed some time before June 2022.
|
||||||
|
#[deprecated(note="Use RANKED_TFT_DOUBLE_UP instead.")]
|
||||||
|
RANKED_TFT_PAIRS,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
|
|
|
@ -54,7 +54,10 @@ async_tests!{
|
||||||
let league_fut = RIOT_API.league_v4().get_league_entries_for_summoner(ROUTE, &*summoner.id);
|
let league_fut = RIOT_API.league_v4().get_league_entries_for_summoner(ROUTE, &*summoner.id);
|
||||||
let league = league_fut.await.map_err(|e| e.to_string())?;
|
let league = league_fut.await.map_err(|e| e.to_string())?;
|
||||||
rassert_eq!(1, league.len()); // BRITTLE!
|
rassert_eq!(1, league.len()); // BRITTLE!
|
||||||
|
#[allow(deprecated)]
|
||||||
|
{
|
||||||
rassert_eq!(league[0].queue_type, QueueType::RANKED_TFT_PAIRS);
|
rassert_eq!(league[0].queue_type, QueueType::RANKED_TFT_PAIRS);
|
||||||
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue