Skip to content

Shared Models

Copyright #

Copyright statements.

text #

text: str

The copyright text for the content.

type #

The type of copyright.

ExternalIDs #

External IDs.

isrc #

isrc: str | None = None

ean #

ean: str | None = None

upc #

upc: str | None = None

ExternalURLs #

External URLs.

spotify #

spotify: str | None

The Spotify URL for the object.

Followers #

Information about followers.

href #

href: str | None

This will always be set to None, as the Spotify Web API does not support it at the moment.

total #

total: int

The total number of followers.

Image #

An image.

url #

url: str

The source URL of the image.

height #

height: int | None

The image height in pixels.

width #

width: int | None

The image width in pixels.

Paginator #

A basic paginator.

href #

href: str

A link to the Web API endpoint returning the full result of the request.

limit #

limit: int

The maximum number of items in the response.

next #

next: str | None

URL to the next page of items.

total #

total: int

The total number of items available to return.

items #

items: list[T]

The requested content.

lazy_iter_items #

lazy_iter_items() -> AsyncGenerator[T]

Iterate over all the items of the paginator, starting from the currently fetched items.

Returns:

Example
async for item in paginator.lazy_iter_items():
    print(item.name)

offset #

offset: int

The offset of the items returned.

previous #

previous: str | None

URL to the previous page of items.

get_next #

get_next() -> Paginator[T] | None

Get the next page of items in the paginator.

Returns:

get_previous #

get_previous() -> Paginator[T] | None

Get the previous page of items in the paginator.

Returns:

CursorPaginator #

A paginator using cursors to paginate the content.

href #

href: str

A link to the Web API endpoint returning the full result of the request.

limit #

limit: int

The maximum number of items in the response.

next #

next: str | None

URL to the next page of items.

items #

items: list[T]

The requested content.

lazy_iter_items #

lazy_iter_items() -> AsyncGenerator[T]

Iterate over all the items of the paginator, starting from the currently fetched items.

Returns:

Example
async for item in paginator.lazy_iter_items():
    print(item.name)

cursors #

cursors: Cursors | None

The cursors used to find the next set of items.

total #

total: int | None = None

The total number of items available to return.

get_next #

get_next() -> CursorPaginator[T] | None

Get the next page of items in the paginator.

Returns:

Cursors #

Cursors used to find the next/previous set of items in a paginator.

after #

after: str | None = None

The cursor to use as key to find the next page of items.

before #

before: str | None = None

The cursor to use as key to find the previous page of items.

Restrictions #

Content restrictions.

reason #

reason: Reason

The reason for the restriction.

ResumePoint #

Resume point information.

fully_played #

fully_played: bool

Whether or not the episode has been fully played by the user.

resume_position #

resume_position: timedelta = Field(alias='resume_position_ms')

The user's most recent position in the episode.