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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
use std::path::PathBuf;
use clap::ValueEnum;
#[derive(clap::Args)]
pub struct InfoArgs {
/// Clip ID to inspect
pub id: String,
}
#[derive(clap::Args)]
pub struct PersonaArgs {
/// Persona ID to view
pub id: String,
}
#[derive(clap::Args)]
pub struct ListArgs {
/// Cursor returned by the previous feed response
#[arg(long)]
pub cursor: Option<String>,
/// Maximum number of clips to return
#[arg(long)]
pub limit: Option<u32>,
/// Restrict to public clips
#[arg(long)]
pub public: bool,
/// Restrict to liked clips
#[arg(long)]
pub liked: bool,
/// Restrict to uploaded clips
#[arg(long)]
pub upload: bool,
/// Restrict to cover/remix-derived clips
#[arg(long)]
pub cover: bool,
/// Restrict to extended clips
#[arg(long)]
pub extend: bool,
/// Sort list results
#[arg(long, value_enum)]
pub sort: Option<ListSort>,
}
#[derive(Clone, Copy, Debug, ValueEnum)]
pub enum ListSort {
/// Sort by public upvote count, descending
Popular,
}
#[derive(clap::Args)]
pub struct SearchArgs {
/// Search query (matches title and tags)
pub query: String,
}
#[derive(clap::Args)]
pub struct DeleteArgs {
/// Clip ID(s) to delete
pub ids: Vec<String>,
/// Confirm this destructive action
#[arg(short = 'y', long)]
pub yes: bool,
}
#[derive(clap::Args)]
pub struct RestoreArgs {
/// Clip ID(s) to restore from trash
pub ids: Vec<String>,
}
#[derive(clap::Args)]
pub struct ReactionArgs {
/// Clip ID(s) to update
pub ids: Vec<String>,
/// Clear this reaction instead of setting it
#[arg(long)]
pub clear: bool,
}
#[derive(clap::Args)]
pub struct StatusArgs {
/// Clip ID(s) to check
pub ids: Vec<String>,
}
#[derive(clap::Args)]
pub struct SetArgs {
/// Clip ID to update
pub id: String,
/// New title
#[arg(long)]
pub title: Option<String>,
/// New lyrics text
#[arg(long)]
pub lyrics: Option<String>,
/// Read lyrics from file
#[arg(long)]
pub lyrics_file: Option<String>,
/// New caption
#[arg(long)]
pub caption: Option<String>,
/// New clip cover image URL
#[arg(long, conflicts_with_all = ["image_file", "remove_cover"])]
pub image_url: Option<String>,
/// Local image file to upload and use as clip cover
#[arg(long, conflicts_with_all = ["image_url", "remove_cover"])]
pub image_file: Option<PathBuf>,
/// Remove custom cover image
#[arg(long)]
pub remove_cover: bool,
/// Remove custom video cover
#[arg(long)]
pub remove_video_cover: bool,
}
#[derive(clap::Args)]
pub struct PublishArgs {
/// Clip ID(s)
pub ids: Vec<String>,
/// Make public (default) or --private
#[arg(long)]
pub private: bool,
}