radiobrowser-lib-rust/src/bin/test.rs

15 lines
452 B
Rust
Raw Normal View History

2022-04-20 19:51:14 +00:00
use radiobrowser_lib_rust::RadioBrowserAPI;
2022-04-18 23:55:26 +00:00
use std::error::Error;
#[async_std::main]
async fn main() -> Result<(), Box<dyn Error>> {
2022-04-20 19:51:14 +00:00
let mut api = RadioBrowserAPI::new().await?;
let config = api.get_server_config().await?;
println!("{:#?}", config);
let countries = api.get_countries().await?;
2022-04-20 21:45:37 +00:00
println!("{:#?}", countries);
let stations = api.search().name("jazz").send().await?;
println!("{:#?}", stations);
2022-04-18 23:55:26 +00:00
Ok(())
}