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/knot/version.json (sh.tangled.knot.version)

#![allow(clippy::all)]

pub const NSID: &str = "sh.tangled.knot.version";

#[derive(Debug, Clone, Default, serde::Serialize, serde::Deserialize)]
pub struct Output {
    /// Protocol capability tokens this knot implements, such as knot-acl. Knots that omit this field are treated as legacy.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub capabilities: Option<Vec<String>>,
    pub version: String,
}

/// Get the version of a knot
pub fn version(http: &reqwest::Client, base: &str) -> reqwest::RequestBuilder {
    let rb = http.get(crate::xrpc::xrpc_url(base, NSID));
    let rb = rb.header(reqwest::header::ACCEPT, "application/json");
    rb
}