Spotify
Number of APIs: 18
Overview:
STOP waiting for Discover Weekly
playlist to show up on Monday mornings. Use this collection to generate On-Demand recommendations that you can control. This collections recommends you on-demand new songs and generates a playlist directly from Slack based on choice of your Spotify library.
Authentication:
This collection needs 3 tier Authentication.
1) App Level -
https://developer.spotify.com/documentation/general/guides/app-settings/#register-your-app2) User Level -
https://developer.spotify.com/documentation/general/guides/authorization-guide/#client-credentials-flow3) Scope Level -
https://developer.spotify.com/documentation/general/guides/authorization-guide/#scopesWorkflow:
1) User can generate
Discover Weeklystyle playlist with just a single Slack command. This command has 3 params which are seperated by commas.
a) First is your choice of Seed: This is where you can control your choice of seed.
Example: You can suggest - I want songs recommended base of my
Topsongs or
Likedsongs or perticular
Playlist.
b) Second is name of your new playlist where recommended songs will be stored.
c) Recommendation type: Here you can control what is the method by which recommendations are generated.
Example: There are two types of recommendation - Exact or Range.
Example: -
First param should be - choice of seed,Second - Playlist Name,Third - Recommendation type.- Command will look like this: Top,My New Playlist,Exact
1) Enter seed of your choice, new playlist name and recomendation type in slack command.
2) Based on your choices/inputs this collection will decide next steps-
- Just for purpose of understanding I will take the slack command as: Top,My Cool Playlist,Exact.
- Here, Top
means - your most listened songs over last month will be selected as seed. My Cool Playlist
is - name of your newly created playlist. Exact
means - this collection will recommend you songs that are exactly similar to the songs of your seed choice (In this case your Top
songs).
3) GET all of your TOP song ID's
4) GET Raw audio property from each song
5) GET recommendations based on each songs associated Raw audio property
6) POST Create a Playlist
7) POST earlier recommended songs to newly created playlist
8) GET Playlist URL
9) POST Newly created playlist will be posted to Slack channel.
10) Enjoy!
-
Get Range Recommendations GET https://api.spotify.com/v1/recommendations/?max_danceability={{getmaxDance}}&min_danceability={{getminDance}}&max_energy={{getmaxEnergy}}&min_energy={{getminEnergy}}&max_valence={{getmaxValence}}&min_valence={{getminValence}}&max_tempo={{getmaxTempo}}&min_tempo={{getminTempo}}&max_acoustic={{getmaxAcoustic}}&min_acoustic={{getminAcoustic}}&max_key={{getmaxKey}}&min_key={{getminKey}}&max_liveness={{getmaxLivenesse}}&min_liveness={{getminLiveness}}&max_loudness={{getmaxLoudness}}&min_loudness={{getminLoudness}}&max_speech={{getmaxSpeech}}&min_speech={{getminSpeech}}&max_instrumental={{getmaxInstrumental}}&min_instrumental={{getminInstrumental}}&limit={{rangenumber}}&seed_tracks={{rangeSongObject}}
-
Add TOP Range Songs To Playlists POST https://api.spotify.com/v1/playlists/{{playlist_id1}}/tracks?uris={{rangeTopRecArr}}
-
Get Playlist Url GET https://api.spotify.com/v1/users/{{user_id}}/playlists
-
Get Users Top Tracks GET https://api.spotify.com/v1/me/top/tracks?limit=50
-
Extract Range Fetures From Tracks GET https://api.spotify.com/v1/audio-features?ids={{ids_str}}
-
Extract Range Fetures From TOP Tracks GET https://api.spotify.com/v1/audio-features?ids={{topIds}}
-
Get Recommendations from TOP Tracks GET https://api.spotify.com/v1/recommendations/?seed_tracks={{getid}}&target_danceability={{getRecDance}}&target_energy={{getRecEnergy}}&target_valence={{getRecValence}}&target_tempo={{getRecTempo}}&target_acoustic={{getRecAcoustic}}&target_key={{getRecKey}}&target_liveness={{getRecLiveness}}&target_loudness={{getRecLoudness}}&target_speech={{getRecSpeech}}&target_instrumental={{getRecInstrumental}}&limit={{number}}
-
Get Range TOP Recommendations GET https://api.spotify.com/v1/recommendations/?max_danceability={{getmaxDance}}&min_danceability={{getminDance}}&max_energy={{getmaxEnergy}}&min_energy={{getminEnergy}}&max_valence={{getmaxValence}}&min_valence={{getminValence}}&max_tempo={{getmaxTempo}}&min_tempo={{getminTempo}}&max_acoustic={{getmaxAcoustic}}&min_acoustic={{getminAcoustic}}&max_key={{getmaxKey}}&min_key={{getminKey}}&max_liveness={{getmaxLivenesse}}&min_liveness={{getminLiveness}}&max_loudness={{getmaxLoudness}}&min_loudness={{getminLoudness}}&max_speech={{getmaxSpeech}}&min_speech={{getminSpeech}}&max_instrumental={{getmaxInstrumental}}&min_instrumental={{getminInstrumental}}&limit={{rangenumber}}&seed_tracks={{rangeTopSongObject}}
-
Create New Playlist TOP POST https://api.spotify.com/v1/users/{{user_id}}/playlists