Skip to content
This repository has been archived by the owner on Jul 20, 2023. It is now read-only.

Commit

Permalink
Add v1p1beta1 samples (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rebecca Taylor authored and lukesneeringer committed Dec 5, 2017
1 parent a4a8ce5 commit b823b79
Show file tree
Hide file tree
Showing 10 changed files with 195 additions and 555 deletions.
7 changes: 7 additions & 0 deletions .cloud-repo-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@
"file": "detect.js",
"docs_link": "https://cloud.google.com/vision/docs",
"usage": "node detect.js --help"
},
{
"id": "detect.v1p1beta1.js",
"name": "Detection samples for Beta API",
"file": "detect.v1p1beta1.js",
"docs_link": "https://cloud.google.com/vision/docs",
"usage": "node detect.v1p1beta1.js --help"
}
]
}
1 change: 1 addition & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ Song Wang <songwang@google.com>
Stephen Sawchuk <sawchuk@gmail.com>
Tim Swast <swast@google.com>
calibr <awcalibr@gmail.com>
Rebecca Taylor <remily@google.com>
rtw <rtw1981@gmail.com>
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ has instructions for running the samples.
| Sample | Source Code | Try it |
| --------------------------- | --------------------------------- | ------ |
| Detection samples | [source code](https://github.com/googleapis/nodejs-vision/blob/master/samples/detect.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-vision&page=editor&open_in_editor=samples/detect.js,samples/README.md) |
| Detection samples for Beta API | [source code](https://github.com/googleapis/nodejs-vision/blob/master/samples/detect.v1p1beta1.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-vision&page=editor&open_in_editor=samples/detect.v1p1beta1.js,samples/README.md) |

The [Vision API Node.js Client API Reference][client-docs] documentation
also contains samples.
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"Stephen Sawchuk <sawchuk@gmail.com>",
"Tim Swast <swast@google.com>",
"calibr <awcalibr@gmail.com>",
"Rebecca Taylor <remily@google.com>",
"rtw <rtw1981@gmail.com>"
],
"scripts": {
Expand Down
35 changes: 35 additions & 0 deletions samples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ The [Cloud Vision API](https://cloud.google.com/vision/docs) allows developers t
* [Before you begin](#before-you-begin)
* [Samples](#samples)
* [Detection samples](#detection-samples)
* [Detection samples for Beta API](#detection-samples-for-beta-api)

## Before you begin

Expand Down Expand Up @@ -86,5 +87,39 @@ For more information, see https://cloud.google.com/vision/docs
[detect_0_docs]: https://cloud.google.com/vision/docs
[detect_0_code]: detect.js

### Detection samples for Beta API

View the [source code][detect.v1p1beta1.js_1_code].

[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-vision&page=editor&open_in_editor=samples/detect.v1p1beta1.js,samples/README.md)

__Usage:__ `node detect.v1p1beta1.js --help`

```
detect.v1p1beta1.js <command>
Commands:
detect.v1p1beta1.js web-entities-geo <fileName> Detects web entities with improved results using geographic metadata
detect.v1p1beta1.js safe-search <fileName> Detects safe search properties including additional racy category
detect.v1p1beta1.js web <fileName> Detects web entities including new best guess labels describing
content
detect.v1p1beta1.js fulltext <fileName> Extracts full text from an image file including new confidence scores
Options:
--version Show version number [boolean]
--help Show help [boolean]
Examples:
node detect.v1p1beta1.js safe-search ./resources/wakeupcat.jpg
node detect.v1p1beta1.js web-entities-geo ./resources/city.jpg
node detect.v1p1beta1.js web ./resources/wakeupcat.jpg
node detect.v1p1beta1.js fulltext ./resources/wakeupcat.jpg
For more information, see https://cloud.google.com/vision/docs
```

[detect.v1p1beta1.js_1_docs]: https://cloud.google.com/vision/docs
[detect.v1p1beta1.js_1_code]: detect.v1p1beta1.js

[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png
[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-vision&page=editor&open_in_editor=samples/README.md
Loading

0 comments on commit b823b79

Please sign in to comment.