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

#![allow(clippy::all)]

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

#[derive(Debug, Clone, Default, serde::Serialize, serde::Deserialize)]
pub struct Input {
    #[serde(rename = "defaultBranch")]
    pub default_branch: String,
    pub repo: String,
}

/// Set the default branch for a repository
///
/// The response has no body; use [`crate::xrpc::send_unit`].
pub fn set_default_branch(
    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
}