editGroupMembership static method
Future<Int32Response>
editGroupMembership(
- HttpClient client,
- String groupId,
- String membershipId,
- BungieMembershipType membershipType,
- RuntimeGroupMemberType memberType,
Edit the membership type of a given member. You must have suitable permissions in the group to perform this operation.
Implementation
static Future<Int32Response> editGroupMembership (
HttpClient client,
String groupId,
String membershipId,
BungieMembershipType membershipType,
RuntimeGroupMemberType memberType,
) async {
final Map<String, dynamic> params = Map<String, dynamic>();
final String _groupId = '$groupId';
final String _membershipId = '$membershipId';
final String _membershipType = '${membershipType.value}';
final String _memberType = '${memberType.value}';
final HttpClientConfig config = HttpClientConfig('POST', '/GroupV2/$_groupId/Members/$_membershipType/$_membershipId/SetMembershipType/$_memberType/', params);
config.bodyContentType = null;
final HttpResponse response = await client.request(config);
if(response.statusCode == 200) {
return Int32Response.asyncFromJson(response.mappedBody);
}
throw Exception(response.mappedBody);
}