getMembersOfGroup static method
Future<SearchResultOfGroupMemberResponse>
getMembersOfGroup(
- HttpClient client,
- int currentpage,
- String groupId,
- RuntimeGroupMemberType memberType,
- String nameSearch,
Get the list of members in a given group.
Implementation
static Future<SearchResultOfGroupMemberResponse> getMembersOfGroup (
HttpClient client,
int currentpage,
String groupId,
RuntimeGroupMemberType memberType,
String nameSearch,
) async {
final Map<String, dynamic> params = Map<String, dynamic>();
final String _currentpage = '$currentpage';
final String _groupId = '$groupId';
params['memberType'] = memberType.value;
params['nameSearch'] = nameSearch;
final HttpClientConfig config = HttpClientConfig('GET', '/GroupV2/$_groupId/Members/', params);
config.bodyContentType = null;
final HttpResponse response = await client.request(config);
if(response.statusCode == 200) {
return SearchResultOfGroupMemberResponse.asyncFromJson(response.mappedBody);
}
throw Exception(response.mappedBody);
}