appBskyUnspeccedGetPostThreadV2 function

Future<XRPCResponse<UnspeccedGetPostThreadV2Output>> appBskyUnspeccedGetPostThreadV2({
  1. required AtUri anchor,
  2. bool? above,
  3. int? below,
  4. int? branchingFactor,
  5. bool? prioritizeFollowedUsers,
  6. UnspeccedGetPostThreadV2Sort? sort,
  7. required ServiceContext $ctx,
  8. Map<String, String>? $headers,
  9. Map<String, String>? $unknown,
})

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

Implementation

Future<XRPCResponse<UnspeccedGetPostThreadV2Output>>
appBskyUnspeccedGetPostThreadV2({
  required AtUri anchor,
  bool? above,
  int? below,
  int? branchingFactor,
  bool? prioritizeFollowedUsers,
  UnspeccedGetPostThreadV2Sort? sort,
  required ServiceContext $ctx,
  Map<String, String>? $headers,
  Map<String, String>? $unknown,
}) async => await $ctx.get(
  ns.appBskyUnspeccedGetPostThreadV2,
  headers: $headers,
  parameters: {
    ...?$unknown,
    'anchor': anchor.toString(),
    if (above != null) 'above': above,
    if (below != null) 'below': below,
    if (branchingFactor != null) 'branchingFactor': branchingFactor,
    if (prioritizeFollowedUsers != null)
      'prioritizeFollowedUsers': prioritizeFollowedUsers,
    if (sort != null) 'sort': sort.toJson(),
  },
  to: const UnspeccedGetPostThreadV2OutputConverter().fromJson,
);