Skip to content

Commit 247ed66

Browse files
authored
Add a from_token Market for some Spotify endpoints
According to https://developer.spotify.com/documentation/general/guides/track-relinking-guide/ the special string `from_token` can be provided instead of providing a manual country code to locate content based on the logged-in user's own country.
1 parent 24863b3 commit 247ed66

File tree

1 file changed

+6
-1
lines changed
  • src/commonMain/kotlin/com.adamratzman.spotify/utils

1 file changed

+6
-1
lines changed

src/commonMain/kotlin/com.adamratzman.spotify/utils/Market.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1844,7 +1844,12 @@ public enum class Market(
18441844
* [Zimbabwe](http://en.wikipedia.org/wiki/Zimbabwe)
18451845
* [Market Code: ZW](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#ZW)
18461846
*/
1847-
ZW("Zimbabwe", "ZWE", 716, Assignment.OFFICIALLY_ASSIGNED);
1847+
ZW("Zimbabwe", "ZWE", 716, Assignment.OFFICIALLY_ASSIGNED),
1848+
1849+
/**
1850+
* A special Market for endpoints to return content available in the user's own market
1851+
*/
1852+
from_token("from_token", "ZZZ", 999, Assignment.NOT_USED);
18481853

18491854
/**
18501855
* Code assignment state in [ISO 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1).

0 commit comments

Comments
 (0)