createScanlationGroup method

Future<Scanlation> createScanlationGroup({
  1. required String name,
  2. required String website,
  3. required String ircServer,
  4. required String ircChannel,
  5. required String discord,
  6. required String contactEmail,
  7. required String description,
  8. required String twitter,
  9. required String mangaUpdates,
  10. required bool inactive,
  11. required String publishDelay,
  12. required String sessionToken,
})
inherited

Endpoint used: POST /group

Creates a Scanlation Group managed by the user identified by it's sessionToken or UUID and returns an http response containing the group's information after being created.

Implementation

Future<Scanlation> createScanlationGroup({
  required String name,
  required String website,
  required String ircServer,
  required String ircChannel,
  required String discord,
  required String contactEmail,
  required String description,
  required String twitter,
  required String mangaUpdates,
  required bool inactive,
  required String publishDelay,
  required String sessionToken,
}) async {
  var response = await createScanlationGroupResponse(
    name,
    website,
    ircServer,
    ircChannel,
    discord,
    contactEmail,
    description,
    twitter,
    mangaUpdates,
    inactive,
    publishDelay,
    sessionToken,
  );
  try {
    return Scanlation.fromJson(jsonDecode(response.body));
  } on Exception {
    throw MangadexServerException(jsonDecode(response.body));
  }
}