updated elim teams
This commit is contained in:
parent
f52ec65764
commit
055900d3e0
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "torn-api"
|
||||
version = "0.5.26"
|
||||
version = "0.5.27"
|
||||
edition = "2021"
|
||||
authors = ["Pyrit [2111649]"]
|
||||
license = "MIT"
|
||||
|
|
|
@ -46,9 +46,9 @@ pub struct EliminationLeaderboard {
|
|||
pub team: user::EliminationTeam,
|
||||
pub score: i16,
|
||||
pub lives: i16,
|
||||
pub participants: i16,
|
||||
pub wins: i32,
|
||||
pub losses: i32,
|
||||
pub participants: Option<i16>,
|
||||
pub wins: Option<i32>,
|
||||
pub losses: Option<i32>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
|
@ -171,6 +171,7 @@ pub struct TerritoryWarReportTerritory {
|
|||
#[serde(rename_all = "snake_case")]
|
||||
pub enum TerritoryWarOutcome {
|
||||
EndWithPeaceTreaty,
|
||||
EndWithDestroyDefense,
|
||||
FailAssault,
|
||||
SuccessAssault,
|
||||
}
|
||||
|
@ -298,5 +299,16 @@ mod tests {
|
|||
response.territory_war_report().unwrap().war.result,
|
||||
TerritoryWarOutcome::EndWithPeaceTreaty
|
||||
);
|
||||
|
||||
let response = Client::default()
|
||||
.torn_api(&key)
|
||||
.torn(|b| b.selections(&[Selection::TerritoryWarReport]).id(23757))
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
assert_eq!(
|
||||
response.territory_war_report().unwrap().war.result,
|
||||
TerritoryWarOutcome::EndWithDestroyDefense
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -159,7 +159,7 @@ pub struct LifeBar {
|
|||
|
||||
#[derive(Debug, Clone, Copy, Deserialize)]
|
||||
#[serde(rename_all = "kebab-case")]
|
||||
pub enum EliminationTeam {
|
||||
pub enum EliminationTeam2022 {
|
||||
Firestarters,
|
||||
HardBoiled,
|
||||
QuackAddicts,
|
||||
|
@ -175,6 +175,19 @@ pub enum EliminationTeam {
|
|||
Sleepyheads,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, Deserialize)]
|
||||
#[serde(rename_all = "kebab-case")]
|
||||
pub enum EliminationTeam {
|
||||
Backstabbers,
|
||||
Cheese,
|
||||
DeathsDoor,
|
||||
RegularHumanPeople,
|
||||
FlowerRangers,
|
||||
ReligiousExtremists,
|
||||
Hivemind,
|
||||
CapsLockCrew,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum Competition {
|
||||
Elimination {
|
||||
|
@ -268,35 +281,15 @@ where
|
|||
None
|
||||
} else {
|
||||
Some(match team_raw {
|
||||
"firestarters" => EliminationTeam::Firestarters,
|
||||
"hard-boiled" => EliminationTeam::HardBoiled,
|
||||
"quack-addicts" => EliminationTeam::QuackAddicts,
|
||||
"rain-men" => EliminationTeam::RainMen,
|
||||
"totally-boned" => EliminationTeam::TotallyBoned,
|
||||
"rawring-thunder" => EliminationTeam::RawringThunder,
|
||||
"dirty-cops" => EliminationTeam::DirtyCops,
|
||||
"laughing-stock" => EliminationTeam::LaughingStock,
|
||||
"jean-therapy" => EliminationTeam::JeanTherapy,
|
||||
"satants-soldiers" => EliminationTeam::SatansSoldiers,
|
||||
"wolf-pack" => EliminationTeam::WolfPack,
|
||||
"sleepyheads" => EliminationTeam::Sleepyheads,
|
||||
_ => Err(de::Error::unknown_variant(
|
||||
team_raw,
|
||||
&[
|
||||
"firestarters",
|
||||
"hard-boiled",
|
||||
"quack-addicts",
|
||||
"rain-men",
|
||||
"totally-boned",
|
||||
"rawring-thunder",
|
||||
"dirty-cops",
|
||||
"laughing-stock",
|
||||
"jean-therapy",
|
||||
"satants-soldiers",
|
||||
"wolf-pack",
|
||||
"sleepyheads",
|
||||
],
|
||||
))?,
|
||||
"backstabbers" => EliminationTeam::Backstabbers,
|
||||
"cheese" => EliminationTeam::Cheese,
|
||||
"deaths-door" => EliminationTeam::DeathsDoor,
|
||||
"regular-human-people" => EliminationTeam::RegularHumanPeople,
|
||||
"flower-rangers" => EliminationTeam::FlowerRangers,
|
||||
"religious-extremists" => EliminationTeam::ReligiousExtremists,
|
||||
"hivemind" => EliminationTeam::Hivemind,
|
||||
"caps-lock-crew" => EliminationTeam::CapsLockCrew,
|
||||
_ => Err(de::Error::unknown_variant(team_raw, &[]))?,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue