updateCustomList method

Future<SingleCustomListResponse> updateCustomList(
  1. String sessionToken,
  2. String listId,
  3. String listName,
  4. Visibility visibility,
  5. List<String> mangaIds,
  6. int version,
)
inherited

Endpoint used: PUT /manga/{id}/aggregate

Updates an existing custom list identified by its listId or UUID only if the user identified by the sessionToken has permission to update the list and returns the updated data in a SingleCustomListResponse class instance.

Implementation

Future<SingleCustomListResponse> updateCustomList(
    String sessionToken,
    String listId,
    String listName,
    Visibility visibility,
    List<String> mangaIds,
    int version) async {
  var response = await updateCustomListResponse(
      sessionToken, listId, listName, visibility, mangaIds, version);
  try {
    return SingleCustomListResponse.fromJson(jsonDecode(response.body));
  } on Exception {
    throw MangadexServerException(jsonDecode(response.body));
  }
}