VSLCatena / narrowcasting-Spotify

Basic examples to authenticate and fetch data using the Spotify Web API
Apache License 2.0
0 stars 0 forks source link

review and cleanup code #1

Open Kipjr opened 4 years ago

Kipjr commented 4 years ago

starting from here: https://github.com/VSLCatena/narrowcasting-Spotify/blob/320b6f919dfe135d7b5447e60bcd1538451a413a/authorization_code/public/index.html#L221

Issues: refreshing templates every second while keeping some data static for length of track. What to do when track pauses or Spotify is not running

Goal:

  1. authorize app
  2. Ajax call (current playing, recently played, me-data) every second
  3. fill data in template (except current playing static data i.e. title/img/album/recent playing)
  4. every 60 seconds refresh token
  5. every (near) end of track and begin of track refresh current playing and recent played.
Kipjr commented 4 years ago

https://github.com/thelinmichael/spotify-web-api-node could help