appBskyFeedSearchPostsV2 function

Future<XRPCResponse<FeedSearchPostsV2Output>> appBskyFeedSearchPostsV2({
  1. String? cursor,
  2. int? limit,
  3. String? query,
  4. FeedSearchPostsV2Sort? sort,
  5. List<String>? authors,
  6. List<String>? mentions,
  7. List<String>? domains,
  8. List<String>? urls,
  9. List<AtUri>? embeddedAtUris,
  10. List<String>? hashtags,
  11. List<String>? excludeAuthors,
  12. List<String>? excludeMentions,
  13. List<String>? excludeDomains,
  14. List<String>? excludeUrls,
  15. List<AtUri>? excludeEmbeddedAtUris,
  16. List<String>? excludeHashtags,
  17. String? since,
  18. String? until,
  19. bool? allTime,
  20. List<String>? languages,
  21. List<String>? excludeLanguages,
  22. bool? hasMedia,
  23. bool? hasVideo,
  24. AtUri? replyParentUri,
  25. AtUri? threadRootUri,
  26. bool? excludeReplies,
  27. bool? repliesOnly,
  28. bool? following,
  29. FeedSearchPostsV2QueryLanguage? queryLanguage,
  30. required ServiceContext $ctx,
  31. String? $service,
  32. Map<String, String>? $headers,
  33. Map<String, String>? $unknown,
})

Find posts matching a search query or filters, returning search hits for matching post records.

Implementation

Future<XRPCResponse<FeedSearchPostsV2Output>> appBskyFeedSearchPostsV2({
  String? cursor,
  int? limit,
  String? query,
  FeedSearchPostsV2Sort? sort,
  List<String>? authors,
  List<String>? mentions,
  List<String>? domains,
  List<String>? urls,
  List<AtUri>? embeddedAtUris,
  List<String>? hashtags,
  List<String>? excludeAuthors,
  List<String>? excludeMentions,
  List<String>? excludeDomains,
  List<String>? excludeUrls,
  List<AtUri>? excludeEmbeddedAtUris,
  List<String>? excludeHashtags,
  String? since,
  String? until,
  bool? allTime,
  List<String>? languages,
  List<String>? excludeLanguages,
  bool? hasMedia,
  bool? hasVideo,
  AtUri? replyParentUri,
  AtUri? threadRootUri,
  bool? excludeReplies,
  bool? repliesOnly,
  bool? following,
  FeedSearchPostsV2QueryLanguage? queryLanguage,
  required ServiceContext $ctx,
  String? $service,
  Map<String, String>? $headers,
  Map<String, String>? $unknown,
}) async => await $ctx.get(
  ns.appBskyFeedSearchPostsV2,
  service: $service,
  headers: $headers,
  parameters: {
    ...?$unknown,
    if (cursor != null) 'cursor': cursor,
    if (limit != null) 'limit': limit,
    if (query != null) 'query': query,
    if (sort != null) 'sort': sort.toJson(),
    if (authors != null) 'authors': authors,
    if (mentions != null) 'mentions': mentions,
    if (domains != null) 'domains': domains,
    if (urls != null) 'urls': urls,
    if (embeddedAtUris != null)
      'embeddedAtUris': embeddedAtUris.map((e) => e.toString()).toList(),
    if (hashtags != null) 'hashtags': hashtags,
    if (excludeAuthors != null) 'excludeAuthors': excludeAuthors,
    if (excludeMentions != null) 'excludeMentions': excludeMentions,
    if (excludeDomains != null) 'excludeDomains': excludeDomains,
    if (excludeUrls != null) 'excludeUrls': excludeUrls,
    if (excludeEmbeddedAtUris != null)
      'excludeEmbeddedAtUris': excludeEmbeddedAtUris
          .map((e) => e.toString())
          .toList(),
    if (excludeHashtags != null) 'excludeHashtags': excludeHashtags,
    if (since != null) 'since': since,
    if (until != null) 'until': until,
    if (allTime != null) 'allTime': allTime,
    if (languages != null) 'languages': languages,
    if (excludeLanguages != null) 'excludeLanguages': excludeLanguages,
    if (hasMedia != null) 'hasMedia': hasMedia,
    if (hasVideo != null) 'hasVideo': hasVideo,
    if (replyParentUri != null) 'replyParentUri': replyParentUri.toString(),
    if (threadRootUri != null) 'threadRootUri': threadRootUri.toString(),
    if (excludeReplies != null) 'excludeReplies': excludeReplies,
    if (repliesOnly != null) 'repliesOnly': repliesOnly,
    if (following != null) 'following': following,
    if (queryLanguage != null) 'queryLanguage': queryLanguage.toJson(),
  },
  to: const FeedSearchPostsV2OutputConverter().fromJson,
);