list method

Future<Webproperties> list (
  1. String accountId,
  2. {int start_index,
  3. int max_results,
  4. String $fields}

Lists web properties to which the user has access.

Request parameters:

accountId - Account ID to retrieve web properties for. Can either be a specific account ID or '~all', which refers to all the accounts that user has access to.

start_index - An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.

max_results - The maximum number of web properties to include in this response.

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

Completes with a Webproperties.

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.


async.Future<Webproperties> list(core.String accountId,
    { start_index, max_results, core.String $fields}) {
  var _url;
  var _queryParams = new core.Map<core.String, core.List<core.String>>();
  var _uploadMedia;
  var _uploadOptions;
  var _downloadOptions = commons.DownloadOptions.Metadata;
  var _body;

  if (accountId == null) {
    throw new core.ArgumentError("Parameter accountId is required.");
  if (start_index != null) {
    _queryParams["start-index"] = ["${start_index}"];
  if (max_results != null) {
    _queryParams["max-results"] = ["${max_results}"];
  if ($fields != null) {
    _queryParams["fields"] = [$fields];

  _url = 'management/accounts/' +
      commons.Escaper.ecapeVariable('$accountId') +

  var _response = _requester.request(_url, "GET",
      body: _body,
      queryParams: _queryParams,
      uploadOptions: _uploadOptions,
      uploadMedia: _uploadMedia,
      downloadOptions: _downloadOptions);
  return _response.then((data) => new Webproperties.fromJson(data));