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/repo/forkSync.json (sh.tangled.repo.forkSync)

#![allow(clippy::all)]

pub const NSID: &str = "sh.tangled.repo.forkSync";

#[derive(Debug, Clone, Default, serde::Serialize, serde::Deserialize)]
pub struct Input {
    /// Branch to sync
    pub branch: String,
    /// DID of the fork owner
    pub did: String,
    /// Name of the forked repository
    pub name: String,
    /// AT-URI of the source repository
    pub source: String,
}

/// Sync a forked repository with its upstream source
///
/// The response has no body; use [`crate::xrpc::send_unit`].
pub fn fork_sync(
    http: &reqwest::Client,
    base: &str,
    input: &Input,
) -> reqwest::RequestBuilder {
    let rb = http.post(crate::xrpc::xrpc_url(base, NSID));
    let rb = rb.json(input);
    rb
}