getApiKey method

Future<ApiKey> getApiKey({
  1. required String apiKey,
  2. bool? includeValue,
})

Gets information about the current ApiKey resource.

May throw UnauthorizedException. May throw NotFoundException. May throw TooManyRequestsException.

Parameter apiKey : Required The identifier of the ApiKey resource.

Parameter includeValue : A boolean flag to specify whether (true) or not (false) the result contains the key value.

Implementation

Future<ApiKey> getApiKey({
  required String apiKey,
  bool? includeValue,
}) async {
  ArgumentError.checkNotNull(apiKey, 'apiKey');
  final $query = <String, List<String>>{
    if (includeValue != null) 'includeValue': [includeValue.toString()],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/apikeys/${Uri.encodeComponent(apiKey)}',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ApiKey.fromJson(response);
}