From 877eb752b3ed091d57bdced6c04caf6a6fef6ae1 Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Mon, 30 Oct 2017 06:18:36 -0700 Subject: [PATCH] Upgrade repo-tools and regenerate scaffolding. (#8) --- video-intelligence/analyze.js | 42 ++++++++++++++++++++------------ video-intelligence/package.json | 4 +-- video-intelligence/quickstart.js | 2 +- 3 files changed, 29 insertions(+), 19 deletions(-) diff --git a/video-intelligence/analyze.js b/video-intelligence/analyze.js index c654d29125..1638affd0e 100644 --- a/video-intelligence/analyze.js +++ b/video-intelligence/analyze.js @@ -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, @@ -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, @@ -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); @@ -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, @@ -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, @@ -345,7 +355,7 @@ function analyzeSafeSearch(gcsUri) { // [END analyze_safe_search] } -require(`yargs`) // eslint-disable-line +require(`yargs`) .demand(1) .command( `faces `, diff --git a/video-intelligence/package.json b/video-intelligence/package.json index 7c130ad61a..78f0cead59 100644 --- a/video-intelligence/package.json +++ b/video-intelligence/package.json @@ -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" } } diff --git a/video-intelligence/quickstart.js b/video-intelligence/quickstart.js index 511a62ecc0..a2297806e6 100644 --- a/video-intelligence/quickstart.js +++ b/video-intelligence/quickstart.js @@ -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