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/pipeline/cancelPipeline.json (sh.tangled.pipeline.cancelPipeline)

#![allow(clippy::all)]

pub const NSID: &str = "sh.tangled.pipeline.cancelPipeline";

#[derive(Debug, Clone, Default, serde::Serialize, serde::Deserialize)]
pub struct Input {
    /// pipeline at-uri
    pub pipeline: String,
    /// repo at-uri, spindle can't resolve repo from pipeline at-uri yet
    pub repo: String,
    /// workflow name
    pub workflow: String,
}

/// DEPRECATED: use sh.tangled.ci.cancelPipeline instead - Cancel a running pipeline
///
/// The response has no body; use [`crate::xrpc::send_unit`].
pub fn cancel_pipeline(
    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
}