getListComments method

Future<List<Comment>> getListComments(
  1. int id,
  2. String listId, {
  3. bool useOAuth = false,
  4. ListCommentsSortBy sort = ListCommentsSortBy.newest,
  5. RequestPagination? pagination,
})

Returns all top level comments for a list.

By default, the newest comments are returned first. Other sorting options include oldest, most likes, and most replies.

id - Trakt ID listId - Trakt ID or Trakt slug sort - How to sort

🔓 OAuth Optional 📄 Pagination 😁 Emojis

Implementation

Future<List<Comment>> getListComments(int id, String listId,
    {bool useOAuth = false,
    ListCommentsSortBy sort = ListCommentsSortBy.newest,
    RequestPagination? pagination}) async {
  if (useOAuth) {
    return await _manager._authenticatedGetList<Comment>("users/$id/lists/$listId/comments/${sort.value}",
        pagination: pagination);
  }
  return await _manager._getList<Comment>("users/$id/lists/$listId/comments/${sort.value}", pagination: pagination);
}