oembedpy.types module

Register content data structure.

All typed classes are based from oEmbed specs. Please see https://oembed.com/

class oembedpy.types.CachedContent(expired, content)

Bases: NamedTuple

content: Photo | Video | Link | Rich | HtmlOnly

Alias for field number 1

expired: float

Alias for field number 0

oembedpy.types.Content

Collection of oEmbed content types.

alias of Photo | Video | Link | Rich | HtmlOnly

class oembedpy.types.HtmlOnly(_extra: Dict[str, Any], html: str, title: str | None = None, author_name: str | None = None, author_url: str | None = None, provider_name: str | None = None, provider_url: str | None = None, cache_age: int | None = None, thumbnail_url: str | None = None, thumbnail_width: int | None = None, thumbnail_height: int | None = None)

Bases: _Optionals, _HtmlOnly

Fallback type for invalid scheme.

Bases: _Optionals, _Required

oEmbed content for generic object.

class oembedpy.types.Photo(_extra: Dict[str, Any], type: str, version: str, url: str, width: int, height: int, title: str | None = None, author_name: str | None = None, author_url: str | None = None, provider_name: str | None = None, provider_url: str | None = None, cache_age: int | None = None, thumbnail_url: str | None = None, thumbnail_width: int | None = None, thumbnail_height: int | None = None)

Bases: _Optionals, _Photo, _Required

oEmbed content for photo object.

class oembedpy.types.Rich(_extra: Dict[str, Any], type: str, version: str, html: str, width: int, height: int, title: str | None = None, author_name: str | None = None, author_url: str | None = None, provider_name: str | None = None, provider_url: str | None = None, cache_age: int | None = None, thumbnail_url: str | None = None, thumbnail_width: int | None = None, thumbnail_height: int | None = None)

Bases: _Optionals, _Rich, _Required

oEmbed content for rich HTML object.

class oembedpy.types.Video(_extra: Dict[str, Any], type: str, version: str, html: str, width: int, height: int, title: str | None = None, author_name: str | None = None, author_url: str | None = None, provider_name: str | None = None, provider_url: str | None = None, cache_age: int | None = None, thumbnail_url: str | None = None, thumbnail_width: int | None = None, thumbnail_height: int | None = None)

Bases: _Optionals, _Video, _Required

oEmbed content for vhoto object.