Cloud Vision V1p3beta1 API - Class Google::Cloud::Vision::V1p3beta1::ImageAnnotator::Rest::Client (v0.10.0)

Reference documentation and code samples for the Cloud Vision V1p3beta1 API class Google::Cloud::Vision::V1p3beta1::ImageAnnotator::Rest::Client.

REST client for the ImageAnnotator service.

Service that performs Google Cloud Vision API detection tasks over client images, such as face, landmark, logo, label, and text detection. The ImageAnnotator service returns detected entities from the images.

Inherits

  • Object

Methods

.configure

def self.configure() { |config| ... } -> Client::Configuration

Configure the ImageAnnotator Client class.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter
Example
# Modify the configuration for all ImageAnnotator clients
::Google::Cloud::Vision::V1p3beta1::ImageAnnotator::Rest::Client.configure do |config|
  config.timeout = 10.0
end

#async_batch_annotate_files

def async_batch_annotate_files(request, options = nil) -> ::Gapic::Operation
def async_batch_annotate_files(requests: nil) -> ::Gapic::Operation

Run asynchronous image detection and annotation for a list of generic files, such as PDF files, which may contain multiple pages and multiple images per page. Progress and results can be retrieved through the google.longrunning.Operations interface. Operation.metadata contains OperationMetadata (metadata). Operation.response contains AsyncBatchAnnotateFilesResponse (results).

Overloads
def async_batch_annotate_files(request, options = nil) -> ::Gapic::Operation
Pass arguments to async_batch_annotate_files via a request object, either of type AsyncBatchAnnotateFilesRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Vision::V1p3beta1::AsyncBatchAnnotateFilesRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def async_batch_annotate_files(requests: nil) -> ::Gapic::Operation
Pass arguments to async_batch_annotate_files via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#batch_annotate_images

def batch_annotate_images(request, options = nil) -> ::Google::Cloud::Vision::V1p3beta1::BatchAnnotateImagesResponse
def batch_annotate_images(requests: nil) -> ::Google::Cloud::Vision::V1p3beta1::BatchAnnotateImagesResponse

Run image detection and annotation for a batch of images.

Overloads
def batch_annotate_images(request, options = nil) -> ::Google::Cloud::Vision::V1p3beta1::BatchAnnotateImagesResponse
Pass arguments to batch_annotate_images via a request object, either of type BatchAnnotateImagesRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Vision::V1p3beta1::BatchAnnotateImagesRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def batch_annotate_images(requests: nil) -> ::Google::Cloud::Vision::V1p3beta1::BatchAnnotateImagesResponse
Pass arguments to batch_annotate_images via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#configure

def configure() { |config| ... } -> Client::Configuration

Configure the ImageAnnotator Client instance.

The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on Client.configure.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter

#initialize

def initialize() { |config| ... } -> Client

Create a new ImageAnnotator REST client object.

Yields
  • (config) — Configure the ImageAnnotator client.
Yield Parameter
Returns
  • (Client) — a new instance of Client
Example
# Create a client using the default configuration
client = ::Google::Cloud::Vision::V1p3beta1::ImageAnnotator::Rest::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::Vision::V1p3beta1::ImageAnnotator::Rest::Client.new do |config|
  config.timeout = 10.0
end

#operations_client

def operations_client() -> ::Google::Cloud::Vision::V1p3beta1::ImageAnnotator::Rest::Operations

Get the associated client for long-running operations.