pub async fn homepage_stats() -> Result<HomePageStats, Error>
Expand description

Gets a HomePageStats from Minehut asynchronously. Returns the home page statistics.

Examples

#[tokio::main]
async fn main() {
    // It is safe to assume this will not return an error.
    // As such, we will unwrap() the result.
    let home = minehut::home_page_stats().await.unwrap();
 
    println!("{} users, {} server", home.user_count, home.server_count);
}

Error

Returns a HTTP error if it cannot load page, this is usally a network error.