Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added saved_albums methods on User for (undocumented) me/albums endpoints #70

Merged
merged 1 commit into from
Nov 22, 2015

Conversation

tony-pizza
Copy link
Contributor

I noticed that the Spotify API has library endpoints for albums, and so I added support for them. They're basically identical to the me/tracks library endpoints, except you know, for albums: me/albums.

One big benefit here is when you save albums to your library via me/albums those albums show up in the "Saved Albums Only" filter, which isn't possible when using me/tracks.

The problem is... the album endpoints are undocumented. I only found them because I was poking around. So I totally understand if this doesn't get merged. Might be against Spotify Terms to use undocumented pieces of their API. Still, figured I'd PR, if only to say hey this exists. And if they ever go public with the album endpoints, we'll be ready...

# @example
# albums = user.saved_albums
# albums.size #=> 20
# albums.first.name #=> "Do I Wanna Know?"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Do I Wanna Know?" was for the track so you can replace this for any album name you like :)

@guilhermesad
Copy link
Owner

This looks great, thanks for that =) I don't see in Spotify Terms anything saying undocumented endpoints can't be accessed, so this should be good to go. Can you just check some minor comments I made in the code and squash them into your commit? Thanks again for finding this out!

@tony-pizza
Copy link
Contributor Author

Awesome! I made those changes, and added a bit to the README.

@guilhermesad
Copy link
Owner

That's awesome 👍 thanks, shipping it

guilhermesad added a commit that referenced this pull request Nov 22, 2015
Added saved_albums methods on User for (undocumented) me/albums endpoints
@guilhermesad guilhermesad merged commit 77cfd51 into guilhermesad:master Nov 22, 2015
@tony-pizza
Copy link
Contributor Author

What do ya know... these endpoints are now documented: https://developer.spotify.com/web-api/library-endpoints/

@guilhermesad
Copy link
Owner

lol wow, maybe they noticed the amount of traffic after this was merged xD

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants