getTrendingCategories static method
Returns trending items for Bungie.net, collapsed into the first page of items per category. For pagination within a category, call GetTrendingCategory.
Implementation
static Future<TrendingCategoriesResponse> getTrendingCategories (
HttpClient client,
) async {
final Map<String, dynamic> params = Map<String, dynamic>();
final HttpClientConfig config = HttpClientConfig('GET', '/Trending/Categories/', params);
config.bodyContentType = null;
final HttpResponse response = await client.request(config);
if(response.statusCode == 200) {
return TrendingCategoriesResponse.asyncFromJson(response.mappedBody);
}
throw Exception(response.mappedBody);
}