Skip to main content

atrium_api/app/bsky/embed/
get_embed_external_view.rs

1// @generated - This file is generated by atrium-codegen. DO NOT EDIT.
2//!Definitions for the `app.bsky.embed.getEmbedExternalView` namespace.
3pub const NSID: &str = "app.bsky.embed.getEmbedExternalView";
4#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
5#[serde(rename_all = "camelCase")]
6pub struct ParametersData {
7    ///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.
8    pub uris: Vec<String>,
9    ///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.
10    pub url: String,
11}
12pub type Parameters = crate::types::Object<ParametersData>;
13#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
14#[serde(rename_all = "camelCase")]
15pub struct OutputData {
16    #[serde(skip_serializing_if = "core::option::Option::is_none")]
17    pub associated_records: core::option::Option<Vec<crate::types::Unknown>>,
18    ///StrongRefs (URI+CID) of the Atmosphere records that backed this view, suitable for embedding into a post's external.associatedRefs.
19    #[serde(skip_serializing_if = "core::option::Option::is_none")]
20    pub associated_refs: core::option::Option<
21        Vec<crate::com::atproto::repo::strong_ref::Main>,
22    >,
23    ///Hydrated view of the embed. Present only when the resolved records back the requested URL and supply enough information to populate the required `viewExternal` fields. Omitted alongside the rest of the response when no records resolved or validation failed.
24    #[serde(skip_serializing_if = "core::option::Option::is_none")]
25    pub view: core::option::Option<crate::app::bsky::embed::external::View>,
26}
27pub type Output = crate::types::Object<OutputData>;
28#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
29#[serde(tag = "error", content = "message")]
30pub enum Error {}
31impl std::fmt::Display for Error {
32    fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result {
33        Ok(())
34    }
35}