Package 

Class CommentsQuery


  • 
    public final class CommentsQuery
    
                        

    A query for retrieving comments with filtering, sorting, and pagination options.

    Use this struct to configure how comments should be fetched from the Stream Feeds API. You can specify filters to narrow down results, sorting options, and pagination parameters.

    // Simple query with basic filter
    val query = CommentsQuery(
      filter = CommentsFilterField.ObjectId.equal("activity-123"),
      sort = CommentsSort.Best,
      limit = 20,
    )
    
    // Complex query with multiple filters
    val complexQuery = CommentsQuery(
      filter = Filters.and(
        CommentsFilterField.ObjectId.equal("activity-123"),
        CommentsFilterField.Score.greater(5.0),
        CommentsFilterField.Status.equal("active")
      ),
      sort = CommentsSort.Top,
      limit = 50,
    )