diff options
author | bnewbold <bnewbold@robocracy.org> | 2024-04-13 12:20:06 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-13 12:20:06 -0700 |
commit | 58842d03a95af014cb44c3495d109e3bb6731fde (patch) | |
tree | 08c27ccc28e05235e02440d9584788c78d654bc7 /bskyweb/README.embed.md | |
parent | 196dd3a8abdc4ebdd0a73c5f6afe2acca38d8efc (diff) | |
download | voidsky-58842d03a95af014cb44c3495d109e3bb6731fde.tar.zst |
rebased embedr (#3511)
* skeleton of embedr service, based on bskyweb * embedr container setup * builds on this branch * actual routes * fix embedr go:embed * tweak embedr dockerfile * progress on embedr * fix path params * tweaks to build process * try to get embedr dockerfile to install embed deps * build this branch * updates to match sam's output HTML * try to unbreak embedr dockerfile * small embedr tweak * docker hack * get embed.js copied over to embedr * don't x-frame-options for embed.bsky.app * bskyembed: remove a console.log * use html/template for golang snippet generation * simplify embedr API fetches * missing file * Rm console.log fully --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
Diffstat (limited to 'bskyweb/README.embed.md')
-rw-r--r-- | bskyweb/README.embed.md | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/bskyweb/README.embed.md b/bskyweb/README.embed.md new file mode 100644 index 000000000..8f19ef022 --- /dev/null +++ b/bskyweb/README.embed.md @@ -0,0 +1,52 @@ + +## oEmbed + +<https://oembed.com/> + +* URL scheme: `https://bsky.app/profile/*/post/*` +* API endpoint: `https://embed.bsky.app/oembed` + +Request params: + +- `url` (required): support both AT-URI and bsky.app URL +- `maxwidth` (optional): [220..550], 325 is default +- `maxheight` (not supported!) +- `format` (optional): only `json` supported + +Response format: + +- `type` (required): "rich" +- `version` (required): "1.0" +- `author_name` (optional): display name +- `author_url` (optional): profile URL +- `provider_name` (optional): "Bluesky Social" +- `provider_url` (optional): "https://bsky.app" +- `cache_age` (optional, integer seconds): 86400 (24 hours) (?) +- `width` (required): ? +- `height` (required): ? + +Not used: + +- title (optional): A text title, describing the resource. +- thumbnail_url (optional): A URL to a thumbnail image representing the resource. The thumbnail must respect any maxwidth and maxheight parameters. If this parameter is present, thumbnail_width and thumbnail_height must also be present. +- thumbnail_width (optional): The width of the optional thumbnail. If this parameter is present, thumbnail_url and thumbnail_height must also be present. +- thumbnail_height (optional): The height of the optional thumbnail. If this parameter is present, thumbnail_url and thumbnail_width must also be present. + +Only `json` is supported; `xml` is a 501. + +``` +<link rel="alternate" type="application/json+oembed" href="https://embed.bsky.app/oembed?format=json&url=https://bsky.app/profile/bnewbold.net/post/abc123" /> +``` + + +## iframe URL + +`https://embed.bsky.app/embed/<did>/app.bsky.feed.post/<rkey>` +`https://embed.bsky.app/static/embed.js` + +``` +<blockquote class="bluesky-post" data-lang="en" data-align="center"> + <p lang="en" dir="ltr">{{ post-text }}</p> + — US Department of the Interior (@Interior) <a href="https://twitter.com/Interior/status/463440424141459456?ref_src=twsrc%5Etfw">May 5, 2014</a> +</blockquote> +``` |