Expand description
A simple, easy to use Rust wrapper for the Minehut API.
All functions that return/modify data in the crate use async/await.
This module provides functions for:
- Getting Minehut stats in an organized manner from the Minehut API.
- Client authentication allowing you to access and or modify more data.
§Example
Creating a client instance:
// Functions can be seen at the Client struct
let client = minehut::Client::new("auth-token", "session-id");
// Do something with it
Modules§
- models
- This module stores all data structs used to receive data from the Minehut API.
- products
- This is the products module accessible from the crate folder. It contains all information related to Minehut products.
- servers
- This is the servers public modules to access data related to Minehut servers. One of the more used modules.
Structs§
- Client
- This is the Minehut client struct, it only stores an authentication token and session ID. All data that require authentication can only be ran using this struct.
Enums§
- Error
- All error types for the crate. Used by the crate to propogate errors. Users can use it for error handling.
Functions§
- homepage_
stats - Gets a
HomePageStats
from Minehut asynchronously. Returns the home page statistics. - player_
distribution - Gets a
PlayerDistribution
struct from Minehut asynchronously. Gets the player distribution for Java and Bedrock on Minehut. - simple_
stats - Gets a
SimpleStats
struct from Minehut asynchronously. Gets simple Minehut statistics.