lastfm-edit

Crates.iolastfm-edit
lib.rslastfm-edit
version4.0.3
created_at2025-07-21 11:03:08.619437+00
updated_at2025-08-08 01:13:21.406808+00
descriptionRust crate for programmatic access to Last.fm's scrobble editing functionality via web scraping
homepagehttps://github.com/colonelpanic8/lastfm-edit
repositoryhttps://github.com/colonelpanic8/lastfm-edit
max_upload_size
id1761949
size59,056,798
Ivan Malison (colonelpanic8)

documentation

https://docs.rs/lastfm-edit

README

lastfm-edit

A Rust crate for programmatic access to Last.fm's scrobble editing functionality via web scraping.

📚 View API Documentation →

Features

  • Authentication: Login with username/password
  • Library browsing: Paginated access to tracks, albums, and recent scrobbles
  • Bulk editing: Edit track names, artist names, and album information
  • Async iterators: Stream large datasets efficiently
  • HTTP client abstraction: Works with any HTTP client implementation

Quick Start

use lastfm_edit::{LastFmEditClient, LastFmEditClientImpl, AsyncPaginatedIterator, Result};

#[tokio::main]
async fn main() -> Result<()> {
    let http_client = http_client::native::NativeClient::new();
    let client = LastFmEditClientImpl::login_with_credentials(
        Box::new(http_client),
        "username",
        "password"
    ).await?;

    let mut recent_tracks = client.recent_tracks();
    while let Some(track) = recent_tracks.next().await? {
        println!("{} - {}", track.artist, track.name);
    }

    Ok(())
}

Core Types

  • [LastFmEditClient] - Main client trait (see trait docs for all methods and examples)
  • [LastFmEditClientImpl] - Concrete client implementation
  • [Track], [Album] - Music metadata structures
  • [AsyncPaginatedIterator] - Streaming paginated data
  • [ScrobbleEdit] - Track edit operations
  • [LastFmError] - Error types

Installation

[dependencies]
lastfm-edit = "4.0.1"
http-client = { version = "^6.6.3", package = "http-client-2", features = ["curl_client"] }
tokio = { version = "1.0", features = ["full"] }

License

MIT

Commit count: 0

cargo fmt