Skip to content

Commit c7c1d71

Browse files
author
Ace Nassri
committed
Massage package.json + generate README
1 parent 230bbe2 commit c7c1d71

File tree

2 files changed

+35
-22
lines changed

2 files changed

+35
-22
lines changed

video/README.md

+19-19
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,27 @@
22

33
# Google Cloud Video Intelligence API Node.js Samples
44

5-
The [Cloud Video Intelligence API][video_docs] allows developers to easily
6-
integrate video analysis within applications, including video labeling, safe search
7-
, and shot change detection.
5+
[![Build](https://storage.googleapis.com/cloud-docs-samples-badges/GoogleCloudPlatform/nodejs-docs-samples/nodejs-docs-samples-videointelligence.svg)]()
86

9-
[video_docs]: https://cloud.google.com/video-intelligence/docs/
7+
The [Cloud Video Intelligence API](https://cloud.google.com/video-intelligence) allows developers to use Google video analysis technology as part of their applications.
108

119
## Table of Contents
1210

1311
* [Setup](#setup)
1412
* [Samples](#samples)
15-
* [Analyze](#analyze)
13+
* [Video Intelligence](#video-intelligence)
1614
* [Running the tests](#running-the-tests)
1715

1816
## Setup
1917

2018
1. Read [Prerequisites][prereq] and [How to run a sample][run] first.
2119
1. Install dependencies:
2220

23-
With `npm`:
21+
With **npm**:
2422

2523
npm install
2624

27-
With `yarn`:
25+
With **yarn**:
2826

2927
yarn install
3028

@@ -33,45 +31,47 @@ integrate video analysis within applications, including video labeling, safe sea
3331

3432
## Samples
3533

36-
### Analyze
34+
### Video Intelligence
3735

38-
View the [documentation][analyze_docs] or the [source code][analyze_code].
36+
View the [documentation][video_0_docs] or the [source code][video_0_code].
3937

4038
__Usage:__ `node analyze.js --help`
4139

4240
```
4341
Commands:
42+
faces <gcsUri> Analyzes faces in a video stored in Google Cloud Storage using the Cloud Video Intelligence API.
4443
shots <gcsUri> Analyzes shot angles in a video stored in Google Cloud Storage using the Cloud Video
4544
Intelligence API.
4645
labels-gcs <gcsUri> Labels objects in a video stored in Google Cloud Storage using the Cloud Video Intelligence API.
4746
labels-file <gcsUri> Labels objects in a video stored locally using the Cloud Video Intelligence API.
47+
safe-search <gcsUri> Detects adult content in a video stored in Google Cloud Storage.
4848
4949
Options:
5050
--help Show help [boolean]
5151
5252
Examples:
53-
node analyze.js shots gs://my-bucket/my-video.mp4
54-
node analyze.js labels-gcs gs://my-bucket/my-video.mp4
55-
node analyze.js labels-file my-video.mp4
56-
node analyze.js unsafe-content gs://my-bucket/my-video.mp4
53+
node analyze.js faces gs://demomaker/volleyball_court.mp4
54+
node analyze.js shots gs://demomaker/volleyball_court.mp4
55+
node analyze.js labels-gcs gs://demomaker/volleyball_court.mp4
56+
node analyze.js labels-file cat.mp4
57+
node analyze.js safe-search gs://demomaker/volleyball_court.mp4
5758
5859
For more information, see https://cloud.google.com/video-intelligence/docs
5960
```
6061

61-
[analyze_docs]: https://cloud.google.com/video-intelligence/docs
62-
[analyze_code]: analyze.js
62+
[video_0_docs]: https://cloud.google.com/video-intelligence/docs
63+
[video_0_code]: analyze.js
6364

6465
## Running the tests
6566

66-
1. Set the `GCLOUD_PROJECT` and `GOOGLE_APPLICATION_CREDENTIALS` environment
67-
variables.
67+
1. Set the **GCLOUD_PROJECT** and **GOOGLE_APPLICATION_CREDENTIALS** environment variables.
6868

6969
1. Run the tests:
7070

71-
With `npm`:
71+
With **npm**:
7272

7373
npm test
7474

75-
With `yarn`:
75+
With **yarn**:
7676

7777
yarn test

video/package.json

+16-3
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,27 @@
1919
},
2020
"dependencies": {
2121
"@google-cloud/videointelligence": "https://storage.googleapis.com/videointelligence-alpha/videointelligence-nodejs.tar.gz",
22+
"googleapis": "19.0.0",
23+
"safe-buffer": "5.0.1",
2224
"yargs": "7.1.0"
2325
},
2426
"devDependencies": {
25-
"@google-cloud/nodejs-repo-tools": "1.4.7",
26-
"ava": "0.19.1"
27+
"@google-cloud/nodejs-repo-tools": "1.4.13",
28+
"ava": "0.19.1",
29+
"proxyquire": "1.7.11"
2730
},
2831
"cloud-repo-tools": {
2932
"requiresKeyFile": true,
30-
"requiresProjectId": true
33+
"requiresProjectId": true,
34+
"product": "video",
35+
"samples": [
36+
{
37+
"id": "video",
38+
"name": "Video Intelligence",
39+
"file": "analyze.js",
40+
"docs_link": "https://cloud.google.com/video-intelligence/docs",
41+
"usage": "node analyze.js --help"
42+
}
43+
]
3144
}
3245
}

0 commit comments

Comments
 (0)