getActivityHistory static method
Future<DestinyActivityHistoryResultsResponse>
getActivityHistory(
- HttpClient client,
- String characterId,
- int count,
- String destinyMembershipId,
- BungieMembershipType membershipType,
- DestinyActivityModeType mode,
- int page,
Gets activity history stats for indicated character.
Implementation
static Future<DestinyActivityHistoryResultsResponse> getActivityHistory (
HttpClient client,
String characterId,
int count,
String destinyMembershipId,
BungieMembershipType membershipType,
DestinyActivityModeType mode,
int page,
) async {
final Map<String, dynamic> params = Map<String, dynamic>();
final String _characterId = '$characterId';
final String _destinyMembershipId = '$destinyMembershipId';
final String _membershipType = '${membershipType.value}';
params['count'] = count;
params['mode'] = mode.value;
params['page'] = page;
final HttpClientConfig config = HttpClientConfig('GET', '/Destiny2/$_membershipType/Account/$_destinyMembershipId/Character/$_characterId/Stats/Activities/', params);
config.bodyContentType = null;
final HttpResponse response = await client.request(config);
if(response.statusCode == 200) {
return DestinyActivityHistoryResultsResponse.asyncFromJson(response.mappedBody);
}
throw Exception(response.mappedBody);
}