Struct aspotify::Client [−][src]
pub struct Client {
pub credentials: ClientCredentials,
// some fields omitted
}
Expand description
A client to the Spotify API.
By default it will use the client credentials
flow
to send requests to the Spotify API. The set_refresh_token
and
redirected
methods tell it to use the authorization code
flow
instead.
Fields
credentials: ClientCredentials
Your Spotify client credentials.
Implementations
Endpoint function namespaces.
Endpoint functions related to categories, featured playlists, recommendations, and new releases.
Endpoint functions related to following and unfollowing artists, users and playlists.
Endpoint functions relating to a user’s top artists and tracks.
Endpoint functions related to controlling what is playing on the current user’s Spotify account. (Beta)
Endpoint functions related to tracks and audio analysis.
Endpoint functions related to users’ profiles.
Create a new client from your Spotify client credentials.
Create a new client with your Spotify client credentials and a refresh token.
Get the client’s refresh token.
Set the client’s refresh token.
Get the client’s access token values.
Explicitly override the client’s access token values. Useful if you acquire the access token elsewhere.
Set the refresh token from the URL the client was redirected to and the state that was used to send them there.
Use the authorization_url()
function to generate the URL to which you can send the
client to to generate the URL here.
Errors
Fails if the URL is invalid in some way, the state was incorrect for the URL or Spotify fails.