use futures::join; use radiobrowser_lib_rust::RadioBrowserAPI; use radiobrowser_lib_rust::StationOrder; use std::error::Error; #[async_std::main] async fn main() -> Result<(), Box> { let mut api = RadioBrowserAPI::new().await?; let countries = api.get_countries().send(); let languages = api.get_languages().send(); let stations = api .get_stations() .name("jazz") .reverse(true) .order(StationOrder::Clickcount) .send(); let config = api.get_server_config(); let (stations, config, countries, languages) = join!(stations, config, countries, languages); println!("Config: {:#?}", config?); println!("Countries found: {}", countries?.len()); println!("Languages found: {}", languages?.len()); println!("Stations found: {}", stations?.len()); Ok(()) }