spotifywebapipython.models.category

@export
class Category:

Spotify Web API Category object.

Category(root: dict = None)

Initializes a new instance of the class.

Arguments:
  • root (dict): Spotify Web API JSON response in dictionary format, used to load object attributes; otherwise, None to not load attributes.
Href: str

A link to the Web API endpoint returning full details of the category.

Id: str

The Spotify category ID of the category.
Some ID's are read-able text, while most are a unique id format.

Example: toplists
Example: 0JQ5DAqbMKFDXXwE9BDJAr (e.g. unique id for Rock)

The category icon in various sizes, widest first.

ImageUrl: str

Gets the first icon url in the Icons list, if images are defined; otherwise, null.

Name: str

The name of the category.

Uri: str

A simulated Spotify URI value for the category.

This is a helper property - no value with this name is returned from the Spotify Web API.

def ToDictionary(self) -> dict:

Returns a dictionary representation of the class.

def ToString(self) -> str:

Returns a displayable string representation of the class.