getLeaderboardsForCharacter function

Future<ServerResponse<Map<String, Map<String, DestinyLeaderboard>>>> getLeaderboardsForCharacter (HttpClient http, GetLeaderboardsForCharacterParams params)

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

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