{"repo":"PaystackHQ/paystack-music-api","free":true,"listed":false,"github":"https://github.com/PaystackHQ/paystack-music-api","clone":"git clone https://github.com/PaystackHQ/paystack-music-api.git","description":"The bot and API that powers Paystack Music.","language":"JavaScript","stars":77,"topics":["paystack-music","spotify","slack","bot","playlist"],"license":"MIT","category":"chat-messaging","readme_excerpt":"Paystack Music Slack Bot The Paystack Music Slack Bot is an integration built by our team at Paystack. It's responsible for all the wonderful playlists we're now sharing with the world every month at Paystack Music How it works At Paystack, when we find music we like, we share to a #fun-music channel on Slack for others to enjoy. At the end of each month, our music bot automatically fetches all the Spotify tracks, creates a mixtape with custom cover art, and publishes it online. We've cobbled together a couple of APIs to make this work. 1. First, we use the Slack API to fetch all the messages shared in the designated channel for the month. The bot keeps a tally of how many different people shared songs that month. 2. The bot then filters the messages for all the ones that contain links to Spotify tracks, and creates a Spotify playlist with all of them. 3. For the album art, we fetch the cover of the newly created playlist from Spotify (it's usually a combination of the first 4 songs added to the playlist). We then grab the dominant color from the fetched album art, and use it as the background of a new image that follows the playlist template. This gets set as the new playlist cover. 4. Next up, the bot fetches the track info and audio features for all the tracks on the playlist, and saves the new playlist to the DB Setup 1. Clone the repo. 2. Duplicate the .env.example file and rename it .env . You'll need to set up apps on both Slack and Spotify for the next steps. Slack - ","default_branch":null,"files":null,"tree":[],"storefront":"/r/PaystackHQ","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/PaystackHQ/paystack-music-api/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}