mirror of
https://gitlab.com/hladislav/radiobrowser-lib-rust.git
synced 2025-04-29 23:34:12 +00:00
Client library for radio-browser.info and other radio-browser-rust servers
src | ||
.gitignore | ||
Cargo.toml | ||
LICENSE | ||
README.md |
Radiobrowser Lib Rust
Client library for radio-browser.info and other radio-browser-rust servers
Getting started
Cargo.toml entry
radiobrowser = "*"
Example:
use radiobrowser::RadioBrowserAPI;
use radiobrowser::StationOrder;
use std::error::Error;
#[async_std::main]
async fn main() -> Result<(), Box<dyn Error>> {
let mut api = RadioBrowserAPI::new().await?;
let stations = api
.get_stations()
.name("jazz")
.reverse(true)
.order(StationOrder::Clickcount)
.send()
.await?;
println!("Stations found: {}", stations?.len());
Ok(())
}
Usage
Documentation is at https://docs.rs/radiobrowser
License
This project is MIT licensed.