getBungieRewardsForPlatformUser static method

Future<DictionaryOfstringAndBungieRewardDisplayResponse> getBungieRewardsForPlatformUser(
  1. HttpClient client,
  2. String membershipId,
  3. BungieMembershipType membershipType
)

Returns the bungie rewards for the targeted user when a platform membership Id and Type are used.

Implementation

static Future<DictionaryOfstringAndBungieRewardDisplayResponse> getBungieRewardsForPlatformUser (
    HttpClient client,
    String membershipId,
    BungieMembershipType membershipType,
) async {
    final Map<String, dynamic> params = Map<String, dynamic>();
    final String _membershipId = '$membershipId';
    final String _membershipType = '${membershipType.value}';
    final HttpClientConfig config = HttpClientConfig('GET', '/Tokens/Rewards/GetRewardsForPlatformUser/$_membershipId/$_membershipType/', params);
    config.bodyContentType = null;
    final HttpResponse response = await client.request(config);
    if(response.statusCode == 200) {
        return DictionaryOfstringAndBungieRewardDisplayResponse.asyncFromJson(response.mappedBody);
    }
    throw Exception(response.mappedBody);
}