proto-blue-api 0.2.1

AT Protocol high-level API: agent, rich text, moderation, generated types
Documentation
// Generated by atproto-codegen. Do not edit.
//! Lexicon: app.bsky.unspecced.getPostThreadV2

use serde::{Deserialize, Serialize};

/// (NOTE: this endpoint is under development and WILL change without notice. Don't use it until it is moved out of `unspecced` or your application WILL break) Get posts in a thread. It is based in an anchor post at any depth of the tree, and returns posts above it (recursively resolving the parent, without further branching to their replies) and below it (recursive replies, with branching to their replies). Does not require auth, but additional metadata and filtering will be applied for authed requests.
/// XRPC Query: app.bsky.unspecced.getPostThreadV2
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Params {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub above: Option<bool>,
    pub anchor: String,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub below: Option<i64>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub branching_factor: Option<i64>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub sort: Option<String>,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Output {
    pub has_other_replies: bool,
    pub thread: Vec<ThreadItem>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub threadgate: Option<crate::app::bsky::feed::defs::ThreadgateView>,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ThreadItem {
    pub depth: i64,
    pub uri: String,
    pub value: serde_json::Value,
}