google-cloud-webrisk 0.2.1 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 630e59850d3d44ec815d82e40989290cc92e4c50af476f5fd7cb5ed0376c80de
4
- data.tar.gz: 1547147135c53ec8522bcbaad0e8007126cee9391b90224c8ca73822039646c3
3
+ metadata.gz: 2f574345a46e7931b9059497aa81bd43dff5e34e2fab92c6320fac5fdac24479
4
+ data.tar.gz: 68f6fbe88aeb2e3d66d017c286af2a03db7ad37010be01d7ad2e30f677449973
5
5
  SHA512:
6
- metadata.gz: 9e0b673c04e00ef3d7a165829859b18043c3177698aa082a94fdf2e9ba0eae2bd1ea522477a47324529a34580de1829d951dfc8193d16ef4fe92df2ef8627558
7
- data.tar.gz: 1e348688bc7e61fda5881ba0847e6757b1fae1999d3161b962e119e672bd5d735e453096cc3f4826654aee61698b8f3634eebfdb95c2ff9725eacfbbc12a5635
6
+ metadata.gz: 569e77c43c3d605ae0faf606b49955c5ef7e251d0d1f26802ebd77ecb4e2a8ec61dffcf900acf97e5e7d55d76c3fda09d9c77ae55f599a75a95849bdfcb5e584
7
+ data.tar.gz: be2ed294556506213a48090b3cff7028e16643b815a1de58e33007c90c324b26d4a59960a548699ae220f4921782b78ac7c245e0cfcf3f20f5dd845b688d7a4c
@@ -88,11 +88,13 @@ module Google
88
88
  # 01:30 UTC on January 15, 2017.
89
89
  #
90
90
  # In JavaScript, one can convert a Date object to this format using the
91
- # standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
91
+ # standard
92
+ # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
92
93
  # method. In Python, a standard `datetime.datetime` object can be converted
93
- # to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime)
94
- # with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one
95
- # can use the Joda Time's [`ISODateTimeFormat.dateTime()`](
94
+ # to this format using
95
+ # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
96
+ # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
97
+ # the Joda Time's [`ISODateTimeFormat.dateTime()`](
96
98
  # http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D
97
99
  # ) to obtain a formatter capable of generating timestamps in this format.
98
100
  # @!attribute [rw] seconds
@@ -278,11 +278,11 @@ module Google
278
278
  # so the client must query this method to determine if there is a full
279
279
  # hash match of a threat.
280
280
  #
281
+ # @param threat_types [Array<Google::Cloud::Webrisk::V1beta1::ThreatType>]
282
+ # Required. The ThreatLists to search in.
281
283
  # @param hash_prefix [String]
282
284
  # A hash prefix, consisting of the most significant 4-32 bytes of a SHA256
283
285
  # hash. For JSON requests, this field is base64-encoded.
284
- # @param threat_types [Array<Google::Cloud::Webrisk::V1beta1::ThreatType>]
285
- # Required. The ThreatLists to search in.
286
286
  # @param options [Google::Gax::CallOptions]
287
287
  # Overrides the default settings for this call, e.g, timeout,
288
288
  # retries, etc.
@@ -295,16 +295,19 @@ module Google
295
295
  # require "google/cloud/webrisk"
296
296
  #
297
297
  # web_risk_service_v1_beta1_client = Google::Cloud::Webrisk.new(version: :v1beta1)
298
- # response = web_risk_service_v1_beta1_client.search_hashes
298
+ #
299
+ # # TODO: Initialize `threat_types`:
300
+ # threat_types = []
301
+ # response = web_risk_service_v1_beta1_client.search_hashes(threat_types)
299
302
 
300
303
  def search_hashes \
304
+ threat_types,
301
305
  hash_prefix: nil,
302
- threat_types: nil,
303
306
  options: nil,
304
307
  &block
305
308
  req = {
306
- hash_prefix: hash_prefix,
307
- threat_types: threat_types
309
+ threat_types: threat_types,
310
+ hash_prefix: hash_prefix
308
311
  }.delete_if { |_, v| v.nil? }
309
312
  req = Google::Gax::to_proto(req, Google::Cloud::Webrisk::V1beta1::SearchHashesRequest)
310
313
  @search_hashes.call(req, options, &block)
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module Webrisk
19
- VERSION = "0.2.1".freeze
19
+ VERSION = "0.3.0".freeze
20
20
  end
21
21
  end
22
22
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-webrisk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-23 00:00:00.000000000 Z
11
+ date: 2019-10-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-gax