-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1788015
commit 7121963
Showing
3 changed files
with
81 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
use serde::{Deserialize, Serialize}; | ||
|
||
pub type Challenges = Vec<Challenge>; | ||
|
||
#[derive(Serialize, Deserialize)] | ||
pub struct Challenge { | ||
pub id: i64, | ||
pub name: String, | ||
pub description: String, | ||
#[serde(rename = "shortDescription")] | ||
pub short_description: String, | ||
#[serde(rename = "hasLeaderboard")] | ||
pub has_leaderboard: bool, | ||
#[serde(rename = "levelToIconPath")] | ||
pub level_to_icon_path: LevelToIconPath, | ||
pub thresholds: Thresholds, | ||
} | ||
|
||
#[derive(Serialize, Deserialize)] | ||
pub struct LevelToIconPath { | ||
#[serde(rename = "IRON")] | ||
pub iron: Option<String>, | ||
#[serde(rename = "BRONZE")] | ||
pub bronze: Option<String>, | ||
#[serde(rename = "SILVER")] | ||
pub silver: Option<String>, | ||
#[serde(rename = "GOLD")] | ||
pub gold: Option<String>, | ||
#[serde(rename = "PLATINUM")] | ||
pub platinum: Option<String>, | ||
#[serde(rename = "DIAMOND")] | ||
pub diamond: Option<String>, | ||
#[serde(rename = "MASTER")] | ||
pub master: Option<String>, | ||
#[serde(rename = "GRANDMASTER")] | ||
pub grandmaster: Option<String>, | ||
#[serde(rename = "CHALLENGER")] | ||
pub challenger: Option<String>, | ||
} | ||
|
||
#[derive(Serialize, Deserialize)] | ||
pub struct Thresholds { | ||
#[serde(rename = "IRON")] | ||
pub iron: Option<RankReward>, | ||
#[serde(rename = "BRONZE")] | ||
pub bronze: Option<RankReward>, | ||
#[serde(rename = "SILVER")] | ||
pub silver: Option<RankReward>, | ||
#[serde(rename = "GOLD")] | ||
pub gold: Option<RankReward>, | ||
#[serde(rename = "PLATINUM")] | ||
pub platinum: Option<RankReward>, | ||
#[serde(rename = "DIAMOND")] | ||
pub diamond: Option<RankReward>, | ||
#[serde(rename = "MASTER")] | ||
pub master: Option<RankReward>, | ||
#[serde(rename = "GRANDMASTER")] | ||
pub grandmaster: Option<RankReward>, | ||
#[serde(rename = "CHALLENGER")] | ||
pub challenger: Option<RankReward>, | ||
} | ||
|
||
#[derive(Serialize, Deserialize)] | ||
pub struct RankReward { | ||
pub value: i64, | ||
pub rewards: Option<Vec<RewardDetails>>, | ||
} | ||
|
||
#[derive(Serialize, Deserialize)] | ||
pub struct RewardDetails { | ||
pub category: String, | ||
pub quantity: i64, | ||
pub title: String, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
pub mod challenges; | ||
pub mod champions; | ||
pub mod items; | ||
pub mod shared; | ||
pub mod translations; | ||
|
||
pub use challenges::Challenges; | ||
pub use champions::Champions; | ||
pub use items::Items; | ||
pub use translations::Translations; |