From: Harmon Date: Fri, 18 Dec 2020 12:54:11 +0000 (-0600) Subject: Add missing information in documentation for API.get_oembed X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=f834b655fa4595d364b86e1fac4e6402608f4d6c;p=tweepy.git Add missing information in documentation for API.get_oembed --- diff --git a/docs/api.rst b/docs/api.rst index 5e1329f..da80dd0 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -285,21 +285,47 @@ Status methods .. method:: API.get_oembed(id/url, [maxwidth], [hide_media], [omit_script], \ [align], [related], [lang]) - Requests the Twitter oembed HTML for a given tweet. + Returns a single Tweet, specified by either a Tweet web URL or the Tweet ID, + in an oEmbed-compatible format. The returned HTML snippet will be + automatically recognized as an Embedded Tweet when Twitter's widget + JavaScript is included on the page. + + The oEmbed endpoint allows customization of the final appearance of an + Embedded Tweet by setting the corresponding properties in HTML markup to be + interpreted by Twitter's JavaScript bundled with the HTML response by + default. The format of the returned markup may change over time as Twitter + adds new features or adjusts its Tweet representation. + + The Tweet fallback markup is meant to be cached on your servers for up to + the suggested cache lifetime specified in the ``cache_age``. :param id: |sid| :param url: The URL of the Tweet to be embedded - :param maxwidth: The maximum width of a rendered Tweet in whole pixels. - :param hide_media: When set to ``true``, links in a Tweet are not expanded - to photo, video, or link previews. - :param omit_script: When set to ``true``, the ``