oembed
For generating OEmbed previews.
get
OEmbed as JSON
https://mastodon.example/api/oembed
戻り値: OEmbed metadata
OAuth: Public
実装履歴:
- 1.0.0 - 追加
リクエスト
クエリ
url
必須
string
URL of a status
maxwidth
任意
number
width of the iframe. Defaults to 400
maxheight
任意
number
height of the iframe. Defaults to null
レスポンス
200: Success
Represents OEmbed “rich” preview, with associated iframe and metadata.
{
"type": "rich",
"version": "1.0",
"title": "New status by trwnh",
"author_name": "infinite love ⴳ",
"author_url": "https://mastodon.social/@trwnh",
"provider_name": "mastodon.social",
"provider_url": "https://mastodon.social/",
"cache_age": 86400,
"html": "<iframe src=\"https://mastodon.social/@trwnh/99664077509711321/embed\" class=\"mastodon-embed\" style=\"max-width: 100%; border: 0\" width=\"400\" allowfullscreen=\"allowfullscreen\"></iframe><script src=\"https://mastodon.social/embed.js\" async=\"async\"></script>",
"width": 400,
"height": null
}
404: Not Found
Status not found
{
"error": "Record not found"
}
最終更新 May 17, 2020 · このページを改善する
他の言語:
English