shrike 0.1.0

AT Protocol library for Rust
Documentation
// Code generated by lexgen. DO NOT EDIT.

#[derive(Debug, Clone, Default, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct RepoGetRecordParams {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub cid: Option<String>,
    pub collection: String,
    pub repo: String,
    pub rkey: String,
}

#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct RepoGetRecordOutput {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub cid: Option<String>,
    pub uri: crate::syntax::AtUri,
    pub value: serde_json::Value,
    /// Extra fields not defined in the schema.
    #[serde(flatten)]
    pub extra: std::collections::HashMap<String, serde_json::Value>,
}

/// RepoGetRecord — Get a single record from a repository. Does not require auth.
pub async fn repo_get_record(
    client: &crate::xrpc::Client,
    params: &RepoGetRecordParams,
) -> Result<RepoGetRecordOutput, crate::xrpc::Error> {
    client.query("com.atproto.repo.getRecord", params).await
}