Clippy
This commit is contained in:
@@ -85,18 +85,6 @@ pub async fn get_me() -> Result<UserInfo, ApiError> {
|
||||
get_json(&format!("{BASE}/auth/me")).await
|
||||
}
|
||||
|
||||
pub async fn list_users() -> Result<Vec<UserInfo>, ApiError> {
|
||||
get_json(&format!("{BASE}/auth/users")).await
|
||||
}
|
||||
|
||||
pub async fn create_user(username: &str, password: &str) -> Result<UserInfo, ApiError> {
|
||||
let body = serde_json::json!({"username": username, "password": password}).to_string();
|
||||
post_json(&format!("{BASE}/auth/users"), &body).await
|
||||
}
|
||||
|
||||
pub async fn delete_user(id: i32) -> Result<(), ApiError> {
|
||||
delete(&format!("{BASE}/auth/users/{id}")).await
|
||||
}
|
||||
|
||||
// --- Lyrics ---
|
||||
pub async fn get_lyrics(artist: &str, title: &str) -> Result<LyricsResult, ApiError> {
|
||||
@@ -142,10 +130,6 @@ pub async fn list_artists(limit: u64, offset: u64) -> Result<Vec<ArtistListItem>
|
||||
get_json(&format!("{BASE}/artists?limit={limit}&offset={offset}")).await
|
||||
}
|
||||
|
||||
pub async fn get_artist(id: i32) -> Result<ArtistDetail, ApiError> {
|
||||
get_json(&format!("{BASE}/artists/{id}")).await
|
||||
}
|
||||
|
||||
pub async fn get_artist_full(id: &str) -> Result<FullArtistDetail, ApiError> {
|
||||
get_json(&format!("{BASE}/artists/{id}/full")).await
|
||||
}
|
||||
@@ -158,9 +142,6 @@ pub async fn get_album(mbid: &str) -> Result<MbAlbumDetail, ApiError> {
|
||||
get_json(&format!("{BASE}/albums/{mbid}")).await
|
||||
}
|
||||
|
||||
pub async fn list_tracks(limit: u64, offset: u64) -> Result<Vec<Track>, ApiError> {
|
||||
get_json(&format!("{BASE}/tracks?limit={limit}&offset={offset}")).await
|
||||
}
|
||||
|
||||
// --- Watchlist ---
|
||||
pub async fn add_artist(name: &str, mbid: Option<&str>) -> Result<AddSummary, ApiError> {
|
||||
@@ -183,13 +164,6 @@ pub async fn add_album(
|
||||
post_json(&format!("{BASE}/albums"), &body).await
|
||||
}
|
||||
|
||||
pub async fn get_watchlist() -> Result<Vec<WatchListEntry>, ApiError> {
|
||||
get_json(&format!("{BASE}/watchlist")).await
|
||||
}
|
||||
|
||||
pub async fn remove_watchlist(id: i32) -> Result<(), ApiError> {
|
||||
delete(&format!("{BASE}/watchlist/{id}")).await
|
||||
}
|
||||
|
||||
// --- Downloads ---
|
||||
pub async fn get_downloads(status: Option<&str>) -> Result<Vec<DownloadItem>, ApiError> {
|
||||
@@ -249,9 +223,6 @@ pub async fn trigger_organize() -> Result<TaskRef, ApiError> {
|
||||
post_empty(&format!("{BASE}/organize")).await
|
||||
}
|
||||
|
||||
pub async fn get_task(id: &str) -> Result<TaskInfo, ApiError> {
|
||||
get_json(&format!("{BASE}/tasks/{id}")).await
|
||||
}
|
||||
|
||||
pub async fn get_config() -> Result<AppConfig, ApiError> {
|
||||
get_json(&format!("{BASE}/config")).await
|
||||
|
||||
Reference in New Issue
Block a user