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
use craterequest;
use crate;
pub use crate;
pub const API_BASE: &str = "https://api.minehut.com";
/// Gets simple stats from Minehut asynchronously.
///
/// # Examples
///
/// ```
/// async fn print_stats() {
/// let stats = minehut::simple_stats().await;
///
/// println!("{} players are on", stats.player_count);
/// println!("{} hosted servers", stats.server_count);
/// }
/// ```
pub async
/// Gets player and server distribution from Minehut asynchronously.
///
/// # Examples
///
/// ```
/// #[tokio::main]
/// async fn main() {
/// let dist = minehut::player_distribution().await;
///
/// println!("{} java players", dist.java_total); // total java players on Minehut
/// println!("{} bedrock servers", dist.bedrock_player_server);
/// }
/// ```
pub async
/// Gets home page states from Minehut asynchronously.
///
/// # Examples
///
/// ```
/// #[tokio::main]
/// async fn main() {
/// let home = minehut::home_page_stats().await;
///
/// println!("{} users, {} server", home.user_count, home.server_count);
/// }
/// ```
pub async