Spotify

Added four action on Social controller.

  • spotify ($username,$type="getPlaylists")
  • spotifyGenerateFeed($username,$playlist)
  • spotifyCheckPermissions($username,$playlist,$token)
  • SpotifyGetToken()


spotify

User entry point.
Return a feed of user's playlists, or a feed of feed with playlist's tracks

  • $username
    • Spotify username
  • $type
    • getPlaylists
      • Return a feed of type links, with
        • Content = outside
        • link = playlist's uri
    • getTracks
      • Return a feed of feed of type links
      • The external feed is a list of user's playlist from which we are allowed to recover the tracks 
        • spotifyCheckPermissions is called from this scope
      • The internal feed is a feed of links similar to getPlaylist
        • Content = outside
        • link = track's uri
        • The internal feed is generated by spotifyGenerateFeed, 

spotifyGenerateFeed

  • $username
    • Spotify username
  • $playlist
    • Spotify playlist's id
  • Return playlist's tracks as a feed of links
    • Content = outside
    • Link = track's uri

 

spotifyCheckPermissions

For internal use, user will not see this.

  • $username
    • Spotify username
  • $playlist
    • Spotify playlist's id
  • $token
    • Bearer Authentication token, retrieved with SpotifyGetToken

Return a bool.

  • true - query for tracks on playlist is allowed
  • false - query for tracks on playlist is not allowed

 

SpotifyGetToken

Make a POST call to retrieve an authentication token.