getCategories

abstract suspend fun getCategories(locale: String = "en_US", limit: Int = 20, offset: Int = 0): SpotifyApiResponse<Categories, ErrorBody>(source)

Get categories API returns all available categories. This is a paginated API.

offset is the page you are requesting for. Initially it will be 0.

You will have to increment it for subsequent pages.

You can know if there are more pages from Categories.isNext.

See the Spotify Doc.

Return

Categories when success and ErrorBody when error.

Parameters

locale
limit
offset