createCustomList method
Endpoint used: POST /list
Creates a custom list with the name listName
and
sets visibility to either Visibility.private or
Visibility.public and adds all mangas IDs / UUIDs
in the mangaIds
list and returns a SingleCustomListResponse
class instance containing data of the list created.
Implementation
Future<SingleCustomListResponse> createCustomList(
String sessionToken,
String listName,
Visibility visibility,
List<String> mangaIds,
int version) async {
var response = await createCustomListResponse(
sessionToken, listName, visibility, mangaIds, version);
try {
return SingleCustomListResponse.fromJson(jsonDecode(response.body));
} on Exception {
throw MangadexServerException(jsonDecode(response.body));
}
}