@@ -55,7 +55,7 @@ def initialize
5555 @batch_path = 'batch'
5656 end
5757
58- # Get the latest contents of a hash list. A hash list may either by a threat
58+ # Gets the latest contents of a hash list. A hash list may either by a threat
5959 # list or a non-threat list such as the Global Cache. This is a standard Get
6060 # method as defined by https://google.aip.dev/131 and the HTTP method is also
6161 # GET.
@@ -109,10 +109,10 @@ def get_hash_list(name, size_constraints_max_database_entries: nil, size_constra
109109 execute_or_queue_command ( command , &block )
110110 end
111111
112- # Get multiple hash lists at once. It is very common for a client to need to get
113- # multiple hash lists. Using this method is preferred over using the regular Get
114- # method multiple times. This is a standard batch Get method as defined by https:
115- # //google.aip.dev/231 and the HTTP method is also GET.
112+ # Gets multiple hash lists at once. It is very common for a client to need to
113+ # get multiple hash lists. Using this method is preferred over using the regular
114+ # Get method multiple times. This is a standard batch Get method as defined by
115+ # https: //google.aip.dev/231 and the HTTP method is also GET.
116116 # @param [Array<String>, String] names
117117 # Required. The names of the particular hash lists. The list MAY be a threat
118118 # list, or it may be the Global Cache. The names MUST NOT contain duplicates; if
@@ -167,7 +167,7 @@ def batch_hash_list_get(names: nil, size_constraints_max_database_entries: nil,
167167 execute_or_queue_command ( command , &block )
168168 end
169169
170- # List hash lists. In the V5 API, Google will never remove a hash list that has
170+ # Lists hash lists. In the V5 API, Google will never remove a hash list that has
171171 # ever been returned by this method. This enables clients to skip using this
172172 # method and simply hard-code all hash lists they need. This is a standard List
173173 # method as defined by https://google.aip.dev/132 and the HTTP method is GET.
@@ -206,7 +206,7 @@ def list_hash_lists(page_size: nil, page_token: nil, fields: nil, quota_user: ni
206206 execute_or_queue_command ( command , &block )
207207 end
208208
209- # Search for full hashes matching the specified prefixes. This is a custom
209+ # Searches for full hashes matching the specified prefixes. This is a custom
210210 # method as defined by https://google.aip.dev/136 (the custom method refers to
211211 # this method having a custom name within Google's general API development
212212 # nomenclature; it does not refer to using a custom HTTP method).
@@ -241,6 +241,39 @@ def search_hashes(hash_prefixes: nil, fields: nil, quota_user: nil, options: nil
241241 command . query [ 'quotaUser' ] = quota_user unless quota_user . nil?
242242 execute_or_queue_command ( command , &block )
243243 end
244+
245+ # Searches for URLs matching known threats. Each URL and it's host-suffix and
246+ # path-prefix expressions (up to a limited depth) are checked. This means that
247+ # the response may contain URLs that were not included in the request, but are
248+ # expressions of the requested URLs.
249+ # @param [Array<String>, String] urls
250+ # Required. The URLs to be looked up. Clients MUST NOT send more than 50 URLs.
251+ # @param [String] fields
252+ # Selector specifying which fields to include in a partial response.
253+ # @param [String] quota_user
254+ # Available to use for quota purposes for server-side applications. Can be any
255+ # arbitrary string assigned to a user, but should not exceed 40 characters.
256+ # @param [Google::Apis::RequestOptions] options
257+ # Request-specific options
258+ #
259+ # @yield [result, err] Result & error if block supplied
260+ # @yieldparam result [Google::Apis::SafebrowsingV5::GoogleSecuritySafebrowsingV5SearchUrlsResponse] parsed result object
261+ # @yieldparam err [StandardError] error object if request failed
262+ #
263+ # @return [Google::Apis::SafebrowsingV5::GoogleSecuritySafebrowsingV5SearchUrlsResponse]
264+ #
265+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
266+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
267+ # @raise [Google::Apis::AuthorizationError] Authorization is required
268+ def search_urls ( urls : nil , fields : nil , quota_user : nil , options : nil , &block )
269+ command = make_simple_command ( :get , 'v5/urls:search' , options )
270+ command . response_representation = Google ::Apis ::SafebrowsingV5 ::GoogleSecuritySafebrowsingV5SearchUrlsResponse ::Representation
271+ command . response_class = Google ::Apis ::SafebrowsingV5 ::GoogleSecuritySafebrowsingV5SearchUrlsResponse
272+ command . query [ 'urls' ] = urls unless urls . nil?
273+ command . query [ 'fields' ] = fields unless fields . nil?
274+ command . query [ 'quotaUser' ] = quota_user unless quota_user . nil?
275+ execute_or_queue_command ( command , &block )
276+ end
244277
245278 protected
246279
0 commit comments