addMemberToGroup method
Implementation
Future<MdmEmpty> addMemberToGroup(
String apiKey, {
required String groupId,
required String memberId,
}) async {
final String url = '$channel/api/v1/mdm/groups/$groupId/members/$memberId';
final response = await http.post(
Uri.parse(url),
headers: {
'Authorization': 'Zoho-oauthtoken $apiKey',
'Content-Type': 'application/json;charset=UTF-8',
},
);
if (!response.statusCode.isSuccessful) {
throw MdmEngineException(
method: response.request?.method,
url: url,
statusCode: response.statusCode,
error: response.body,
);
}
return MdmEmpty();
}