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: float, content: Photo | Video | Link | Rich | HtmlOnly)¶
Bases:
NamedTupleContent object with expired timestamp for cache.
Deprecated since version 0.9.0: This is internal class for cache, so it keeps to avoid breaking cache data. I will remove for v1. Use
Contentinstead if you use in other projects.- expired: float¶
Alias for field number 0
- oembedpy.types.Content¶
Collection of oEmbed content types.
- 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:
_Internals,_Optionals,_HtmlOnlyFallback type for invalid scheme.
- class oembedpy.types.Link(_extra: Dict[str, Any], type: str, version: 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:
_Internals,_Optionals,_RequiredoEmbed 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:
_Internals,_Optionals,_Photo,_RequiredoEmbed 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:
_Internals,_Optionals,_Rich,_RequiredoEmbed 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:
_Internals,_Optionals,_Video,_RequiredoEmbed content for vhoto object.