Skip to content

Antberro/spotify-api-wrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

102 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SPOTIFY-API-WRAPPER

An API wrapper of the Spotify Web API. It currently covers a subset of the available topics in the API. The following topics have full or partial support.

  • Track
  • Artist
  • Album
  • Playlist
  • Library

Creating a SpotifyClient

The wrapper consists of the SpotifyClient object. A client can be created using various authorization flows. Currently implements the Client Credential Flow and Authorization Code Flow.

Client Credential Flow

The client credential flow is used to access non-user information, such as data from the Spotify catalog.

from spotify.spotifyClient import SpotifyClient

CLIENT_ID = "Your Client ID"
CLIENT_SECRET = "Your Client Secret"

client = SpotifyClient.usingClientCredential(CLIENT_ID, CLIENT_SECRET)

Authorization Code Flow

The authorization code flow is used to access user information, requiring a user to login to their Spotify account.

from spotify.spotifyClient import SpotifyClient

CLIENT_ID = "Your Client ID"
CLIENT_SECRET = "Your Client Secret"
REDIRECT_URI = "Your Redirect URI"
SCOPE = "user-library-read"

client = SpotifyClient.usingAuthorizationCode(CLIENT_ID, CLIENT_SECRET, REDIRECT_URI, SCOPE)

About

A wrapper for the Spotify API.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages