Expand description
Gets all products from Minehut asynchronously.
Example
async fn print_expensive_products() -> Result<(), minehut::Error> {
use minehut::products;
// Print all icons with price over 700
products::all().await?.into_iter().for_each(|p| {
if(p.price > 700) {
println!("{} is expensive", p.title);
}
});
Ok(())
}
Error
Returns an error if Reqwest could not fetch the data or if it could not parse the JSON. This is usually a network problem.