getTrendingEntryDetail static method

Future<TrendingDetailResponse> getTrendingEntryDetail(
  1. HttpClient client,
  2. String identifier,
  3. TrendingEntryType trendingEntryType
)

Returns the detailed results for a specific trending entry. Note that trending entries are uniquely identified by a combination of both the TrendingEntryType and the identifier: the identifier alone is not guaranteed to be globally unique.

Implementation

static Future<TrendingDetailResponse> getTrendingEntryDetail (
    HttpClient client,
    String identifier,
    TrendingEntryType trendingEntryType,
) async {
    final Map<String, dynamic> params = Map<String, dynamic>();
    final String _identifier = '$identifier';
    final String _trendingEntryType = '${trendingEntryType.value}';
    final HttpClientConfig config = HttpClientConfig('GET', '/Trending/Details/$_trendingEntryType/$_identifier/', params);
    config.bodyContentType = null;
    final HttpResponse response = await client.request(config);
    if(response.statusCode == 200) {
        return TrendingDetailResponse.asyncFromJson(response.mappedBody);
    }
    throw Exception(response.mappedBody);
}