google-cloud-webrisk 0.2.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2f574345a46e7931b9059497aa81bd43dff5e34e2fab92c6320fac5fdac24479
|
|
4
|
+
data.tar.gz: 68f6fbe88aeb2e3d66d017c286af2a03db7ad37010be01d7ad2e30f677449973
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
|
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
|
|
94
|
-
#
|
|
95
|
-
#
|
|
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
|
-
#
|
|
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
|
-
|
|
307
|
-
|
|
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)
|
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.
|
|
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-
|
|
11
|
+
date: 2019-10-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: google-gax
|