Skip to content

Conversation

@kingosticks
Copy link
Member

For logged in user 'foo', Web API endpoint "me/playlists"
returns the same as "users/foo/playlists" (including headers).
When we use the former, the "next" links in the response always use
the latter. This leaves us with a mix of URL formats in our cache
and will make identifying/invalidating these entries harder.

This change ensures all the URLs look the same. No behaviour has
changed.

This will make cache invalidation in #287 a little simpler and makes sense to do anyway.

For logged in user 'foo',  Web API endpoint "me/playlists"
returns the same as "users/foo/playlists" (including headers).
When we use the former, the "next" links in the response always use
the latter. This leaves us with a mix of URL formats in our cache
and will make identifying/invalidating these entries harder.

This change ensures all the URLs look the same. No behaviour has
changed.
@codecov
Copy link

codecov bot commented Jan 7, 2021

Codecov Report

Merging #299 (5119e91) into master (f4317b1) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #299   +/-   ##
=======================================
  Coverage   96.68%   96.68%           
=======================================
  Files          13       13           
  Lines        1207     1207           
=======================================
  Hits         1167     1167           
  Misses         40       40           
Impacted Files Coverage Δ
mopidy_spotify/web.py 96.08% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f4317b1...5119e91. Read the comment docs.

@kingosticks kingosticks self-assigned this Jan 8, 2021
@kingosticks kingosticks added the A-webapi Area: Spotify Web API label Jan 8, 2021
@kingosticks kingosticks merged commit 66d40fc into mopidy:master Jan 8, 2021
@kingosticks kingosticks deleted the alt-get-user-playlist-url branch January 27, 2022 10:52
kingosticks added a commit to kingosticks/mopidy-spotify that referenced this pull request Dec 20, 2023
For logged in user 'foo',  Web API endpoint "me/playlists"
returns the same as "users/foo/playlists" (including headers).
When we use the former, the "next" links in the response always use
the latter. This leaves us with a mix of URL formats in our cache
and will make identifying/invalidating these entries harder.

This change ensures all the URLs look the same. No behaviour has
changed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-webapi Area: Spotify Web API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant