getUniqueWeaponHistory static method
Future<DestinyHistoricalWeaponStatsDataResponse>
getUniqueWeaponHistory(
- HttpClient client,
- String characterId,
- String destinyMembershipId,
- BungieMembershipType membershipType,
Gets details about unique weapon usage, including all exotic weapons.
Implementation
static Future<DestinyHistoricalWeaponStatsDataResponse> getUniqueWeaponHistory (
HttpClient client,
String characterId,
String destinyMembershipId,
BungieMembershipType membershipType,
) async {
final Map<String, dynamic> params = Map<String, dynamic>();
final String _characterId = '$characterId';
final String _destinyMembershipId = '$destinyMembershipId';
final String _membershipType = '${membershipType.value}';
final HttpClientConfig config = HttpClientConfig('GET', '/Destiny2/$_membershipType/Account/$_destinyMembershipId/Character/$_characterId/Stats/UniqueWeapons/', params);
config.bodyContentType = null;
final HttpResponse response = await client.request(config);
if(response.statusCode == 200) {
return DestinyHistoricalWeaponStatsDataResponse.asyncFromJson(response.mappedBody);
}
throw Exception(response.mappedBody);
}