spotify-cli 0.5.0

A command-line interface for Spotify
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::http::api::SpotifyApi;
use crate::http::client::HttpError;
use crate::http::endpoints::Endpoint;
use serde_json::Value;

/// Get user's saved audiobooks
pub async fn get_users_saved_audiobooks(
    client: &SpotifyApi,
    limit: Option<u8>,
    offset: Option<u32>,
) -> Result<Option<Value>, HttpError> {
    let limit = limit.unwrap_or(20).min(50);
    let offset = offset.unwrap_or(0);
    client
        .get(&Endpoint::SavedAudiobooks { limit, offset }.path())
        .await
}