1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
use std::collections::HashMap;
use url::Url;
/// Player Lifetime Stats
#[derive(Debug, serde::Deserialize, serde::Serialize)]
pub struct LifetimeStats {
/// Best MMR Stats
#[serde(rename = "bestMmr")]
pub best_mmr: Option<BestMmr>,
/// Win Percent
#[serde(rename = "winPct")]
pub win_pct: f64,
/// Total # of wins
pub wins: u64,
/// Total K/D
pub kd: f64,
/// Total # of kills
pub kills: u64,
/// Total # of matches
pub matches: u64,
/// Total headshot %
#[serde(rename = "headshotPct")]
pub headshot_pct: f64,
/// Total # of headshots
pub headshots: u64,
/// Total # of melee kills
#[serde(rename = "meleeKills")]
pub melee_kills: u64,
/// Total # of blind kills
#[serde(rename = "blindKills")]
pub blind_kills: u64,
/// Total # of deaths
pub deaths: u64,
/// Total # of losses
pub losses: u64,
/// Total # of XP
pub xp: u64,
/// Unknown keys
#[serde(flatten)]
pub unknown: HashMap<String, serde_json::Value>,
}
/// Best Overwolf Lifetime MMR
#[derive(Debug, serde::Deserialize, serde::Serialize)]
pub struct BestMmr {
/// MMR
pub mmr: u64,
/// Rank Name
pub name: String,
/// Rank Image URL
pub img: Url,
/// Unknown Keys
#[serde(flatten)]
pub unknown: HashMap<String, serde_json::Value>,
}