use serde::Deserialize;
#[derive(Deserialize)]
pub struct SkillsResponse {
pub skills: Skills
}
#[derive(Debug, Deserialize)]
#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
pub struct Skills {
pub farming: Skill,
pub mining: Skill,
pub combat: Skill,
pub foraging: Skill,
pub fishing: Skill,
pub enchanting: Skill,
pub alchemy: Skill,
pub carpentry: Skill,
pub runecrafting: Skill,
pub social: Skill,
pub taming: Skill
}
#[derive(Debug, Deserialize)]
pub struct Skill {
pub name: String,
pub description: String,
#[serde(rename = "maxLevel")]
pub max_level: usize,
pub levels: Vec<SkillLevel>
}
#[derive(Debug, Deserialize)]
pub struct SkillLevel {
pub level: usize,
pub total_exp_required: Option<usize>,
pub unlocks: Vec<String>
}
#[derive(Deserialize)]
pub struct ItemsResponse {
pub items: Vec<Item>
}
#[derive(Debug, Deserialize)]
pub struct Item {
pub id: String,
pub material: String,
pub name: String,
pub tier: Option<String>,
pub category: Option<String>,
pub npc_sell_price: Option<f32>,
pub skin: Option<String>,
pub generator: Option<String>,
pub generator_tier: Option<usize>,
pub color: Option<String>,
pub stats: Option<ItemStats>
}
#[derive(Debug, Deserialize)]
#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
pub struct ItemStats {
pub defense: Option<isize>,
pub health: Option<isize>,
pub magic_find: Option<isize>,
pub intelligence: Option<isize>,
pub walk_speed: Option<isize>,
pub damage: Option<isize>,
pub strength: Option<isize>,
pub weapon_ability_damage: Option<isize>,
pub critical_damage: Option<isize>
}
#[derive(Deserialize)]
pub struct ElectionResponse {
pub mayor: Mayor,
pub current: Election
}
#[derive(Debug, Deserialize)]
pub struct Mayor {
pub name: String,
pub key: String,
pub perks: Vec<Perk>,
pub election: Election
}
#[derive(Debug, Deserialize)]
pub struct Perk {
pub name: String,
pub description: String
}
#[derive(Debug, Deserialize)]
pub struct Candidate {
pub name: String,
pub key: String,
pub perks: Vec<Perk>,
pub votes: usize
}
#[derive(Debug, Deserialize)]
pub struct Election {
pub year: usize,
pub candidates: Vec<Candidate>
}
#[derive(Deserialize)]
pub struct BingoResponse {
pub goals: Vec<Bingo>
}
#[derive(Debug, Deserialize)]
pub struct Bingo {
pub id: String,
pub name: String
}
#[derive(Deserialize)]
pub struct ActiveAuctionsResponse {
pub auctions: Vec<Auction>
}
#[derive(Debug, Deserialize)]
pub struct Auction {
pub uuid: String,
pub auctioneer: String,
pub profile_id: String,
pub coop: Vec<String>,
pub start: usize,
pub end: usize,
pub item_name: String,
pub item_lore: String,
pub category: String,
pub tier: String,
pub starting_bid: usize,
pub claimed: bool,
pub highest_bid_amount: usize,
pub item_uuid: Option<String>,
pub bids: Vec<AuctionBid>
}
#[derive(Debug, Deserialize)]
pub struct AuctionBid {
pub auction_id: String,
pub bidder: String,
pub profile_id: String,
pub amount: usize,
pub timestamp: usize
}
#[derive(Deserialize)]
pub struct EndedAuctionsResponse {
pub auctions: Vec<EndedAuction>
}
#[derive(Debug, Deserialize)]
pub struct EndedAuction {
pub auction_id: String,
pub seller: String,
pub seller_profile: String,
pub buyer: String,
pub timestamp: usize,
pub price: usize
}
#[derive(Deserialize)]
pub struct Bazaar {
pub products: serde_json::Value
}