spotify_cli/cli/args/browse.rs
1//! Browse and follow command definitions.
2
3use clap::Subcommand;
4
5use crate::constants::{DEFAULT_LIMIT, DEFAULT_OFFSET};
6
7#[derive(Subcommand)]
8pub enum FollowCommand {
9 /// Follow artists
10 Artist {
11 /// Artist IDs to follow
12 #[arg(required = true)]
13 ids: Vec<String>,
14 /// Show what would be done without making changes
15 #[arg(long)]
16 dry_run: bool,
17 },
18 /// Follow users
19 User {
20 /// User IDs to follow
21 #[arg(required = true)]
22 ids: Vec<String>,
23 /// Show what would be done without making changes
24 #[arg(long)]
25 dry_run: bool,
26 },
27 /// Unfollow artists
28 UnfollowArtist {
29 /// Artist IDs to unfollow
30 #[arg(required = true)]
31 ids: Vec<String>,
32 /// Show what would be done without making changes
33 #[arg(long)]
34 dry_run: bool,
35 },
36 /// Unfollow users
37 UnfollowUser {
38 /// User IDs to unfollow
39 #[arg(required = true)]
40 ids: Vec<String>,
41 /// Show what would be done without making changes
42 #[arg(long)]
43 dry_run: bool,
44 },
45 /// List followed artists
46 List {
47 /// Number of artists to return (default 20, max 50)
48 #[arg(long, short = 'l', default_value_t = DEFAULT_LIMIT)]
49 limit: u8,
50 },
51 /// Check if following artists
52 CheckArtist {
53 /// Artist IDs to check
54 #[arg(required = true)]
55 ids: Vec<String>,
56 },
57 /// Check if following users
58 CheckUser {
59 /// User IDs to check
60 #[arg(required = true)]
61 ids: Vec<String>,
62 },
63}
64
65#[derive(Subcommand)]
66pub enum CategoryCommand {
67 /// List browse categories
68 List {
69 /// Number of categories to return (default 20, max 50)
70 #[arg(long, short = 'l', default_value_t = DEFAULT_LIMIT)]
71 limit: u8,
72 /// Offset for pagination
73 #[arg(long, short = 'o', default_value_t = DEFAULT_OFFSET)]
74 offset: u32,
75 },
76 /// Get category details
77 Get {
78 /// Category name or ID (e.g., "pop", "rock", "focus", "gaming", "dinner")
79 id: String,
80 },
81 /// Get playlists for a category
82 Playlists {
83 /// Category ID
84 id: String,
85 /// Number of playlists to return (default 20, max 50)
86 #[arg(long, short = 'l', default_value_t = DEFAULT_LIMIT)]
87 limit: u8,
88 /// Offset for pagination
89 #[arg(long, short = 'o', default_value_t = DEFAULT_OFFSET)]
90 offset: u32,
91 },
92}