Skip to content

Instantly share code, notes, and snippets.

@mattmills49
Created December 7, 2016 18:54
Show Gist options
  • Save mattmills49/00c70fa4a8232afb2495cea8e1e11d86 to your computer and use it in GitHub Desktop.
Save mattmills49/00c70fa4a8232afb2495cea8e1e11d86 to your computer and use it in GitHub Desktop.
library(devtools)
install_github("tiagomendesdantas/Rspotify")
library(Rspotify)
# https://github.com/tiagomendesdantas/Rspotify
keys <- spotifyOAuth(app_id = "Discover Mills", client_id = "1bf895600e3648b6bc3509f5df59c505", client_secret = "a2981db70b424244b14c2ff18e7b32e4")
user <- getUser("mattmills49", token = keys)
test <- httr::GET(paste0("https://api.spotify.com/v1/users/","mattmills49"), httr::config(token = keys))
json1 <- httr::content(test)
test <- getPlaylist(name = "mattmills49", offset = 0, token = keys)
test <- getPlaylistSongs(ownerid = "spotifydiscover", playlistid = "1iuuVnHOYr9sm4EqpFS1xr", token = keys)
ownerid = "spotifydiscover"
playlistid = "1iuuVnHOYr9sm4EqpFS1xr"
token = keys
req<-httr::GET(paste0("https://api.spotify.com/v1/users/",ownerid,"/playlists/",playlistid,"/tracks?&limit=100&offset=",offset),httr::config(token = token))
json1<-httr::content(req)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment