Skip to content

Documentation for Dotify¤

The base class for every Spotify Web API entity.

InvalidURL ¤

An exception thrown if the provided URL does not correspond to a valid Spotify URL.

NotFound ¤

An exception thrown if an operation fails to retrieve the necessary information.

UnexpectedError ¤

An exception indicating an unexpected error.

http_safeguard(method) classmethod ¤

Convert HTTP exceptions thrown by the decorated method to Model level exceptions.

Parameters:

Name Type Description Default
method Callable[..., Any]

the method being decorated

required

Returns:

Type Description
Callable[..., Any]

Callable[..., Any]: the decorated method

search(query, limit=1) classmethod ¤

Perform a Spotify search given a query.

Parameters:

Name Type Description Default
query ~AnyStr

the search query

required
limit Optional[int]

the number of items to return. Defaults to 1.

1

Exceptions:

Type Description
NotFound

In case no results corresponding to the provided query are found

Returns:

Type Description
Iterator[Model]

Iterator["Model"]: the Model instances corresponding to the query

validate_url(method) classmethod ¤

Validate the URL supplied to the decorated method.

Parameters:

Name Type Description Default
method Callable[..., Any]

the method being decorated

required

Returns:

Type Description
Callable[..., Any]

Callable[..., Any]: the decorated method

view_name() classmethod ¤

Return the name of the Spotify view corresponding to the Model.

Returns:

Type Description
str

str: the name of the Spotify view