get method

Future<GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse> get(
  1. String encodedRequest, {
  2. String? clientId,
  3. String? clientVersion,
  4. String? $fields,
})

Request parameters:

encodedRequest - A serialized FetchThreatListUpdatesRequest proto.

clientId - A client ID that uniquely identifies the client implementation of the Safe Browsing API.

clientVersion - The version of the client implementation.

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

Completes with a GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse.

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<GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse> get(
  core.String encodedRequest, {
  core.String? clientId,
  core.String? clientVersion,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if (clientId != null) 'clientId': [clientId],
    if (clientVersion != null) 'clientVersion': [clientVersion],
    if ($fields != null) 'fields': [$fields],
  };

  final url_ =
      'v4/encodedUpdates/' + commons.escapeVariable('$encodedRequest');

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