Skip to content

Commit

Permalink
Adapted to some more changes in the api
Browse files Browse the repository at this point in the history
  • Loading branch information
Lol3rrr committed Dec 13, 2023
1 parent d68c023 commit 71b9b7d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions src/collector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ pub struct PlayerInfo {
warPreference: String,
attackWins: usize,
defenseWins: usize,
versusTrophies: usize,
bestVersusTrophies: usize,
versusTrophies: Option<usize>,
bestVersusTrophies: Option<usize>,
townHallLevel: usize,
townHallWeaponLevel: Option<usize>,
versusBattleWins: usize,
versusBattleWins: Option<usize>,
legendStatistics: Option<serde_json::Value>,
troops: serde_json::Value,
heroes: serde_json::Value,
Expand Down Expand Up @@ -109,7 +109,7 @@ pub struct ClanInfo {
capitalLeague: serde_json::Value,
pub memberList: Vec<ClanMember>,
tag: ClanTag,
requiredVersusTrophies: usize,
requiredVersusTrophies: Option<usize>,
isWarLogPublic: bool,
clanLevel: usize,
warWinStreak: usize,
Expand All @@ -122,7 +122,7 @@ pub struct ClanInfo {
isFamilyFriendly: bool,
warFrequency: serde_json::Value,
clanBuilderBasePoints: usize,
clanVersusPoints: usize,
clanVersusPoints: Option<usize>,
clanCapitalPoints: usize,
requiredTrophies: usize,
requiredBuilderBaseTrophies: usize,
Expand All @@ -141,7 +141,7 @@ pub struct ClanInfo {
pub struct ClanMember {
league: serde_json::Value,
builderBaseLeague: serde_json::Value,
versusTrophies: usize,
versusTrophies: Option<usize>,
pub tag: PlayerTag,
name: String,
role: serde_json::Value,
Expand Down
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ async fn main() {

let mut storage_backend = args
.subcommand_matches("bot")
.unwrap()
.expect("Missing subcommand")
.get_one::<String>("storage")
.map(|arg: &String| gold_pass_bot::parse_storage(&arg))
.unwrap()
.expect("Missing Storage")
.unwrap();

let api_path = std::env::var("API_PATH").unwrap_or_else(|_| "api.key".to_string());
Expand Down

0 comments on commit 71b9b7d

Please sign in to comment.