Exosphere.Bsky.Embed (Exosphere v0.6.0)

Copy Markdown View Source

XRPC client functions for the app.bsky.embed namespace.

Generated from vendored lexicons — DO NOT EDIT.

Endpoints

  • get_embed_external_view — query: app.bsky.embed.getEmbedExternalView

Summary

Functions

Resolve one or more AT-URIs into the data needed to render an enhanced external embed. Returns associatedRefs (strongRefs to embed into a post's external.associatedRefs), the raw associatedRecords, and a hydrated view. The response is empty ({}) when no records were resolvable, or when validation determined the resolved records don't actually back the requested URL; clients should fall back to their own link-card rendering in that case and skip writing strongRefs to the post.

Functions

get_embed_external_view(client, params \\ [])

@spec get_embed_external_view(Exosphere.ATProto.XRPC.Client.t(), map() | keyword()) ::
  {:ok, map()} | {:error, term()}

Resolve one or more AT-URIs into the data needed to render an enhanced external embed. Returns associatedRefs (strongRefs to embed into a post's external.associatedRefs), the raw associatedRecords, and a hydrated view. The response is empty ({}) when no records were resolvable, or when validation determined the resolved records don't actually back the requested URL; clients should fall back to their own link-card rendering in that case and skip writing strongRefs to the post.

## Parameters

  • uris (array, required): AT-URIs of any Atmosphere records that can be resolved and used to construct #externalView views. Example: a site.standard.document and optionally its associated site.standard.publication.
  • url (string, required): The canonical web URL the embed represents (typically the URL the user pasted into the composer). Used as the returned view's uri. May be used for validation in the future.