getPackageVersionHistory method

Future<GetPackageVersionHistoryResponse> getPackageVersionHistory({
  1. required String packageID,
  2. int? maxResults,
  3. String? nextToken,
})

Returns a list of versions of the package, along with their creation time and commit message.

May throw BaseException. May throw InternalException. May throw ResourceNotFoundException. May throw AccessDeniedException. May throw ValidationException.

Parameter packageID : Returns an audit history of versions of the package.

Parameter maxResults : Limits results to a maximum number of versions.

Parameter nextToken : Used for pagination. Only necessary if a previous API call includes a non-null NextToken value. If provided, returns results for the next page.

Implementation

Future<GetPackageVersionHistoryResponse> getPackageVersionHistory({
  required String packageID,
  int? maxResults,
  String? nextToken,
}) async {
  ArgumentError.checkNotNull(packageID, 'packageID');
  _s.validateNumRange(
    'maxResults',
    maxResults,
    0,
    100,
  );
  final $query = <String, List<String>>{
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/2015-01-01/packages/${Uri.encodeComponent(packageID)}/history',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return GetPackageVersionHistoryResponse.fromJson(response);
}