getListComments method
Future<List<Comment> >
getListComments(
- int id,
- String listId, {
- bool useOAuth = false,
- ListCommentsSortBy sort = ListCommentsSortBy.newest,
- 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);
}