list method

Future<GoogleFactcheckingFactchecktoolsV1alpha1ListClaimReviewMarkupPagesResponse> list({
  1. int? offset,
  2. String? organization,
  3. int? pageSize,
  4. String? pageToken,
  5. String? url,
  6. String? $fields,
})

List the ClaimReview markup pages for a specific URL or for an organization.

Request parameters:

offset - An integer that specifies the current offset (that is, starting result location) in search results. This field is only considered if page_token is unset, and if the request is not for a specific URL. For example, 0 means to return results starting from the first matching result, and 10 means to return from the 11th result.

organization - The organization for which we want to fetch markups for. For instance, "site.com". Cannot be specified along with an URL.

pageSize - The pagination size. We will return up to that many results. Defaults to 10 if not set. Has no effect if a URL is requested.

pageToken - The pagination token. You may provide the next_page_token returned from a previous List request, if any, in order to get the next page. All other fields must have the same values as in the previous request.

url - The URL from which to get ClaimReview markup. There will be at most one result. If markup is associated with a more canonical version of the URL provided, we will return that URL instead. Cannot be specified along with an organization.

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

Completes with a GoogleFactcheckingFactchecktoolsV1alpha1ListClaimReviewMarkupPagesResponse.

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<
        GoogleFactcheckingFactchecktoolsV1alpha1ListClaimReviewMarkupPagesResponse>
    list({
  core.int? offset,
  core.String? organization,
  core.int? pageSize,
  core.String? pageToken,
  core.String? url,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if (offset != null) 'offset': ['${offset}'],
    if (organization != null) 'organization': [organization],
    if (pageSize != null) 'pageSize': ['${pageSize}'],
    if (pageToken != null) 'pageToken': [pageToken],
    if (url != null) 'url': [url],
    if ($fields != null) 'fields': [$fields],
  };

  const url_ = 'v1alpha1/pages';

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