getClanLeaderboards static method

Future<DestinyLeaderboardResultsResponse> getClanLeaderboards(
  1. HttpClient client,
  2. String groupId,
  3. int maxtop,
  4. String modes,
  5. String statid,
)

Gets leaderboards with the signed in user's friends and the supplied destinyMembershipId as the focus. PREVIEW: This endpoint is still in beta, and may experience rough edges. The schema is in final form, but there may be bugs that prevent desirable operation.

Implementation

static Future<DestinyLeaderboardResultsResponse> getClanLeaderboards (
    HttpClient client,
    String groupId,
    int maxtop,
    String modes,
    String statid,
) async {
    final Map<String, dynamic> params = Map<String, dynamic>();
    final String _groupId = '$groupId';
    params['maxtop'] = maxtop;
    params['modes'] = modes;
    params['statid'] = statid;
    final HttpClientConfig config = HttpClientConfig('GET', '/Destiny2/Stats/Leaderboards/Clans/$_groupId/', params);
    config.bodyContentType = null;
    final HttpResponse response = await client.request(config);
    if(response.statusCode == 200) {
        return DestinyLeaderboardResultsResponse.asyncFromJson(response.mappedBody);
    }
    throw Exception(response.mappedBody);
}