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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
//! Browse and follow command definitions.
use clap::Subcommand;
use crate::constants::{DEFAULT_LIMIT, DEFAULT_OFFSET};
#[derive(Subcommand)]
pub enum FollowCommand {
/// Follow artists
Artist {
/// Artist IDs to follow
#[arg(required = true)]
ids: Vec<String>,
/// Show what would be done without making changes
#[arg(long)]
dry_run: bool,
},
/// Follow users
User {
/// User IDs to follow
#[arg(required = true)]
ids: Vec<String>,
/// Show what would be done without making changes
#[arg(long)]
dry_run: bool,
},
/// Unfollow artists
UnfollowArtist {
/// Artist IDs to unfollow
#[arg(required = true)]
ids: Vec<String>,
/// Show what would be done without making changes
#[arg(long)]
dry_run: bool,
},
/// Unfollow users
UnfollowUser {
/// User IDs to unfollow
#[arg(required = true)]
ids: Vec<String>,
/// Show what would be done without making changes
#[arg(long)]
dry_run: bool,
},
/// List followed artists
List {
/// Number of artists to return (default 20, max 50)
#[arg(long, short = 'l', default_value_t = DEFAULT_LIMIT)]
limit: u8,
},
/// Check if following artists
CheckArtist {
/// Artist IDs to check
#[arg(required = true)]
ids: Vec<String>,
},
/// Check if following users
CheckUser {
/// User IDs to check
#[arg(required = true)]
ids: Vec<String>,
},
}
#[derive(Subcommand)]
pub enum CategoryCommand {
/// List browse categories
List {
/// Number of categories 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,
},
/// Get category details
Get {
/// Category name or ID (e.g., "pop", "rock", "focus", "gaming", "dinner")
id: String,
},
/// Get playlists for a category
Playlists {
/// Category ID
id: String,
/// Number of playlists 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,
},
}