getHistoricalStats function

Future<ServerResponse<Map<String, DestinyHistoricalStatsByPeriod>>> getHistoricalStats (
  1. HttpClient http,
  2. GetHistoricalStatsParams params
)

Gets historical stats for indicated character.

Implementation

Future<ServerResponse<Map<String, DestinyHistoricalStatsByPeriod>>> getHistoricalStats(HttpClient http, GetHistoricalStatsParams params) {
  return http.request(new HttpClientConfig(
    'GET',
    "https://www.bungie.net/Platform/Destiny2/${params.membershipType}/Account/${params.destinyMembershipId}/Character/${params.characterId}/Stats/",
    {
      'dayend': params.dayend,
      'daystart': params.daystart,
      'groups': params.groups,
      'modes': params.modes,
      'periodType': params.periodType
    },
    null
    ));
}