Skip to content

Commit

Permalink
Upgrade repo-tools and regenerate scaffolding. (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmdobry authored and stephenplusplus committed Oct 30, 2017
1 parent e18b315 commit 877eb75
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 19 deletions.
42 changes: 26 additions & 16 deletions video-intelligence/analyze.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@ function analyzeFaces(gcsUri) {
// Imports the Google Cloud Video Intelligence library
const video = require('@google-cloud/video-intelligence');

// Instantiates a client
// Creates a client
const client = new video.VideoIntelligenceServiceClient();

// The GCS filepath of the video to analyze
// const gcsUri = 'gs://my-bucket/my-video.mp4';
/**
* TODO(developer): Uncomment the following line before running the sample.
*/
// const gcsUri = 'GCS URI of the video to analyze, e.g. gs://my-bucket/my-video.mp4';

const request = {
inputUri: gcsUri,
Expand Down Expand Up @@ -83,11 +85,13 @@ function analyzeLabelsGCS(gcsUri) {
// Imports the Google Cloud Video Intelligence library
const video = require('@google-cloud/video-intelligence');

// Instantiates a client
// Creates a client
const client = new video.VideoIntelligenceServiceClient();

// The GCS filepath of the video to analyze
// const gcsUri = 'gs://my-bucket/my-video.mp4';
/**
* TODO(developer): Uncomment the following line before running the sample.
*/
// const gcsUri = 'GCS URI of the video to analyze, e.g. gs://my-bucket/my-video.mp4';

const request = {
inputUri: gcsUri,
Expand Down Expand Up @@ -147,11 +151,13 @@ function analyzeLabelsLocal(path) {
const video = require('@google-cloud/video-intelligence');
const fs = require('fs');

// Instantiates a client
// Creates a client
const client = new video.VideoIntelligenceServiceClient();

// The local filepath of the video to analyze
// const path = 'my-file.mp4';
/**
* TODO(developer): Uncomment the following line before running the sample.
*/
// const path = 'Local file to analyze, e.g. ./my-file.mp4';

// Reads a local video file and converts it to base64
const file = fs.readFileSync(path);
Expand Down Expand Up @@ -215,11 +221,13 @@ function analyzeShots(gcsUri) {
// Imports the Google Cloud Video Intelligence library
const video = require('@google-cloud/video-intelligence');

// Instantiates a client
// Creates a client
const client = new video.VideoIntelligenceServiceClient();

// The GCS filepath of the video to analyze
// const gcsUri = 'gs://my-bucket/my-video.mp4';
/**
* TODO(developer): Uncomment the following line before running the sample.
*/
// const gcsUri = 'GCS URI of file to analyze, e.g. gs://my-bucket/my-video.mp4';

const request = {
inputUri: gcsUri,
Expand Down Expand Up @@ -284,11 +292,13 @@ function analyzeSafeSearch(gcsUri) {
// Imports the Google Cloud Video Intelligence library
const video = require('@google-cloud/video-intelligence');

// Instantiates a client
// Creates a client
const client = new video.VideoIntelligenceServiceClient();

// The GCS filepath of the video to analyze
// const gcsUri = 'gs://my-bucket/my-video.mp4';
/**
* TODO(developer): Uncomment the following line before running the sample.
*/
// const gcsUri = 'GCS URI of video to analyze, e.g. gs://my-bucket/my-video.mp4';

const request = {
inputUri: gcsUri,
Expand Down Expand Up @@ -345,7 +355,7 @@ function analyzeSafeSearch(gcsUri) {
// [END analyze_safe_search]
}

require(`yargs`) // eslint-disable-line
require(`yargs`)
.demand(1)
.command(
`faces <gcsUri>`,
Expand Down
4 changes: 2 additions & 2 deletions video-intelligence/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"yargs": "10.0.3"
},
"devDependencies": {
"@google-cloud/nodejs-repo-tools": "2.0.11",
"ava": "0.22.0"
"@google-cloud/nodejs-repo-tools": "2.1.0",
"ava": "0.23.0"
}
}
2 changes: 1 addition & 1 deletion video-intelligence/quickstart.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const videoIntelligence = require('@google-cloud/video-intelligence');
// Creates a client
const client = new videoIntelligence.VideoIntelligenceServiceClient();

// The GCS filepath of the video to analyze
// The GCS uri of the video to analyze
const gcsUri = 'gs://nodejs-docs-samples-video/quickstart_short.mp4';

// Construct request
Expand Down

0 comments on commit 877eb75

Please sign in to comment.