getPartnerRewardHistory static method

Future<PartnerRewardHistoryResponseResponse> getPartnerRewardHistory(
  1. HttpClient client,
  2. int partnerApplicationId,
  3. String targetBnetMembershipId
)

Returns the partner rewards history of the targeted user, both partner offers and Twitch drops.

Implementation

static Future<PartnerRewardHistoryResponseResponse> getPartnerRewardHistory (
    HttpClient client,
    int partnerApplicationId,
    String targetBnetMembershipId,
) async {
    final Map<String, dynamic> params = Map<String, dynamic>();
    final String _partnerApplicationId = '$partnerApplicationId';
    final String _targetBnetMembershipId = '$targetBnetMembershipId';
    final HttpClientConfig config = HttpClientConfig('GET', '/Tokens/Partner/History/$_targetBnetMembershipId/Application/$_partnerApplicationId/', params);
    config.bodyContentType = null;
    final HttpResponse response = await client.request(config);
    if(response.statusCode == 200) {
        return PartnerRewardHistoryResponseResponse.asyncFromJson(response.mappedBody);
    }
    throw Exception(response.mappedBody);
}