kickMember static method
Future<GroupMemberLeaveResultResponse>
kickMember(
- HttpClient client,
- String groupId,
- String membershipId,
- BungieMembershipType membershipType,
Kick a member from the given group, forcing them to reapply if they wish to re-join the group. You must have suitable permissions in the group to perform this operation.
Implementation
static Future<GroupMemberLeaveResultResponse> kickMember (
HttpClient client,
String groupId,
String membershipId,
BungieMembershipType membershipType,
) async {
final Map<String, dynamic> params = Map<String, dynamic>();
final String _groupId = '$groupId';
final String _membershipId = '$membershipId';
final String _membershipType = '${membershipType.value}';
final HttpClientConfig config = HttpClientConfig('POST', '/GroupV2/$_groupId/Members/$_membershipType/$_membershipId/Kick/', params);
config.bodyContentType = null;
final HttpResponse response = await client.request(config);
if(response.statusCode == 200) {
return GroupMemberLeaveResultResponse.asyncFromJson(response.mappedBody);
}
throw Exception(response.mappedBody);
}