forked from mirror/Riven
1
0
Fork 0

Add Valorant regions, TEMPORARY fix for #15

v/1.x.x
Mingwei Samuel 2020-12-11 12:23:16 -08:00
parent cb953f7b34
commit 2147b41d1e
1 changed files with 16 additions and 0 deletions

View File

@ -3,6 +3,9 @@ use strum_macros::{ EnumString, Display, AsRefStr, IntoStaticStr };
/// A region served by a single game server.
/// Each Riot Games API request is directed at a particular region,
/// with tournament API requests directed at the AMERICAS "global" region.
///
/// Valorant regions are prefixed with `VAL_` due to the name collision with
/// `BR` ("BR1") for LoL and `BR` ("BR") for Valorant.
#[derive(Debug)]
#[derive(PartialEq, Eq, Hash, PartialOrd, Ord)]
#[derive(EnumString, Display, AsRefStr, IntoStaticStr)]
@ -38,6 +41,19 @@ pub enum Region {
EUROPE,
#[strum(to_string="ASIA", serialize="ASIA")]
ASIA,
#[strum(to_string="AP", serialize="AP")]
VAL_AP,
#[strum(to_string="BR", serialize="BR")]
VAL_BR,
#[strum(to_string="EU", serialize="EU")]
VAL_EU,
#[strum(to_string="KR", serialize="KR")]
VAL_KR,
#[strum(to_string="LATAM", serialize="LATAM")]
VAL_LATAM,
#[strum(to_string="NA", serialize="NA")]
VAL_NA,
}
#[cfg(test)]