getRecommendedGroups static method
Future<ListOfGroupV2CardResponse>
getRecommendedGroups(
- HttpClient client,
- GroupDateRange createDateRange,
- GroupType groupType
Gets groups recommended for you based on the groups to whom those you follow belong.
Implementation
static Future<ListOfGroupV2CardResponse> getRecommendedGroups (
HttpClient client,
GroupDateRange createDateRange,
GroupType groupType,
) async {
final Map<String, dynamic> params = Map<String, dynamic>();
final String _createDateRange = '${createDateRange.value}';
final String _groupType = '${groupType.value}';
final HttpClientConfig config = HttpClientConfig('POST', '/GroupV2/Recommended/$_groupType/$_createDateRange/', params);
config.bodyContentType = null;
final HttpResponse response = await client.request(config);
if(response.statusCode == 200) {
return ListOfGroupV2CardResponse.asyncFromJson(response.mappedBody);
}
throw Exception(response.mappedBody);
}