spotifywebapipython.models.artist

Spotify Web API Artist object.

Artist(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.

Information about the followers of the artist.

Genres: list[str]

A list of the genres the artist is associated with; if not yet classified, the array is empty.

Example: ["Prog rock","Grunge"]

Images of the artist in various sizes, widest first.

ImageUrl: str

Gets the first image url in the Images list, if images are defined; otherwise, null.

Popularity: int

The popularity of the artist.
The value will be between 0 and 100, with 100 being the most popular.
The artist's popularity is calculated from the popularity of all the artist's tracks.

def ToDictionary(self) -> dict:

Returns a dictionary representation of the class.

def ToString(self) -> str:

Returns a displayable string representation of the class.