list method
List hash lists.
In the V5 API, Google will never remove a hash list that has ever been returned by this method. This enables clients to skip using this method and simply hard-code all hash lists they need. This is a standard List method as defined by https://google.aip.dev/132 and the HTTP method is GET.
Request parameters:
pageSize
- The maximum number of hash lists to return. The service may
return fewer than this value. If unspecified, the server will choose a
page size, which may be larger than the number of hash lists so that
pagination is not necessary.
pageToken
- A page token, received from a previous ListHashLists
call.
Provide this to retrieve the subsequent page.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a GoogleSecuritySafebrowsingV5ListHashListsResponse.
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<GoogleSecuritySafebrowsingV5ListHashListsResponse> list({
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],
};
const url_ = 'v5/hashLists';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return GoogleSecuritySafebrowsingV5ListHashListsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}