spotifywebapipython.models.imageobject
Spotify Web API Image object.
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.
The source URL of the image.
Example: https://i.scdn.co/image/ab67616d00001e02ff9ca10b55ce82ae553c8228
Returns the highest resolution order image from a list of ImageObject items.
Arguments:
- images (list[ImageObject]): The cover art for the media in various sizes, usually widest first.
- desiredWidth (int): A desired resolution width to return (if found); if not found, then the highest resolution is returned.
Returns:
The highest resolution order image from the list of
images.
The Spotify Web API normally returns a list of ImageObject items with the
highest resolution image as the first list item; however, the GetShowFavorites
returns them in the reverse order.
Returns the highest resolution order image width from a list of ImageObject items.
Arguments:
- images (list[ImageObject]): The cover art for the media in various sizes, usually widest first.
- desiredWidth (int): A desired resolution width to return (if found); if not found, then the highest resolution is returned.
Returns:
The highest resolution order image width from the list of
images.
The Spotify Web API normally returns a list of ImageObject items with the
highest resolution image as the first list item; however, the GetShowFavorites
returns them in the reverse order.