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
use crate::http::api::SpotifyApi;
use crate::http::client::HttpError;
use crate::http::endpoints::Endpoint;
use serde_json::Value;

/// Get user's followed artists
pub async fn get_followed_artists(
    client: &SpotifyApi,
    limit: Option<u8>,
) -> Result<Option<Value>, HttpError> {
    let limit = limit.unwrap_or(20).min(50);
    client
        .get(&Endpoint::FollowedArtists { limit }.path())
        .await
}