getRatings method

Future<List<RatedItem>> getRatings({
  1. MediaType? type,
  2. List<int>? ratings,
  3. bool extendedFull = false,
  4. RequestPagination? pagination,
})

Get a user's ratings filtered by type.

You can optionally filter for a specific rating between 1 and 10. Send a comma separated string for rating if you need multiple ratings.

type - Possible values: movies , shows , seasons , episodes , all . ratings - Filter for a specific rating. Possible values: 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 .

🔒 OAuth Required 📄 Pagination Optional ✨ Extended Info

Implementation

Future<List<RatedItem>> getRatings(
    {MediaType? type,
    List<int>? ratings,
    bool extendedFull = false,
    RequestPagination? pagination}) async {
  var request = "sync/ratings";
  if (type != null) {
    request += "/${type.value}";
    if (ratings?.isNotEmpty ?? false) {
      request += "/${ratings!.join(",")}";
    }
  }

  return await _manager._authenticatedGetList<RatedItem>(request,
      extendedFull: extendedFull, pagination: pagination);
}