oembedpy.consumer module

For consumer request.

class oembedpy.consumer.RequestParameters(url: str, format: str | None = None, max_width: int | None = None, max_height: int | None = None)

Bases: object

Supported query parameters.

format: str | None = None
max_height: int | None = None
max_width: int | None = None
to_dict() Dict[str, str]

Make dict object from properties.

url: str
oembedpy.consumer.fetch_content(url: str, params: RequestParameters) Photo | Video | Link | Rich

Call API and generate content object.

This accept only response that has content-type header explicit as json or xml. * OK: application/json * OK: text/xml * NG: text/plain (even if body is JSON string)