Skip to main content

Search Post

The SearchPostsRequest class provides a builder pattern for creating search requests to find posts within the application. This allows users to search for specific content across all posts.

Steps to search posts

  1. Create a SearchPostsRequest object using the SearchPostsRequest.builder() method.
  2. Set the search parameters using the builder methods.
  3. Build the request using the build() method.
  4. Use the built request with the appropriate API call (not shown in this code snippet).
let request = SearchPostsRequest.builder()
.search("keyword")
.searchType("text")
.page(1)
.pageSize(20)
.build()

// Use the request object with your API call

Models

SearchPostsRequest

PropertyTypeDescriptionDefault Value
searchStringThe search query string""
searchTypeStringThe type of search (e.g., "text", "user", "topic")"text"
pageIntThe page number for paginated results1
pageSizeIntThe number of results to return per page10

SearchPostsResponse

The response is same as of GetFeedResponse