1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
use super::http;
pub fn leaderboard(mode: &String, start: Option<usize>, end: Option<usize>) -> serde_json::Value {
let url;
match start {
None => url = format!("https://api.roccodev.pw/{}/monthlies/leaderboard/", mode),
Some(ref start) => url = format!("https://api.roccodev.pw/{}/monthlies/leaderboard?from={}&to={}", mode, start, end.unwrap_or(500)),
}
let json = http::json_from_url(url);
return json;
}
pub fn profile(mode: &String, uuid: &String) -> serde_json::Value {
let url = format!("https://api.roccodev.pw/{}/monthlies/profile/{}", mode, uuid);
let json = http::json_from_url(url);
return json;
}