getDeployments method

Future<Deployments> getDeployments({
  1. required String restApiId,
  2. int? limit,
  3. String? position,
})

Gets information about a Deployments collection.

May throw BadRequestException. May throw NotFoundException. May throw UnauthorizedException. May throw TooManyRequestsException. May throw ServiceUnavailableException.

Parameter restApiId : Required The string identifier of the associated RestApi.

Parameter limit : The maximum number of returned results per page. The default value is 25 and the maximum value is 500.

Parameter position : The current pagination position in the paged result set.

Implementation

Future<Deployments> getDeployments({
  required String restApiId,
  int? limit,
  String? position,
}) async {
  ArgumentError.checkNotNull(restApiId, 'restApiId');
  final $query = <String, List<String>>{
    if (limit != null) 'limit': [limit.toString()],
    if (position != null) 'position': [position],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/restapis/${Uri.encodeComponent(restApiId)}/deployments',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return Deployments.fromJson(response);
}