google-apis-videointelligence_v1p1beta1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,96 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'google/apis/core/base_service'
16
+ require 'google/apis/core/json_representation'
17
+ require 'google/apis/core/hashable'
18
+ require 'google/apis/errors'
19
+
20
+ module Google
21
+ module Apis
22
+ module VideointelligenceV1p1beta1
23
+ # Cloud Video Intelligence API
24
+ #
25
+ # Detects objects, explicit content, and scene changes in videos. It also
26
+ # specifies the region for annotation and transcribes speech to text. Supports
27
+ # both asynchronous API and streaming API.
28
+ #
29
+ # @example
30
+ # require 'google/apis/videointelligence_v1p1beta1'
31
+ #
32
+ # Videointelligence = Google::Apis::VideointelligenceV1p1beta1 # Alias the module
33
+ # service = Videointelligence::CloudVideoIntelligenceService.new
34
+ #
35
+ # @see https://cloud.google.com/video-intelligence/docs/
36
+ class CloudVideoIntelligenceService < Google::Apis::Core::BaseService
37
+ # @return [String]
38
+ # API key. Your API key identifies your project and provides you with API access,
39
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
40
+ attr_accessor :key
41
+
42
+ # @return [String]
43
+ # Available to use for quota purposes for server-side applications. Can be any
44
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
45
+ attr_accessor :quota_user
46
+
47
+ def initialize
48
+ super('https://videointelligence.googleapis.com/', '',
49
+ client_name: 'google-apis-videointelligence_v1p1beta1',
50
+ client_version: Google::Apis::VideointelligenceV1p1beta1::GEM_VERSION)
51
+ @batch_path = 'batch'
52
+ end
53
+
54
+ # Performs asynchronous video annotation. Progress and results can be retrieved
55
+ # through the `google.longrunning.Operations` interface. `Operation.metadata`
56
+ # contains `AnnotateVideoProgress` (progress). `Operation.response` contains `
57
+ # AnnotateVideoResponse` (results).
58
+ # @param [Google::Apis::VideointelligenceV1p1beta1::GoogleCloudVideointelligenceV1p1beta1AnnotateVideoRequest] google_cloud_videointelligence_v1p1beta1_annotate_video_request_object
59
+ # @param [String] fields
60
+ # Selector specifying which fields to include in a partial response.
61
+ # @param [String] quota_user
62
+ # Available to use for quota purposes for server-side applications. Can be any
63
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
64
+ # @param [Google::Apis::RequestOptions] options
65
+ # Request-specific options
66
+ #
67
+ # @yield [result, err] Result & error if block supplied
68
+ # @yieldparam result [Google::Apis::VideointelligenceV1p1beta1::GoogleLongrunningOperation] parsed result object
69
+ # @yieldparam err [StandardError] error object if request failed
70
+ #
71
+ # @return [Google::Apis::VideointelligenceV1p1beta1::GoogleLongrunningOperation]
72
+ #
73
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
74
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
75
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
76
+ def annotate_video(google_cloud_videointelligence_v1p1beta1_annotate_video_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
77
+ command = make_simple_command(:post, 'v1p1beta1/videos:annotate', options)
78
+ command.request_representation = Google::Apis::VideointelligenceV1p1beta1::GoogleCloudVideointelligenceV1p1beta1AnnotateVideoRequest::Representation
79
+ command.request_object = google_cloud_videointelligence_v1p1beta1_annotate_video_request_object
80
+ command.response_representation = Google::Apis::VideointelligenceV1p1beta1::GoogleLongrunningOperation::Representation
81
+ command.response_class = Google::Apis::VideointelligenceV1p1beta1::GoogleLongrunningOperation
82
+ command.query['fields'] = fields unless fields.nil?
83
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
84
+ execute_or_queue_command(command, &block)
85
+ end
86
+
87
+ protected
88
+
89
+ def apply_command_defaults(command)
90
+ command.query['key'] = key unless key.nil?
91
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
92
+ end
93
+ end
94
+ end
95
+ end
96
+ end
metadata ADDED
@@ -0,0 +1,76 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: google-apis-videointelligence_v1p1beta1
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Google LLC
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2021-01-08 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: google-apis-core
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '0.1'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '0.1'
27
+ description: This is the simple REST client for Cloud Video Intelligence API V1p1beta1.
28
+ Simple REST clients are Ruby client libraries that provide access to Google services
29
+ via their HTTP REST API endpoints. These libraries are generated and updated automatically
30
+ based on the discovery documents published by the service, and they handle most
31
+ concerns such as authentication, pagination, retry, timeouts, and logging. You can
32
+ use this client to access the Cloud Video Intelligence API, but note that some services
33
+ may provide a separate modern client that is easier to use.
34
+ email: googleapis-packages@google.com
35
+ executables: []
36
+ extensions: []
37
+ extra_rdoc_files: []
38
+ files:
39
+ - ".yardopts"
40
+ - CHANGELOG.md
41
+ - LICENSE.md
42
+ - OVERVIEW.md
43
+ - lib/google-apis-videointelligence_v1p1beta1.rb
44
+ - lib/google/apis/videointelligence_v1p1beta1.rb
45
+ - lib/google/apis/videointelligence_v1p1beta1/classes.rb
46
+ - lib/google/apis/videointelligence_v1p1beta1/gem_version.rb
47
+ - lib/google/apis/videointelligence_v1p1beta1/representations.rb
48
+ - lib/google/apis/videointelligence_v1p1beta1/service.rb
49
+ homepage: https://github.com/google/google-api-ruby-client
50
+ licenses:
51
+ - Apache-2.0
52
+ metadata:
53
+ bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
54
+ changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-videointelligence_v1p1beta1/CHANGELOG.md
55
+ documentation_uri: https://googleapis.dev/ruby/google-apis-videointelligence_v1p1beta1/v0.1.0
56
+ source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-videointelligence_v1p1beta1
57
+ post_install_message:
58
+ rdoc_options: []
59
+ require_paths:
60
+ - lib
61
+ required_ruby_version: !ruby/object:Gem::Requirement
62
+ requirements:
63
+ - - ">="
64
+ - !ruby/object:Gem::Version
65
+ version: '2.4'
66
+ required_rubygems_version: !ruby/object:Gem::Requirement
67
+ requirements:
68
+ - - ">="
69
+ - !ruby/object:Gem::Version
70
+ version: '0'
71
+ requirements: []
72
+ rubygems_version: 3.1.4
73
+ signing_key:
74
+ specification_version: 4
75
+ summary: Simple REST client for Cloud Video Intelligence API V1p1beta1
76
+ test_files: []