tangled-api 0.1.0

Lexicon-generated XRPC client for Tangled and AT Protocol APIs
Documentation
// @generated by `cargo xtask codegen` — do not edit.
// source: lexicons/com/atproto/sync/getBlob.json (com.atproto.sync.getBlob)

#![allow(clippy::all)]

pub const NSID: &str = "com.atproto.sync.getBlob";

#[derive(Debug, Clone, Default, serde::Serialize)]
pub struct Params {
    /// The CID of the blob to fetch
    pub cid: String,
    /// The DID of the account.
    pub did: String,
}

/// Get a blob associated with a given account. Returns the full blob as originally uploaded. Does not require auth; implemented by PDS.
///
/// Errors:
/// - `BlobNotFound`
/// - `RepoNotFound`
/// - `RepoTakendown`
/// - `RepoSuspended`
/// - `RepoDeactivated`
///
/// The response body is binary; use [`crate::xrpc::send_bytes`].
pub fn get_blob(
    http: &reqwest::Client,
    base: &str,
    params: &Params,
) -> reqwest::RequestBuilder {
    let rb = http.get(crate::xrpc::xrpc_url(base, NSID));
    let rb = crate::xrpc::push_query(rb, params);
    rb
}