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/git/temp/getBlob.json (sh.tangled.git.temp.getBlob)

#![allow(clippy::all)]

pub const NSID: &str = "sh.tangled.git.temp.getBlob";

#[derive(Debug, Clone, Default, serde::Serialize)]
pub struct Params {
    /// Path within the repository tree
    pub path: String,
    /// Git reference (branch, tag, or commit SHA)
    #[serde(skip_serializing_if = "Option::is_none")]
    pub r#ref: Option<String>,
    /// DID of the repository
    pub repo: String,
}

///
/// Errors:
/// - `RepoNotFound`: Repository not found or access denied
/// - `BlobNotFound`: Blob not found
/// - `InvalidRequest`: Invalid request parameters
///
/// 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
}