createInvite method
Implementation
Future createInvite(
String channelId, {
int? maxAge, //seconds
int? maxUses,
bool? temporary,
bool? unique,
String? targetUser,
String? targetUserType,
}) {
var endpoint = '/channels/$channelId/invites';
return _http.request(
endpoint,
converter: _http.asNull,
method: 'post',
body: {
...insertNotNull('max_age', maxAge),
...insertNotNull('max_uses', maxUses),
...insertNotNull('temporary', temporary),
...insertNotNull('unique', unique),
...insertNotNull('target_user', targetUser),
...insertNotNull('target_user_type', targetUserType),
},
);
}