spotify_cli/endpoints/user/get_current_user.rs
1/// Get detailed profile information about the current user.
2///
3/// See: https://developer.spotify.com/documentation/web-api/reference/get-current-users-profile
4use crate::http::api::SpotifyApi;
5use crate::http::client::HttpError;
6use crate::http::endpoints::Endpoint;
7use serde_json::Value;
8
9pub async fn get_current_user(client: &SpotifyApi) -> Result<Option<Value>, HttpError> {
10 client.get(&Endpoint::CurrentUser.path()).await
11}