File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
main/kotlin/com/adamratzman/spotify/endpoints/public
test/kotlin/com/adamratzman/spotify/public Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -10,15 +10,16 @@ import java.util.function.Supplier
1010 */
1111open class PlaylistsAPI (api : SpotifyAPI ) : SpotifyEndpoint(api) {
1212 /* *
13- * Get a list of the playlists owned or followed by a Spotify user.
13+ * Get a list of the playlists owned or followed by a Spotify user. Lookups for non-existant users return empty [PagingObject]s
14+ * (blame Spotify)
1415 *
1516 * @param userId The user’s Spotify user ID.
1617 * @param limit The number of album objects to return. Default: 20. Minimum: 1. Maximum: 50.
1718 * @param offset The index of the first album to return. Default: 0 (i.e., the first album). Use with limit to get the next set of albums.
1819 *
19- * @return [PagingObject] of [SimplePlaylist]s. This does not have the detail of full [Playlist] objects.
20+ * @return [PagingObject] of [SimplePlaylist]s **ONLY if** the user can be found. Otherwise, an empty paging object is returned.
21+ * This does not have the detail of full [Playlist] objects.
2022 *
21- * @throws BadRequestException if the [userId] cannot be found
2223 */
2324 fun getPlaylists (userId : String , limit : Int? = null, offset : Int? = null): SpotifyRestAction <PagingObject <SimplePlaylist >> {
2425 return toAction(Supplier {
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ class SearchAPITest : Spek({
2828 }
2929 describe("search playlist") {
3030 it("valid request") {
31- assert (s.searchPlaylist("run2 ").complete().total > 0)
31+ assert (s.searchPlaylist("test ").complete().total > 0)
3232 }
3333 it("invalid request") {
3434 assertThrows<BadRequestException > { s.searchPlaylist("").complete().total }
You can’t perform that action at this time.
0 commit comments