Module Cephalopod_models.App_Bsky_Unspecced_GetPostThreadV2

lexicon "app.bsky.unspecced.getPostThreadV2"

def main

type main_params = {
  1. anchor : string;
    (*

    Reference (AT-URI) to post record. This is the anchor post, and the thread will be built around it. It can be any post in the tree, not necessarily a root post. format: "AtUri"

    *)
  2. above : bool option;
    (*

    Whether to include parents above the anchor. default: true

    *)
  3. below : int64 option;
    (*

    How many levels of replies to include below the anchor. default: 6 maximum: 20 minimum: 0

    *)
  4. branchingFactor : int64 option;
    (*

    Maximum of replies to include at each level of the thread, except for the direct replies to the anchor, which are (NOTE: currently, during unspecced phase) all returned (NOTE: later they might be paginated). default: 10 maximum: 100 minimum: 0

    *)
  5. prioritizeFollowedUsers : bool option;
    (*

    Whether to prioritize posts from followed users. It only has effect when the user is authenticated. default: false

    *)
  6. sort : string option;
    (*

    Sorting for the thread replies. known values: "newest"; "oldest"; "top"

    *)
}
val show_main_params : main_params -> Ppx_deriving_runtime.string
val make_main_params : anchor:string -> ?above:bool -> ?below:int64 -> ?branchingFactor:int64 -> ?prioritizeFollowedUsers:bool -> ?sort:string -> unit -> main_params
val main_params_of_value : main_params Cephalopod_dasl.Value.Util.conv
val main_params_to_value : main_params -> Cephalopod_dasl.Value.t
type main_output = {
  1. thread : Types.app_bsky_unspecced_getpostthreadv2_threaditem list;
    (*

    A flat list of thread items. The depth of each item is indicated by the depth property inside the item.

    *)
  2. threadgate : Types.app_bsky_feed_defs_threadgateview option;
  3. hasHiddenReplies : bool;
    (*

    Whether this thread has hidden replies. If true, a call can be made to the `getPostThreadHiddenV2` endpoint to retrieve them.

    *)
}
val show_main_output : main_output -> Ppx_deriving_runtime.string
val main_output_of_value : main_output Cephalopod_dasl.Value.Util.conv
val main_output_to_value : main_output -> Cephalopod_dasl.Value.t
val main : (main_params, main_output, unit) Base.query

(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.

def threadItem

type nonrec threaditem = Types.app_bsky_unspecced_getpostthreadv2_threaditem = {
  1. uri : string;
    (*

    format: "AtUri"

    *)
  2. depth : int64;
    (*

    The nesting level of this item in the thread. Depth 0 means the anchor item. Items above have negative depths, items below have positive depths.

    *)
  3. value : [ `App_bsky_unspecced_defs_threaditempost of Types.app_bsky_unspecced_defs_threaditempost | `App_bsky_unspecced_defs_threaditemnounauthenticated of Types.app_bsky_unspecced_defs_threaditemnounauthenticated | `App_bsky_unspecced_defs_threaditemnotfound of Types.app_bsky_unspecced_defs_threaditemnotfound | `App_bsky_unspecced_defs_threaditemblocked of Types.app_bsky_unspecced_defs_threaditemblocked | `Other of Cephalopod_dasl.Value.t ];
}