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:
objectSupported 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, fallback_type: bool = False) Photo | Video | Link | Rich | HtmlOnly¶
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)