   :uris a list of spotify track uris.
 
   Example: (replace-a-playlists-tracks {:user_id \"elkalel\" :playlist_id \"6IIjEBw2BrRXbrSLerA7A6\" :uris \"spotify:track:4iV5W9uYEdYUVa79Axb7Rh,
-  spotify:track:1301WleyT98MSxVHPZCA6M\"} \"BQBw-JtC..._7GvA\")")
-
-(def-spotify-api-call change-a-playlists-details client/put (str spotify-api-url "users/user_id/playlists/playlist_id")
+  spotify:track:1301WleyT98MSxVHPZCA6M\"} \"BQBw-JtC..._7GvA\")" (spotify-api-call client/put (str spotify-api-url "users/user_id/playlists/playlist_id/tracks")))
+
+(def change-a-playlists-details 
   " Takes two arguments, a map m with query parameters and an optional oauth-token t.
   Compulsory key in m are :user_id and :playlist_id, optional keys are :name and :public.
   :user_id is the users spotify id.

  :limit is the maxium number of tracks to return, default is 20.
  :offset is the index of the first track to return, default is 0.

  Example: (get-a-categorys-playlist {:category_id \"dinner\" :country \"SE\" :locale \"sv_SE\" :limit 50 :offset 50} \"BQBw-JtC..._7GvA\") ")

;Follow
(def-spotify-api-call get-users-followed-artists client/get (str spotify-api-url "me/following")
  " Takes two arguments, a map m with query parameters and an optional oauth-token t.
  Compulsory key in m is :type, optional keys are :limit and :after.
  :type has to be set to \"artist\".
  :limit is the maxium number of items to return, default is 20.
  :after the last artist id retrieved from a previous request. Use this to get next set of artists.

  Example: (get-users-followed-artists {:type \"artist\" :limit 50 :offset 50} \"BQBw-JtC..._7GvA\") ")

(def-spotify-api-call follow-artists-or-users client/put (str spotify-api-url "me/following")
  " Takes two arguments, a map m with query parameters and an optional oauth-token t.
  Compulsory key in m is :type and :ids.
  :type has to be set to \"artist\" or \"user\".
  :ids has to be a comma separated list of users or artists. 

  Example: (follow-artists-or-users {:type \"artist\" :ids \"2933wDUojoQmvqSdTAE5NB,1AUCkAIfT6Ig8lOegDGK3Z\" } \"BQBw-JtC..._7GvA\")")

(def-spotify-api-call unfollow-artists-or-users client/delete (str spotify-api-url "me/following")
  " Takes two arguments, a map m with query parameters and an optional oauth-token t.
  Compulsory key in m is :type and :ids.
  :type has to be set to \"artist\" or \"user\".
  :ids has to be a comma separated list of users or artists. 

  Example: (unfollow-artists-or-users {:type \"artist\" :ids \"0uCCBpmg6MrPb1KY2msceF,1WsMRWV5KEC2AxpYkeb2Cf\" } \"BQBw-JtC..._7GvA\")")

(def-spotify-api-call user-following-artists-or-users? client/get (str spotify-api-url "me/following/contains")
  " Takes two arguments, a map m with query parameters and an optional oauth-token t.
  Compulsory key in m is :type and :ids.
  :type has to be set to \"artist\" or \"user\".
  :ids has to be a comma separated list of users or artists. 

  Example: (user-following-artists-or-users? {:type \"artist\" :ids \"3H6Js0rhywEhHda3UwuhGW,4r8bVMyYyGyARs9OfBvyj4\" } \"BQBw-JtC..._7GvA\")")

(def-spotify-api-call follow-a-playlist client/put (str spotify-api-url "users/owner_id/playlists/playlist_id/followers")
  " Takes two arguments, a map m with query parameters and an optional oauth-token t.
  Compulsory keys in m are :owner_id and :playlist_id.
  :owner_id has to be the spotify user id of the user owning the playlist.
  :playlist_id the spotify playlist id. 

  Example: (follow-a-playlist {:owner_id \"sondre_lerche\" :playlist_id \"7q8QuE0YbAgbvzR0NJVwV8\" } \"BQBw-JtC..._7GvA\")")

(def-spotify-api-call unfollow-a-playlist client/delete (str spotify-api-url "users/owner_id/playlists/playlist_id/followers")
  " Takes two arguments, a map m with query parameters and an optional oauth-token t.
  Compulsory keys in m are :owner_id and :playlist_id.
  :owner_id has to be the spotify user id of the user owning the playlist.
  :playlist_id the spotify playlist id. 

  Example: (unfollow-a-playlist {:owner_id \"ulyssestone\" :playlist_id \"3WG4abOpUpocexRakPioAg\" } \"BQBw-JtC..._7GvA\")")

(def-spotify-api-call user-following-playlist? client/get (str spotify-api-url "users/owner_id/playlists/playlist_id/followers/contains")
  " Takes two arguments, a map m with query parameters and an optional oauth-token t.
  Compulsory keys in m are :owner_id and :playlist_id.
  :owner_id has to be the spotify user id of the user owning the playlist.
  :playlist_id the spotify playlist id. 

  Example: (user-following-playlist? {:owner_id \"lecowboy\" :playlist_id \"2PftXV7dgcxFjMWe75GuSG\" } \"BQBw-JtC..._7GvA\")")

;Library
(def-spotify-api-call save-tracks-for-user client/put (str spotify-api-url "me/tracks")
  " Takes two arguments, a map m with query parameters and an optional oauth-token t.
  Compulsory key in m is :ids.
  :ids has to be a comma separated list of spotify track ids.

  Example: (save-tracks-for-user {:ids \"3BSpuy2yHhoEazfXVU7WGq,0BcaWLANkstu2v9kghrCAj\"} \"BQBw-JtC..._7GvA\")")

(def-spotify-api-call get-users-saved-tracks client/get (str spotify-api-url "me/tracks")
  " Takes two arguments, a map m with query parameters and an optional oauth-token t.
  There are no compulsory keys in m, optional keys are :market, :limit and :offset.
  :market is an ISO 3166-1 alpha-2 country code.
  :limit is the maxium number of tracks to return, default is 20.
  :offset is the index of the first track to return, default is 0.

  Example: (get-users-saved-tracks {:market \"SE\" :limit 50 :offset 50}} \"BQBw-JtC..._7GvA\")")

(def-spotify-api-call remove-users-saved-tracks client/delete (str spotify-api-url "me/tracks")
  " Takes two arguments, a map m with query parameters and an optional oauth-token t.
  Compulsory key in m is :ids.
  :ids has to be a comma separated list of spotify track ids.

  Example: (remove-users-saved-tracks {:ids \"1RyZgkIghj1eL2U1zlYOoE,6NwbeybX6TDtXlpXvnUOZC\"} \"BQBw-JtC..._7GvA\")")

;TODO - better name for this function
(def-spotify-api-call check-users-saved-tracks client/get (str spotify-api-url "me/tracks/contains")
  " Takes two arguments, a map m with query parameters and an optional oauth-token t.
  Compulsory key in m is :ids.
  :ids has to be a comma separated list of spotify track ids.

  Example: (check-users-saved-tracks {:ids \"28nlyt9KhVZQ0lGQsg8Yht,09ZGF6mwJVzw5jxqbtT53E\"} \"BQBw-JtC..._7GvA\")")

;Playlists
(def-spotify-api-call get-a-list-of-a-users-playlists client/get (str spotify-api-url "users/user_id/playlists")
  " Takes two arguments, a map m with query parameters and an optional oauth-token t.
  Compulsory key in  m is :user_id, optional keys are :limit and :offset.
  :user_id is the users spotify id.
  :limit is the maxium number of tracks to return, default is 20.
  :offset is the index of the first track to return, default is 0.

  Example: (get-a-list-of-a-users-playlists {:user_id \"elkalel\" :limit 50 :offset 50} \"BQBw-JtC..._7GvA\")")

;TODO - Change this fields string to be a map?
(def-spotify-api-call get-a-playlist client/get (str spotify-api-url "users/owner_id/playlists/playlist_id")
  " Takes two arguments, a map m with query parameters and an optional oauth-token t.
  Compulsory keys in  m are :user_id and :playlist_id, optional keys are :fields, :market, :limit and :offset.
  :user_id is the users spotify id.

  :name is the name for the new playlist.
  :public is set to true if a playlist should be public and false if not.

  Example: (change-a-playlists-details {:user_id \"elkalel\" :playlist_id \"6IIjEBw2BrRXbrSLerA7A6\" :name \"Fantastic playlist\" :public true} \"BQBw-JtC..._7GvA\")" (spotify-api-call client/put (str spotify-api-url "users/user_id/playlists/playlist_id")))

;Profiles
(def get-a-users-profile 
  " Takes two arguments, a map m with query parameters and an optional oauth-token t.
  Compulsory key in m is :user_id.
  :user_id has to be a spotify user id.

  Example: (get-a-users-profile {:user_id \"elkalel\"} \"BQBw-JtC..._7GvA\")" (spotify-api-call client/get (str spotify-api-url "users/user_id")))

;TODO - what happens when map is not present or nil?
(def get-current-users-profile  
  " Takes an oauth-token t.

  Example: (get-current-users-profile {} \"BQBw-JtC..._7GvA\")" (spotify-api-call client/get (str spotify-api-url "me"))) 

;Search
(def search 
  " Takes two arguments, a map m with query parameters and an optional oauth-token t.
  Compulsory keys in m are :q and :type, optional keys are :market, :limit and :offset.
  :q is the search string.
