getTopicsPaged static method

Future<PostSearchResponseResponse> getTopicsPaged(
  1. HttpClient client,
  2. ForumTopicsCategoryFiltersEnum categoryFilter,
  3. String group,
  4. String locales,
  5. int page,
  6. int pageSize,
  7. ForumTopicsQuickDateEnum quickDate,
  8. ForumTopicsSortEnum sort,
  9. 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);
}