google-cloud-vision 0.29.1 → 0.30.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -8
- data/lib/google/cloud/vision/project.rb +71 -0
- data/lib/google/cloud/vision/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 22da0fd34b2e1e637b6d70cd1595e4b84033265e8f237a0a7ab14020fa183284
|
4
|
+
data.tar.gz: 520c3881f0609c5814b9777f4b6364ba0d35f15e6f9dec0dd41a073390cc45e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c603e772de966e7f566537e2197eeabd2404d327f49ed502c14d903beac7ab1a578e1ed4a9475100abdae86936001eb48575bf9ed25c40f70edbdd76145f8dbe
|
7
|
+
data.tar.gz: a357b7e0a0c1f793dbd86b162841df450f4d333082e880820db9500f09b7a0f4e44f28791f866b68d9f04ff358b0f8579ae6e6ceca72aafa7bfb5f81572df4ee
|
data/README.md
CHANGED
@@ -55,14 +55,14 @@ end
|
|
55
55
|
|
56
56
|
## Supported Ruby Versions
|
57
57
|
|
58
|
-
This library is supported on Ruby 2.
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
58
|
+
This library is supported on Ruby 2.3+.
|
59
|
+
|
60
|
+
Google provides official support for Ruby versions that are actively supported
|
61
|
+
by Ruby Core—that is, Ruby versions that are either in normal maintenance or
|
62
|
+
in security maintenance, and not end of life. Currently, this means Ruby 2.3
|
63
|
+
and later. Older versions of Ruby _may_ still work, but are unsupported and not
|
64
|
+
recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details
|
65
|
+
about the Ruby support schedule.
|
66
66
|
|
67
67
|
## Versioning
|
68
68
|
|
@@ -274,6 +274,77 @@ module Google
|
|
274
274
|
return annotations.first if annotations.count == 1
|
275
275
|
annotations
|
276
276
|
end
|
277
|
+
|
278
|
+
##
|
279
|
+
# Run asynchronous image detection and annotation for a list of generic
|
280
|
+
# files, such as PDF files, which may contain multiple pages and
|
281
|
+
# multiple images per page. Progress and results can be retrieved
|
282
|
+
# through the google.longrunning.Operations interface.
|
283
|
+
# Operation.metadata contains OperationMetadata (metadata).
|
284
|
+
# Operation.response contains AsyncBatchAnnotateFilesResponse
|
285
|
+
# (results).
|
286
|
+
#
|
287
|
+
# @param requests
|
288
|
+
# [Array<Google::Cloud::Vision::V1::AsyncAnnotateFileRequest | Hash>]
|
289
|
+
# Individual async file annotation requests for this batch.
|
290
|
+
# A hash of the same form as
|
291
|
+
# `Google::Cloud::Vision::V1::AsyncAnnotateFileRequest` can also be
|
292
|
+
# provided.
|
293
|
+
# @param options [Google::Gax::CallOptions]
|
294
|
+
# Overrides the default settings for this call, e.g, timeout,
|
295
|
+
# retries, etc.
|
296
|
+
# @return [Google::Gax::Operation]
|
297
|
+
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
298
|
+
#
|
299
|
+
# @example
|
300
|
+
# require "google/cloud/vision"
|
301
|
+
#
|
302
|
+
# # Create a new vision client.
|
303
|
+
# vision_client = Google::Cloud::Vision.new project_id: 'project_id'
|
304
|
+
# requests = [{
|
305
|
+
# input_config: {
|
306
|
+
# gcs_source: { uri: 'source_uri' },
|
307
|
+
# mime_type: "application/pdf"
|
308
|
+
# },
|
309
|
+
# features: [{ type: :DOCUMENT_TEXT_DETECTION }],
|
310
|
+
# output_config: {
|
311
|
+
# gcs_destination: { uri: 'destination_uri' },
|
312
|
+
# batch_size: 2
|
313
|
+
# }
|
314
|
+
# }]
|
315
|
+
#
|
316
|
+
# # Register a callback during the method call.
|
317
|
+
# operation = vision_client
|
318
|
+
# .async_batch_annotate_files(requests) do |op|
|
319
|
+
# raise op.results.message if op.error?
|
320
|
+
# op_results = op.results
|
321
|
+
# # Process the results.
|
322
|
+
#
|
323
|
+
# metadata = op.metadata
|
324
|
+
# # Process the metadata.
|
325
|
+
# end
|
326
|
+
#
|
327
|
+
# # Or use the return value to register a callback.
|
328
|
+
# operation.on_done do |op|
|
329
|
+
# raise op.results.message if op.error?
|
330
|
+
# op_results = op.results
|
331
|
+
# # Process the results.
|
332
|
+
#
|
333
|
+
# metadata = op.metadata
|
334
|
+
# # Process the metadata.
|
335
|
+
# end
|
336
|
+
#
|
337
|
+
# # Manually reload the operation.
|
338
|
+
# operation.reload!
|
339
|
+
#
|
340
|
+
# # Or block until the operation completes, triggering callbacks on
|
341
|
+
# # completion.
|
342
|
+
# operation.wait_until_done!
|
343
|
+
#
|
344
|
+
def async_batch_annotate_files requests, options = {}
|
345
|
+
service.service.async_batch_annotate_files requests, options
|
346
|
+
end
|
347
|
+
|
277
348
|
alias mark annotate
|
278
349
|
alias detect annotate
|
279
350
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-vision
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.30.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Moore
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-07-
|
12
|
+
date: 2018-07-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: google-cloud-core
|