getBungieRewardsForUser static method

Future<DictionaryOfstringAndBungieRewardDisplayResponse> getBungieRewardsForUser(
  1. HttpClient client,
  2. String membershipId
)

Returns the bungie rewards for the targeted user.

Implementation

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