createScanlationGroupResponse method
Future<Response>
createScanlationGroupResponse(
- String name,
- String website,
- String ircServer,
- String ircChannel,
- String discord,
- String contactEmail,
- String description,
- String twitter,
- String mangaUpdates,
- bool inactive,
- String publishDelay,
- 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<http.Response> createScanlationGroupResponse(
String name,
String website,
String ircServer,
String ircChannel,
String discord,
String contactEmail,
String description,
String twitter,
String mangaUpdates,
bool inactive,
String publishDelay,
String sessionToken,
) {
var unencodedPath = '/group';
var uri = 'https://$AUTHORITY$unencodedPath';
return http.post(Uri.parse(uri), headers: {
'name': name,
'website': website,
'ircServer': ircServer,
'ircChannel': ircChannel,
'discord': discord,
'contactEmail': contactEmail,
'description': description,
'twitter': twitter,
'mangaUpdates': mangaUpdates,
'inactive': inactive.toString(),
'publishDelay': publishDelay,
HttpHeaders.contentTypeHeader: 'application/json',
HttpHeaders.authorizationHeader: 'Bearer $sessionToken'
});
}