mirror of
https://github.com/natsukagami/youmubot.git
synced 2025-05-25 01:30:50 +00:00
Basic user information parsing
This commit is contained in:
parent
c6ec62f33b
commit
71041533bf
5 changed files with 118 additions and 3 deletions
|
@ -30,6 +30,7 @@ impl<'de> Deserialize<'de> for User {
|
|||
count_sh: parse_from_str(&raw.count_rank_sh)?,
|
||||
count_a: parse_from_str(&raw.count_rank_a)?,
|
||||
rank: parse_from_str(&raw.pp_rank)?,
|
||||
country_rank: parse_from_str(&raw.pp_country_rank)?,
|
||||
level: parse_from_str(&raw.level)?,
|
||||
pp: Some(parse_from_str(&raw.pp_raw)?).filter(|v| *v != 0.0),
|
||||
accuracy: parse_from_str(&raw.accuracy)?,
|
||||
|
|
|
@ -175,6 +175,7 @@ pub struct User {
|
|||
pub events: Vec<UserEvent>,
|
||||
// Rankings
|
||||
pub rank: u64,
|
||||
pub country_rank: u64,
|
||||
pub level: f64,
|
||||
pub pp: Option<f64>,
|
||||
pub accuracy: f64,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue