getCategory

suspend fun getCategory(categoryId: String, market: Market? = null, locale: Locale? = null): SpotifyCategory(source)

Get a single category used to tag items in Spotify (on, for example, the Spotify player’s “Browse” tab).

Api Reference

Parameters

locale

The desired language, consisting of a lowercase ISO 639-1 language code and an uppercase ISO 3166-1 alpha-2 country code, joined by an underscore. For example: ES_MX, meaning “Spanish (Mexico)”. Provide this parameter if you want the results returned in a particular language (where available). Note that, if locale is not supplied, or if the specified language is not available, all strings will be returned in the Spotify default language (American English. The locale parameter, combined with the country parameter, may give odd results if not carefully matched. For example country=SE&locale=DE_DE will return a list of categories relevant to Sweden but as German language strings.

market

Provide this parameter if you want the list of returned items to be relevant to a particular country. If omitted, the returned items will be relevant to all countries.

Throws

if categoryId is not found or locale does not exist on Spotify