spotify-rs 0.4.1

A Rust wrapper for the Spotify API.
Documentation
1
2
3
4
5
6
7
8
9
10
use crate::{auth::AuthFlow, error::Result, model::market::Markets};

use super::Client;

pub async fn get_available_markets(spotify: &Client<impl AuthFlow>) -> Result<Vec<String>> {
    spotify
        .get::<(), _>("/markets".to_owned(), None)
        .await
        .map(|m: Markets| m.markets)
}