soniq

Crates.iosoniq
lib.rssoniq
version0.0.2
created_at2025-06-28 15:24:53.545005+00
updated_at2025-07-11 14:19:43.192464+00
descriptionA Rust library to interact with the Last.fm API.
homepagehttps://github.com/CleeSim/soniq
repositoryhttps://github.com/CleeSim/soniq.git
max_upload_size
id1729926
size69,846
iku (notiku)

documentation

https://docs.rs/soniq

README

Soniq

Crates.io Docs.rs License

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.

Commit count: 0

cargo fmt