awaGetActionToken static method

Future<AwaAuthorizationResultResponse> awaGetActionToken(
  1. HttpClient client,
  2. String correlationId
)

Returns the action token if user approves the request.

Implementation

static Future<AwaAuthorizationResultResponse> awaGetActionToken (
    HttpClient client,
    String correlationId,
) async {
    final Map<String, dynamic> params = Map<String, dynamic>();
    final String _correlationId = '$correlationId';
    final HttpClientConfig config = HttpClientConfig('GET', '/Destiny2/Awa/GetActionToken/$_correlationId/', params);
    config.bodyContentType = null;
    final HttpResponse response = await client.request(config);
    if(response.statusCode == 200) {
        return AwaAuthorizationResultResponse.asyncFromJson(response.mappedBody);
    }
    throw Exception(response.mappedBody);
}