pub async fn all() -> Result<Vec<ServerIcon>, Error>
Expand description
Gets all Minehut server icons asynchronously as a ServerIcon
struct.
Example
use minehut::servers::icons;
async fn print_all_icons() {
// Looping through icons
icons::all().await.unwrap().into_iter().for_each(|i| {
println!("{:?}", i)
});
}
Error
Returns an error if Reqwest fails to get data from path or if it cannot read JSON response. Both of these are usually network issues.