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.

Album-related endpoints.

Artist-related endpoints.

Endpoint functions related to categories, featured playlists, recommendations, and new releases.

Episode-related endpoints.

Endpoint functions related to following and unfollowing artists, users and playlists.

Endpoints relating to saving albums and tracks.

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 playlists.

Endpoint functions related to searches.

Endpoint functions related to shows.

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.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.