approvePending static method
Future<BooleanResponse>
approvePending(
- HttpClient client,
- String groupId,
- String membershipId,
- BungieMembershipType membershipType,
- GroupApplicationRequest body,
Approve the given membershipId to join the group/clan as long as they have applied.
Implementation
static Future<BooleanResponse> approvePending (
HttpClient client,
String groupId,
String membershipId,
BungieMembershipType membershipType,
GroupApplicationRequest body
) 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/Approve/$_membershipType/$_membershipId/', params);
config.body = await body.asyncToJson();
config.bodyContentType = 'application/json';
final HttpResponse response = await client.request(config);
if(response.statusCode == 200) {
return BooleanResponse.asyncFromJson(response.mappedBody);
}
throw Exception(response.mappedBody);
}