Cloud Video Intelligence V1 API - Class Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Rest::Client (v0.9.0)

Reference documentation and code samples for the Cloud Video Intelligence V1 API class Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Rest::Client.

REST client for the VideoIntelligenceService service.

Service that implements the Video Intelligence API.

Inherits

  • Object

Methods

.configure

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

Configure the VideoIntelligenceService 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 VideoIntelligenceService clients
::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Rest::Client.configure do |config|
  config.timeout = 10.0
end

#annotate_video

def annotate_video(request, options = nil) -> ::Gapic::Operation
def annotate_video(input_uri: nil, input_content: nil, features: nil, video_context: nil, output_uri: nil, location_id: nil) -> ::Gapic::Operation

Performs asynchronous video annotation. Progress and results can be retrieved through the google.longrunning.Operations interface. Operation.metadata contains AnnotateVideoProgress (progress). Operation.response contains AnnotateVideoResponse (results).

Overloads
def annotate_video(request, options = nil) -> ::Gapic::Operation
Pass arguments to annotate_video via a request object, either of type AnnotateVideoRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::VideoIntelligence::V1::AnnotateVideoRequest, ::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 annotate_video(input_uri: nil, input_content: nil, features: nil, video_context: nil, output_uri: nil, location_id: nil) -> ::Gapic::Operation
Pass arguments to annotate_video 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).
Parameters
  • input_uri (::String) — Input video location. Currently, only Cloud Storage URIs are supported. URIs must be specified in the following format: gs://bucket-id/object-id (other URI formats return [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see Request URIs. To identify multiple videos, a video URI may include wildcards in the object-id. Supported wildcards: '*' to match 0 or more characters; '?' to match 1 character. If unset, the input video should be embedded in the request as input_content. If set, input_content must be unset.
  • input_content (::String) — The video data bytes. If unset, the input video(s) should be specified via the input_uri. If set, input_uri must be unset.
  • features (::Array<::Google::Cloud::VideoIntelligence::V1::Feature>) — Required. Requested video annotation features.
  • video_context (::Google::Cloud::VideoIntelligence::V1::VideoContext, ::Hash) — Additional video context and/or feature-specific parameters.
  • output_uri (::String) — Optional. Location where the output (in JSON format) should be stored. Currently, only Cloud Storage URIs are supported. These must be specified in the following format: gs://bucket-id/object-id (other URI formats return [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see Request URIs.
  • location_id (::String) — Optional. Cloud region where annotation should take place. Supported cloud regions are: us-east1, us-west1, europe-west1, asia-east1. If no region is specified, the region will be determined based on video file location.
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.

#configure

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

Configure the VideoIntelligenceService 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 VideoIntelligenceService REST client object.

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

# Create a client using a custom configuration
client = ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Rest::Client.new do |config|
  config.timeout = 10.0
end

#operations_client

def operations_client() -> ::Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Rest::Operations

Get the associated client for long-running operations.