getCoreTopicsPaged static method
Future<PostSearchResponseResponse>
getCoreTopicsPaged(
- HttpClient client,
- ForumTopicsCategoryFiltersEnum categoryFilter,
- String locales,
- int page,
- ForumTopicsQuickDateEnum quickDate,
- ForumTopicsSortEnum sort,
Gets a listing of all topics marked as part of the core group.
Implementation
static Future<PostSearchResponseResponse> getCoreTopicsPaged (
HttpClient client,
ForumTopicsCategoryFiltersEnum categoryFilter,
String locales,
int page,
ForumTopicsQuickDateEnum quickDate,
ForumTopicsSortEnum sort,
) async {
final Map<String, dynamic> params = Map<String, dynamic>();
final String _categoryFilter = '${categoryFilter.value}';
final String _page = '$page';
final String _quickDate = '${quickDate.value}';
final String _sort = '${sort.value}';
params['locales'] = locales;
final HttpClientConfig config = HttpClientConfig('GET', '/Forum/GetCoreTopicsPaged/$_page/$_sort/$_quickDate/$_categoryFilter/', params);
config.bodyContentType = null;
final HttpResponse response = await client.request(config);
if(response.statusCode == 200) {
return PostSearchResponseResponse.asyncFromJson(response.mappedBody);
}
throw Exception(response.mappedBody);
}