getLeaderboards function

Future<ServerResponse<Map<String, Map<String, DestinyLeaderboard>>>> getLeaderboards (HttpClient http, GetLeaderboardsParams params)

Gets leaderboards with the signed in user's friends and the supplied destinyMembershipId as the focus. PREVIEW: This endpoint has not yet been implemented. It is being returned for a preview of future functionality, and for public comment/suggestion/preparation.

Implementation

Future<ServerResponse<Map<String, Map<String, DestinyLeaderboard>>>> getLeaderboards(HttpClient http, GetLeaderboardsParams params) {
  return http.request(new HttpClientConfig(
    'GET',
    "https://www.bungie.net/Platform/Destiny2/${params.membershipType}/Account/${params.destinyMembershipId}/Stats/Leaderboards/",
    {
      'maxtop': params.maxtop,
      'modes': params.modes,
      'statid': params.statid
    },
    null
    ));
}