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
- Create a
SearchPostsRequestobject using theSearchPostsRequest.builder()method. - Set the search parameters using the builder methods.
- Build the request using the
build()method. - 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
| Property | Type | Description | Default Value |
|---|---|---|---|
| search | String | The search query string | "" |
| searchType | String | The type of search (e.g., "text", "user", "topic") | "text" |
| page | Int | The page number for paginated results | 1 |
| pageSize | Int | The number of results to return per page | 10 |
SearchPostsResponse
The response is same as of GetFeedResponse