1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//! Authentication command definitions.
use clap::Subcommand;
#[derive(Subcommand)]
pub enum AuthCommand {
/// Login to Spotify (opens browser for OAuth)
Login {
/// Force re-authentication (new browser flow)
#[arg(long, short = 'f')]
force: bool,
},
/// Logout and clear stored tokens
Logout,
/// Refresh the access token
Refresh,
/// Check authentication status
Status,
}
#[derive(Subcommand)]
pub enum PinCommand {
/// Add a pinned resource
Add {
/// Resource type: playlist, track, album, artist, show, episode, audiobook
#[arg(value_parser = ["playlist", "track", "album", "artist", "show", "episode", "audiobook"])]
resource_type: String,
/// Spotify URL or ID
url_or_id: String,
/// Human-friendly alias for searching
alias: String,
/// Optional comma-separated tags
#[arg(long, short = 't')]
tags: Option<String>,
},
/// Remove a pinned resource
Remove {
/// Alias or ID of the pin to remove
alias_or_id: String,
},
/// List pinned resources
List {
/// Filter by resource type
#[arg(long, short = 'T', value_parser = ["playlist", "track", "album", "artist", "show", "episode", "audiobook"])]
resource_type: Option<String>,
},
}