spotify-cli 0.5.0

A command-line interface for Spotify
Documentation
//! Library command definitions.

use clap::Subcommand;

use crate::constants::{DEFAULT_LIMIT, DEFAULT_OFFSET};

#[derive(Subcommand)]
pub enum LibraryCommand {
    /// List saved tracks (liked songs) (alias: ls)
    #[command(alias = "ls")]
    List {
        /// Number of tracks to return (default 20, max 50)
        #[arg(long, short = 'l', default_value_t = DEFAULT_LIMIT)]
        limit: u8,
        /// Offset for pagination
        #[arg(long, short = 'o', default_value_t = DEFAULT_OFFSET)]
        offset: u32,
    },
    /// Save tracks to library (like songs)
    Save {
        /// Track IDs to save
        ids: Vec<String>,
        /// Save the currently playing track
        #[arg(long, short = 'n')]
        now_playing: bool,
        /// Show what would be done without making changes
        #[arg(long)]
        dry_run: bool,
    },
    /// Remove tracks from library (unlike songs)
    Remove {
        /// Track IDs to remove
        #[arg(required = true)]
        ids: Vec<String>,
        /// Show what would be done without making changes
        #[arg(long)]
        dry_run: bool,
    },
    /// Check if tracks are in library
    Check {
        /// Track IDs to check
        #[arg(required = true)]
        ids: Vec<String>,
    },
}