individualGroupInvite static method
Future<GroupApplicationResponseResponse>
individualGroupInvite(
- HttpClient client,
- String groupId,
- String membershipId,
- BungieMembershipType membershipType,
- GroupApplicationRequest body,
Invite a user to join this group.
Implementation
static Future<GroupApplicationResponseResponse> individualGroupInvite (
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/IndividualInvite/$_membershipType/$_membershipId/', params);
config.body = await body.asyncToJson();
config.bodyContentType = 'application/json';
final HttpResponse response = await client.request(config);
if(response.statusCode == 200) {
return GroupApplicationResponseResponse.asyncFromJson(response.mappedBody);
}
throw Exception(response.mappedBody);
}