GraphQL schema for Spotify Web Api written in Python 3
SPOTIPY_CLIENT_ID
Your spotify client id
SPOTIPY_CLIENT_SECRET
Your spotify client secret
SPOTIFY_SCOPES
List of spotify api scopes white space separated
To try it out just
- clone the repo
- install pipenv if you haven't already
- run
pipenv install
- get your spotify ids
- run
pipenv shell
- export some env variables
export FLASK_APP='spotipyql'
export SPOTIPY_CLIENT_ID='your-client-id'
export SPOTIPY_CLIENT_SECRET='your-secret'
export SPOTIFY_SCOPES='user-read-private user-read-email'
- run the server
flask run
The server will run on http://localhost:5000. The graphql api url will be http://localhost:5000/graphql exposed in POST method. If requested in GET from the browser, an interactive GraphQL ide will show up.
List of api endpoints coverage.
- Get album from id
- Get album tracks
- Get a list of albums
- Get artist from id
- Get artist's albums
- Get artist's top tracks
- Get artist's related artists
- Get a list of artists
- Get a category
- Get a category playlists
- Get a multiple categories
- Get a list of categories
- Get a list of featured playlists
- Get a list of new releases
- Get reccomendations based on seeds
- Check if Current User Follows Artists or Users
- Check if Users Follow a Playlist
- Follow Artists or Users
- Follow a Playlist
- Get User's Followed Artists
- Unfollow Artists or Users
- Unfollow a Playlist
- Check User's Saved Albums
- Check User's Saved Tracks
- Get Current User's Saved Albums
- Get a User's Saved Tracks
- Remove Albums for Current User
- Remove User's Saved Tracks
- Save Albums for Current User
- Save Tracks for User
- Get a User's Top Artists and Tracks
- Get a User's Available Devices
- Get Information About The User's Current Playback
- Get Current User's Recently Played Tracks
- Get the User's Currently Playing Track
- Pause a User's Playback
- Seek To Position In Currently Playing Track
- Set Repeat Mode On User’s Playback
- Set Volume For User's Playback
- Skip User’s Playback To Next Track
- Skip User’s Playback To Previous Track
- Start/Resume a User's Playback
- Toggle Shuffle For User’s Playback
- Transfer a User's Playback
- Add Tracks to a Playlist
- Change a Playlist's Details
- Create a Playlist
- Get a List of Current User's Playlists
- Get a List of a User's Playlists
- Get a Playlist Cover Image
- Get a Playlist
- Get a Playlist's Tracks
- Remove Tracks from a Playlist
- Reorder a Playlist's Tracks
- Replace a Playlist's Tracks
- Upload a Custom Playlist Cover Image
- Generic Search
- Get Audio Analysis for a Track
- Get Audio Features for a Track
- Get Audio Features for Several Tracks
- Get Several Tracks
- Get a Track
- Get Current User's Profile
- Get a User's Profile