Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Video-intelligence: Regeneration #2428

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions packages/video-intelligence/README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# Node.js Client for Google Cloud Video Intelligence API ([Alpha](https://github.com/GoogleCloudPlatform/google-cloud-node#versioning))
# Node.js Client for Google Cloud Video Intelligence API ([Beta](https://github.com/GoogleCloudPlatform/google-cloud-node#versioning))

Idiomatic Node.js client for [Google Cloud Video Intelligence API][Product Documentation]
[Google Cloud Video Intelligence API][Product Documentation]: Google Cloud Video Intelligence API.
- [Client Library Documentation][]
- [Product Documentation][]

## Quick Start
In order to use this library, you first need to go through the following steps:

1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
2. [Enable the video-intelligence api.](https://console.cloud.google.com/apis/api/video-intelligence)
2. [Enable the Google Cloud Video Intelligence API.](https://console.cloud.google.com/apis/api/video-intelligence)
3. [Setup Authentication.](https://googlecloudplatform.github.io/google-cloud-node/#/docs/google-cloud/master/guides/authentication)

### Installation
```
$ npm install @google-cloud/video-intelligence
$ npm install --save @google-cloud/videointelligence
```

### Next Steps
Expand All @@ -22,4 +22,4 @@ $ npm install @google-cloud/video-intelligence
- View this [repository's main README](https://github.com/GoogleCloudPlatform/google-cloud-node/blob/master/README.md) to see the full list of Cloud APIs that we cover.

[Client Library Documentation]: https://googlecloudplatform.github.io/google-cloud-node/#/docs/video-intelligence
[Product Documentation]: https://cloud.google.com/video-intelligence
[Product Documentation]: https://cloud.google.com/video-intelligence
17 changes: 9 additions & 8 deletions packages/video-intelligence/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"repository": "GoogleCloudPlatform/google-cloud-node",
"name": "@google-cloud/video-intelligence",
"version": "0.1.0",
"author": "Google Inc",
Expand All @@ -7,10 +8,8 @@
"files": [
"src",
"AUTHORS",
"CONTRIBUTORS",
"COPYING"
],
"repository": "googlecloudplatform/google-cloud-node",
"keywords": [
"google apis client",
"google api client",
Expand All @@ -20,20 +19,22 @@
"google cloud platform",
"google cloud",
"cloud",
"google video intelligence",
"video intelligence",
"video"
"google video-intelligence",
"video-intelligence",
"Google Cloud Video Intelligence API"
],
"dependencies": {
"extend": "^3.0.0",
"google-proto-files": "^0.12.0",
"google-gax": "^0.13.2",
"google-proto-files": "^0.12.0"
"extend": "^3.0.0"
},
"devDependencies": {
"mocha": "^3.2.0"
"mocha": "^3.2.0",
"through2": "^2.0.3"
},
"scripts": {
"publish-module": "node ../../scripts/publish.js video-intelligence",
"smoke-test": "mocha smoke-test/*.js --timeout 5000",
"test": "mocha test/*.js"
},
"license": "Apache-2.0",
Expand Down
78 changes: 33 additions & 45 deletions packages/video-intelligence/src/index.js
Original file line number Diff line number Diff line change
@@ -1,72 +1,60 @@
/*
* Copyright 2017 Google Inc. All rights reserved.
* Copyright 2017, Google Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/*!
* @module video-intelligence
*/

'use strict';

var v1beta1 = require('./v1beta1/index.js');
var extend = require('extend');
var gapic = {
v1beta1: require('./v1beta1')
};
var gaxGrpc = require('google-gax').grpc();

const VERSION = require('../package.json').version;

/**
* [Google Cloud Video Intelligence API](https://cloud.google.com/video-intelligence)
* makes videos searchable, and discoverable, by extracting metadata with an
* easy to use REST API. You can now search every moment of every video file in
* your catalog and find every occurrence as well as its significance. It
* quickly annotates videos stored in Google Cloud Storage, and helps you
* identify key nouns entities of your video, and when they occur within the
* video. Separate signal from noise, by retrieving relevant information at the
* video, shot or per frame.
*
* <h2>This is an auto-generated API</h2>
*
* It does not follow the conventions you're familiar with from other parts of
* our library. A handwritten layer is not yet available.
* Create an videoIntelligenceServiceClient with additional helpers for common
* tasks.
*
* The example below shows you how to instantiate the generated client. For
* further documentation, please browse the
* [Video Intelligence .proto files](https://github.com/googleapis/googleapis/blob/master/google/cloud/videointelligence/v1beta1/video_intelligence.proto)
* on GitHub.
* Service that implements Google Cloud Video Intelligence API.
*
* @constructor
* @alias module:video-intelligence
*
* @resource [Cloud Video Intelligence](https://cloud.google.com/video-intelligence)
*
* @param {object} options - [Configuration object](#/docs).
* @param {number=} options.port - The port on which to connect to the remote
* host.
* @param {string=} options.servicePath - The domain name of the API remote
* host.
* @param {object=} options - [Configuration object](#/docs).
* @param {number=} options.port - The port on which to connect to
* the remote host.
* @param {string=} options.servicePath - The domain name of the
* API remote host.
*/
function VideoIntelligence(options) {
function videoIntelligenceV1beta1(options) {
// Define the header options.
options = options || {};
options.libName = 'gccl';
options.libVersion = VERSION;
options = extend({}, options, {
libName: 'gccl',
libVersion: VERSION
});

// Create the image annotator client with the provided options.
var client = v1beta1(options).videoIntelligenceServiceClient(options);
// Create the client with the provided options.
var client = gapic.v1beta1(options).videoIntelligenceServiceClient(options);
return client;
}

// The default export should be the latest version.
// Assign all versions as version properties on the default.
module.exports = VideoIntelligence;
module.exports.v1beta1 = v1beta1;
var v1beta1Protos = {};

extend(v1beta1Protos, gaxGrpc.load([{
root: require('google-proto-files')('..'),
file: 'google/cloud/videointelligence/v1beta1/video_intelligence.proto'
}]).google.cloud.videointelligence.v1beta1);

module.exports = videoIntelligenceV1beta1;
module.exports.types = v1beta1Protos;
module.exports.v1beta1 = videoIntelligenceV1beta1;
module.exports.v1beta1.types = v1beta1Protos;
121 changes: 121 additions & 0 deletions packages/video-intelligence/src/v1beta1/doc/doc_google_protobuf_any.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
/*
* Copyright 2017, Google Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/*
* Note: this file is purely for documentation. Any contents are not expected
* to be loaded as the JS file.
*/

/**
* `Any` contains an arbitrary serialized protocol buffer message along with a
* URL that describes the type of the serialized message.
*
* Protobuf library provides support to pack/unpack Any values in the form
* of utility functions or additional generated methods of the Any type.
*
* Example 1: Pack and unpack a message in C++.
*
* Foo foo = ...;
* Any any;
* any.PackFrom(foo);
* ...
* if (any.UnpackTo(&foo)) {
* ...
* }
*
* Example 2: Pack and unpack a message in Java.
*
* Foo foo = ...;
* Any any = Any.pack(foo);
* ...
* if (any.is(Foo.class)) {
* foo = any.unpack(Foo.class);
* }
*
* Example 3: Pack and unpack a message in Python.
*
* foo = Foo(...)
* any = Any()
* any.Pack(foo)
* ...
* if any.Is(Foo.DESCRIPTOR):
* any.Unpack(foo)
* ...
*
* The pack methods provided by protobuf library will by default use
* 'type.googleapis.com/full.type.name' as the type URL and the unpack
* methods only use the fully qualified type name after the last '/'
* in the type URL, for example "foo.bar.com/x/y.z" will yield type
* name "y.z".
*
*
* # JSON
*
* The JSON representation of an `Any` value uses the regular
* representation of the deserialized, embedded message, with an
* additional field `@type` which contains the type URL. Example:
*
* package google.profile;
* message Person {
* string first_name = 1;
* string last_name = 2;
* }
*
* {
* "@type": "type.googleapis.com/google.profile.Person",
* "firstName": <string>,
* "lastName": <string>
* }
*
* If the embedded message type is well-known and has a custom JSON
* representation, that representation will be embedded adding a field
* `value` which holds the custom JSON in addition to the `@type`
* field. Example (for message {@link google.protobuf.Duration}):
*
* {
* "@type": "type.googleapis.com/google.protobuf.Duration",
* "value": "1.212s"
* }
*
* @external "google.protobuf.Any"
* @property {string} typeUrl
* A URL/resource name whose content describes the type of the
* serialized protocol buffer message.
*
* For URLs which use the scheme `http`, `https`, or no scheme, the
* following restrictions and interpretations apply:
*
* * If no scheme is provided, `https` is assumed.
* * The last segment of the URL's path must represent the fully
* qualified name of the type (as in `path/google.protobuf.Duration`).
* The name should be in a canonical form (e.g., leading "." is
* not accepted).
* * An HTTP GET on the URL must yield a {@link google.protobuf.Type}
* value in binary format, or produce an error.
* * Applications are allowed to cache lookup results based on the
* URL, or have them precompiled into a binary to avoid any
* lookup. Therefore, binary compatibility needs to be preserved
* on changes to types. (Use versioned type names to manage
* breaking changes.)
*
* Schemes other than `http`, `https` (or the empty scheme) might be
* used with implementation specific semantics.
*
* @property {string} value
* Must be a valid serialized protocol buffer of the above specified type.
*
* @see [google.protobuf.Any definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/any.proto}
*/
Loading