getTopicsPaged static method
Future<PostSearchResponseResponse>
getTopicsPaged(
- HttpClient client,
- ForumTopicsCategoryFiltersEnum categoryFilter,
- String group,
- String locales,
- int page,
- int pageSize,
- ForumTopicsQuickDateEnum quickDate,
- ForumTopicsSortEnum sort,
- String tagstring,
Get topics from any forum.
Implementation
static Future<PostSearchResponseResponse> getTopicsPaged (
HttpClient client,
ForumTopicsCategoryFiltersEnum categoryFilter,
String group,
String locales,
int page,
int pageSize,
ForumTopicsQuickDateEnum quickDate,
ForumTopicsSortEnum sort,
String tagstring,
) async {
final Map<String, dynamic> params = Map<String, dynamic>();
final String _categoryFilter = '${categoryFilter.value}';
final String _group = '$group';
final String _page = '$page';
final String _pageSize = '$pageSize';
final String _quickDate = '${quickDate.value}';
final String _sort = '${sort.value}';
params['locales'] = locales;
params['tagstring'] = tagstring;
final HttpClientConfig config = HttpClientConfig('GET', '/Forum/GetTopicsPaged/$_page/$_pageSize/$_group/$_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);
}