spotify_client/client

Types

pub type AuthenticatedClient =
  SpotifyClient(UserAuthentication)
pub type BaseClient =
  SpotifyClient(Nil)
pub type SpotifyClient(user_authentication) {
  SpotifyClient(
    client_id: String,
    client_secret: String,
    redirect_uri: String,
    auth: user_authentication,
  )
}

Constructors

  • SpotifyClient(
      client_id: String,
      client_secret: String,
      redirect_uri: String,
      auth: user_authentication,
    )
pub type UserAuthentication {
  UserAuthentication(
    access_token: String,
    refresh_token: String,
    expires_at: timestamp.Timestamp,
  )
}

Constructors

  • UserAuthentication(
      access_token: String,
      refresh_token: String,
      expires_at: timestamp.Timestamp,
    )

Functions

pub fn authenticate(
  client: SpotifyClient(a),
  access_token: String,
  refresh_token: String,
  expires_at: Timestamp,
) -> SpotifyClient(UserAuthentication)
Search Document