Add category info (#561)

* Add category info

* Add slash

* Add test
This commit is contained in:
Bram Kragten authored and GitHub committed 2020-08-27 20:49:56 +01:00
1 parent 651080e3da
commit 5e9f97df8e
2 files changed
+23 -2

No files matched your search

+19 -2
View File
@@ -1453,8 +1453,25 @@ class Spotify(object):
"browse/new-releases", country=country, limit=limit, offset=offset
)
def category(self, category_id, country=None, locale=None):
""" Get info about a category
Parameters:
- category_id - The Spotify category ID for the category.
- country - An ISO 3166-1 alpha-2 country code.
- locale - The desired language, consisting of an ISO 639
language code and an ISO 3166-1 alpha-2 country code, joined
by an underscore.
"""
return self._get(
"browse/categories/" + category_id,
country=country,
locale=locale,
)
def categories(self, country=None, locale=None, limit=20, offset=0):
""" Get a list of new album releases featured in Spotify
""" Get a list of categories
Parameters:
- country - An ISO 3166-1 alpha-2 country code.
@@ -1480,7 +1497,7 @@ class Spotify(object):
def category_playlists(
self, category_id=None, country=None, limit=20, offset=0
):
""" Get a list of new album releases featured in Spotify
""" Get a list of playlists for a specific Spotify category
Parameters:
- category_id - The Spotify category ID for the category.