CommentsQuery class
A query for retrieving comments with filtering, sorting, and pagination.
Supports intelligent ranking and filtering by content, users, and threads. Includes Reddit-style sorting algorithms (top, best, controversial, hot), thread management with depth control, and engagement metrics tracking.
Example
final query = CommentsQuery(
filter: Filter.equal(CommentsFilterField.objectId, "activity123"),
sort: api.QueryCommentsRequestSortEnum.best,
limit: 20,
);
- Available extensions
- Annotations
-
- @freezed
Constructors
-
CommentsQuery.new({Filter<
CommentsFilterField> ? filter, CommentsSort? sort, int? limit, String? next, String? previous}) -
const
Properties
-
copyWith
→ $CommentsQueryCopyWith<
CommentsQuery> -
Create a copy of CommentsQuery
with the given fields replaced by the non-null parameter values.
no setterinherited
-
filter
→ Filter<
CommentsFilterField> ? -
Filter criteria for this query.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- limit → int?
-
The maximum number of comments to return.
If not specified, the API will use its default limit.
final
- next → String?
-
The next page cursor for pagination.
final
- previous → String?
-
The previous page cursor for pagination.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sort → CommentsSort?
-
The sorting strategy for this query.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toRequest(
) → QueryCommentsRequest -
Available on CommentsQuery, provided by the CommentsQueryRequest extension
Converts this query to an API request format. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited