I’ve created an R wrapper for Spotify’s API. It is currently still in testing, development. It was developed on Ubuntu, but I’ve had successful tests on Windows 7 too.
It currently launches Firefox through RSelenium for the full authorization code flow. Chrome and IE will eventually be supported, but are not yet. All data from endpoints is converted to lists. If you just want access to the public endpoints, this is not necessary.
Some of the objects (artists, albums, playlists) have helper functions to convert to data.frame, but not all yet, and this is the next major development plan.
Installation
Requires Firefox for initial authentication for any of the endpoints that operate on user data.
Authentication
For any usage below, you’ll need to have proper credentials from Spotify. Sign up for an account here and create an app.
Get information, identifiers, images, etc. for artists, albums, songs or playlists that match the query text.
No authentication is required for this function.
Get Information About Artist
Search for an artist by Spotify ID and get information about band, genre, images, etc.
No authentication is required for this function.
Access Library information
There are endpoints to access and modify data in user’s library
Followers
Get information about what artists a user is following, add/remove followers from user, check if a user is following someone