Skip to content

Commit

Permalink
Merge pull request #253 from kingosticks/fix/featured-playlists-endpoint
Browse files Browse the repository at this point in the history
Correct API endpoint for browsing featured playlists.
  • Loading branch information
jodal authored Jan 10, 2020
2 parents be25899 + dfb9785 commit 3454085
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
Changelog
*********

v4.0.1 (UNRELEASED)
===================

- Fix API endpoint for browsing featured playlists. (#252, PR: #253)


v4.0.0 (2019-12-22)
===================

Expand All @@ -11,7 +17,7 @@ v4.0.0 (2019-12-22)

- Use the Spotify Web API to support browsing Your Music. (#16, PR: #238)

- Use the Spotify Web API to support browsing features playlists. (#240, PR: #247)
- Use the Spotify Web API to support browsing featured playlists. (#240, PR: #247)

- Use the Spotify web API to fetch playlist images. (#100, PR: #243)

Expand Down
2 changes: 1 addition & 1 deletion mopidy_spotify/browse.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def _browse_playlists(web_client, variant):

if variant == "featured":
items = (
web_client.get_one(f"browse/{variant}")
web_client.get_one(f"browse/featured-playlists")
.get("playlists", {})
.get("items", [])
)
Expand Down
2 changes: 2 additions & 0 deletions tests/test_browse.py
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,8 @@ def test_browse_playlists_featured(

results = provider.browse("spotify:playlists:featured")

web_client_mock.get_one.assert_called_once_with("browse/featured-playlists")

assert len(results) == 1
assert results[0].name == "Foo"
assert results[0].uri == "spotify:user:alice:playlist:foo"

0 comments on commit 3454085

Please sign in to comment.