app.bsky.unspecced.getPostThreadV2

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

class atproto_client.models.app.bsky.unspecced.get_post_thread_v2.Params

Bases: ParamsModelBase

Parameters model for app.bsky.unspecced.getPostThreadV2.

field above: bool | None = True

Whether to include parents above the anchor.

field anchor: AtUri [Required]

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.

field below: int | None = None
Constraints:
  • ge = 0

  • le = 20

field branching_factor: int | None = None
Constraints:
  • ge = 0

  • le = 100

field sort: Literal['newest', 'oldest', 'top'] | str | None = 'oldest'

Sorting for the thread replies.

class atproto_client.models.app.bsky.unspecced.get_post_thread_v2.ParamsDict

Bases: TypedDict

anchor: AtUri

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.

above: NotRequired[bool | None]

Whether to include parents above the anchor.

below: NotRequired[int | None]

How many levels of replies to include below the anchor.

branching_factor: NotRequired[int | None]

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

sort: NotRequired[Literal['newest', 'oldest', 'top'] | str | None]

Sorting for the thread replies.

class atproto_client.models.app.bsky.unspecced.get_post_thread_v2.Response

Bases: ResponseModelBase

Output data model for app.bsky.unspecced.getPostThreadV2.

field has_other_replies: bool [Required]

Whether this thread has additional replies. If true, a call can be made to the getPostThreadOtherV2 endpoint to retrieve them.

field thread: List[models.AppBskyUnspeccedGetPostThreadV2.ThreadItem] [Required]

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

field threadgate: models.AppBskyFeedDefs.ThreadgateView | None = None

Threadgate.

class atproto_client.models.app.bsky.unspecced.get_post_thread_v2.ThreadItem

Bases: ModelBase

Definition model for app.bsky.unspecced.getPostThreadV2.

field depth: int [Required]

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.

field uri: AtUri [Required]

Uri.

field value: models.AppBskyUnspeccedDefs.ThreadItemPost | models.AppBskyUnspeccedDefs.ThreadItemNoUnauthenticated | models.AppBskyUnspeccedDefs.ThreadItemNotFound | models.AppBskyUnspeccedDefs.ThreadItemBlocked | DotDict [Required]

Value.

Constraints:
  • __module__ = atproto_client.models.unknown_union

  • __firstlineno__ = 17

  • __doc__ = Annotation for open ref unions: an unrecognized $type falls back to DotDict. Applied to t.Union[<known members>, 'dot_dict.DotDictType']. Members are discriminated by py_type as usual, so a known type that fails validation still raises. Only a $type that matches no member, or a missing one, degrades to a DotDict.

  • __get_pydantic_core_schema__ = <bound method UnknownUnionFallback.__get_pydantic_core_schema__ of <class ‘atproto_client.models.unknown_union.UnknownUnionFallback’>>

  • __static_attributes__ = ()

  • __dict__ = {‘__module__’: ‘atproto_client.models.unknown_union’, ‘__firstlineno__’: 17, ‘__doc__’: “Annotation for open ref unions: an unrecognized $type falls back to DotDict.nnApplied to t.Union[<known members>, 'dot_dict.DotDictType']. Members are discriminated byn``py_type`` as usual, so a known type that fails validation still raises. Only a $type thatnmatches no member, or a missing one, degrades to a DotDict.n”, ‘__get_pydantic_core_schema__’: <classmethod(<function UnknownUnionFallback.__get_pydantic_core_schema__ at 0x7bdd14e56fc0>)>, ‘__static_attributes__’: (), ‘__dict__’: <attribute ‘__dict__’ of ‘UnknownUnionFallback’ objects>, ‘__weakref__’: <attribute ‘__weakref__’ of ‘UnknownUnionFallback’ objects>}

  • __weakref__ = <attribute ‘__weakref__’ of ‘UnknownUnionFallback’ objects>