velocitatem / HarmoniQ

0 stars 0 forks source link

Refactor Spotify Methods into a separate module #8

Open velocitatem opened 1 year ago

velocitatem commented 1 year ago
  1. Take a look at all the API calls we do in the processing/index.js file
  2. Create a spotify.js module in a directory
  3. Create a method for each method used
129         baseURL: 'https://api.spotify.com/v1/me',
180             baseURL: 'https://api.spotify.com/v1/me/top/tracks',
214         baseURL: 'https://api.spotify.com/v1/audio-features?ids=' + trackIds.join(','),
233             baseURL: 'https://api.spotify.com/v1/artists?ids=' + ids.join(','),

Create a user class: have methods getAbout and get getTracks. Create 2 generic functions getTrackFeatures and getArtistis