2 releases
Uses new Rust 2024
| 0.0.2 | Jul 11, 2025 |
|---|---|
| 0.0.1 | Jun 28, 2025 |
#9 in #last
26KB
434 lines
Soniq
A modern and lightweight Rust client for the Last.fm API. Fully asynchronous and built with Tokio, Soniq provides a simple and efficient way to interact with Last.fm's extensive music data.
Installation
cargo add soniq
Or add Soniq to your Cargo.toml file directly:
[dependencies]
soniq = "*.*.*"
Quick Start
use soniq::client::Client;
#[tokio::main]
async fn main() -> Result<(), Error> {
let api_key = "YOUR_LASTFM_API_KEY";
let client = Client::builder(api_key.clone())
.api_secret("YOUR_LASTFM_API_SECRET") // optional for signed calls
.timeout(std::time::Duration::from_secs(5))
.build()?;
let user_info = client
.user()
.get_info("unb_")
.await?;
println!("User: {:?}", user_info);
Ok(())
}
Todo
The library is still in early development. Here are some of the planned features and improvements:
- Add missing user methods
- Implement album methods
- Implement artist methods
- Implement auth methods
- Implement chart methods
- Implement geo methods
- Implement library methods
- Implement tag methods
- Implement track methods
Contributing
Contributions, issues, and feature requests are welcome!
License
This project is licensed under the MIT License. See LICENSE for details.
Dependencies
~11–20MB
~279K SLoC