getUpdatedComments method

Future<List<MediaComment>> getUpdatedComments({
  1. CommentType? commentType,
  2. MediaType? mediaType,
  3. bool? includeReplies,
  4. bool extendedFull = false,
  5. RequestPagination? pagination,
})

Returns the most recently written comments across all of Trakt.

You can optionally filter by the commentType and mediaType to limit what gets returned. If you want to includeReplies that will return replies in place alongside top level comments.

commentType - Possible values: all , reviews , shouts . mediaType - Possible values: all , movies , shows , seasons , episodes , lists . includeReplies - include comment replies

📄 Pagination ✨ Extended Info 😁 Emojis

Implementation

Future<List<MediaComment>> getUpdatedComments(
    {CommentType? commentType,
    MediaType? mediaType,
    bool? includeReplies,
    bool extendedFull = false,
    RequestPagination? pagination}) async {
  Map<String, dynamic>? params;
  if (includeReplies ?? false) {
    params = {"include_replies": includeReplies};
  }
  var request = "";
  if (commentType != null) {
    request = "/${commentType.value}";
  }

  if (mediaType != null) {
    request += "/${mediaType.value}";
  }

  return await _manager._getList<MediaComment>("comments/updates$request",
      extendedFull: extendedFull,
      pagination: pagination,
      queryParamameters: params);
}