rinukkusu / spotify-dart

A dart library for interfacing with the Spotify API.
BSD 3-Clause "New" or "Revised" License
207 stars 93 forks source link

User library & follow endpoint implementations #118

Closed KRTirtho closed 2 years ago

KRTirtho commented 2 years ago

Added support for following endpoints

Endpoints Class Method HTTP method
/v1/me/following/contains Me isFollowing GET
/v1/me/following Me follow PUT
/v1/me/following Me unfollow DELETE
/v1/me/albums Me savedAlbums GET
/v1/me/albums Me saveAlbums PUT
/v1/me/albums Me removeAlbums DELETE
/v1/me/albums/contains Me isSavedAlbums GET
/v1/playlists/{playlist-id}/followers/contains Playlists followedBy GET
/v1/me/tracks TracksMe remove, removeOne DELETE

Other smaller tweaks/bugfixes:

Note: The FollowingType.user wasn't tested for Me.follow/Me.unfollow methods

Awesome library dude. Without spotify-dart, spotube wouldn't be possible. Keep up your awesome work❣️💪🏻

KRTirtho commented 2 years ago

@rinukkusu can I get some update/feedback/review regarding this PR if possible?

hayribakici commented 2 years ago

@KRTirtho it would be nice, if you mark the implemented endpoints in the wiki.

KRTirtho commented 2 years ago

Can I do that? I don't think I've permissions to edit wiki of a repo which isn't owned by me. But these ones should be checked

Follow API

Library API

hayribakici commented 2 years ago

Cool, once this is merged, I'll check them for you.

KRTirtho commented 2 years ago

I also added a Bugfix causing onCredentialsRefreshed not getting called when its supposed to. (https://github.com/rinukkusu/spotify-dart/issues/123)

Reasons & explanations: https://github.com/rinukkusu/spotify-dart/issues/123#issuecomment-1138231777

rinukkusu commented 2 years ago

Hmmm, I also saw that you added some stuff, that older PRs also wanted to add, like the removeOne on TracksMe. My fault for not noticing that and having not a lot of time to process all of this, but generally not that great.