list method

Future<ListReposResponse> list(
  1. String name, {
  2. int? pageSize,
  3. String? pageToken,
  4. String? $fields,
})

Returns all repos belonging to a project.

The sizes of the repos are not set by ListRepos. To get the size of a repo, use GetRepo.

Request parameters:

name - The project ID whose repos should be listed. Values are of the form projects/. Value must have pattern ^projects/\[^/\]+$.

pageSize - Maximum number of repositories to return; between 1 and 500. If not set or zero, defaults to 100 at the server.

pageToken - Resume listing repositories where a prior ListReposResponse left off. This is an opaque token that must be obtained from a recent, prior ListReposResponse's next_page_token field.

$fields - Selector specifying which fields to include in a partial response.

Completes with a ListReposResponse.

Completes with a commons.ApiRequestError if the API endpoint returned an error.

If the used http.Client completes with an error when making a REST call, this method will complete with the same error.

Implementation

async.Future<ListReposResponse> list(
  core.String name, {
  core.int? pageSize,
  core.String? pageToken,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if (pageSize != null) 'pageSize': ['${pageSize}'],
    if (pageToken != null) 'pageToken': [pageToken],
    if ($fields != null) 'fields': [$fields],
  };

  final url_ = 'v1/' + core.Uri.encodeFull('$name') + '/repos';

  final response_ = await _requester.request(
    url_,
    'GET',
    queryParams: queryParams_,
  );
  return ListReposResponse.fromJson(
      response_ as core.Map<core.String, core.dynamic>);
}