Skip to content

Commit

Permalink
chore(samples): removing migrated samples (#1083)
Browse files Browse the repository at this point in the history
* chore(samples): removing migrated samples

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* add package.json back

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* chore: remove samples-test.cfg from continuous/node12

* chore: remove samples-test.cfg from presubmit/node12

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* Trying to resolve test failures

* moar test fix

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: meredithslota <meredithslota@google.com>
  • Loading branch information
3 people authored Jan 13, 2023
1 parent c6d1501 commit cd8c486
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 322 deletions.
43 changes: 2 additions & 41 deletions packages/google-cloud-vision/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained].
* [Quickstart](#quickstart)
* [Before you begin](#before-you-begin)
* [Installing the client library](#installing-the-client-library)
* [Using the client library](#using-the-client-library)
* [Samples](#samples)


* [Versioning](#versioning)
* [Contributing](#contributing)
* [License](#license)
Expand All @@ -54,45 +54,6 @@ npm install @google-cloud/vision
```


### Using the client library

```javascript
async function quickstart() {
// Imports the Google Cloud client library
const vision = require('@google-cloud/vision');

// Creates a client
const client = new vision.ImageAnnotatorClient();

// Performs label detection on the image file
const [result] = await client.labelDetection('./resources/wakeupcat.jpg');
const labels = result.labelAnnotations;
console.log('Labels:');
labels.forEach(label => console.log(label.description));
}
quickstart();

```



## Samples

Samples are in the [`samples/`](https://github.com/googleapis/nodejs-vision/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample.

| Sample | Source Code | Try it |
| --------------------------- | --------------------------------- | ------ |
| Async-batch-annotate-images | [source code](https://github.com/googleapis/nodejs-vision/blob/main/samples/async-batch-annotate-images.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/async-batch-annotate-images.js,samples/README.md) |
| Batch-annotate-files-gcs | [source code](https://github.com/googleapis/nodejs-vision/blob/main/samples/batch-annotate-files-gcs.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/batch-annotate-files-gcs.js,samples/README.md) |
| Batch-annotate-files | [source code](https://github.com/googleapis/nodejs-vision/blob/main/samples/batch-annotate-files.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/batch-annotate-files.js,samples/README.md) |
| Detect | [source code](https://github.com/googleapis/nodejs-vision/blob/main/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) |
| Detect.v1p1beta1 | [source code](https://github.com/googleapis/nodejs-vision/blob/main/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) |
| Detect.v1p3beta1 | [source code](https://github.com/googleapis/nodejs-vision/blob/main/samples/detect.v1p3beta1.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.v1p3beta1.js,samples/README.md) |
| Face Detection | [source code](https://github.com/googleapis/nodejs-vision/blob/main/samples/faceDetection.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/faceDetection.js,samples/README.md) |
| Cloud Vision Quickstart | [source code](https://github.com/googleapis/nodejs-vision/blob/main/samples/quickstart.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/quickstart.js,samples/README.md) |
| Cloud Vision Custom API Endpoint | [source code](https://github.com/googleapis/nodejs-vision/blob/main/samples/setEndpoint.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/setEndpoint.js,samples/README.md) |
| Text Detection | [source code](https://github.com/googleapis/nodejs-vision/blob/main/samples/textDetection.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/textDetection.js,samples/README.md) |
| Cloud Vision Face Detection | [source code](https://github.com/googleapis/nodejs-vision/blob/main/samples/vision-face-detection.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/vision-face-detection.js,samples/README.md) |



Expand Down
2 changes: 1 addition & 1 deletion packages/google-cloud-vision/protos/protos.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/google-cloud-vision/protos/protos.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

231 changes: 1 addition & 230 deletions packages/google-cloud-vision/samples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,233 +4,4 @@

# [Google Cloud Vision API: Node.js Samples](https://github.com/googleapis/nodejs-vision)

[![Open in Cloud Shell][shell_img]][shell_link]



## Table of Contents

* [Before you begin](#before-you-begin)
* [Samples](#samples)
* [Async-batch-annotate-images](#async-batch-annotate-images)
* [Batch-annotate-files-gcs](#batch-annotate-files-gcs)
* [Batch-annotate-files](#batch-annotate-files)
* [Detect](#detect)
* [Detect.v1p1beta1](#detect.v1p1beta1)
* [Detect.v1p3beta1](#detect.v1p3beta1)
* [Face Detection](#face-detection)
* [Cloud Vision Quickstart](#cloud-vision-quickstart)
* [Cloud Vision Custom API Endpoint](#cloud-vision-custom-api-endpoint)
* [Text Detection](#text-detection)
* [Cloud Vision Face Detection](#cloud-vision-face-detection)

## Before you begin

Before running the samples, make sure you've followed the steps outlined in
[Using the client library](https://github.com/googleapis/nodejs-vision#using-the-client-library).

`cd samples`

`npm install`

`cd ..`

## Samples



### Async-batch-annotate-images

View the [source code](https://github.com/googleapis/nodejs-vision/blob/main/samples/async-batch-annotate-images.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/async-batch-annotate-images.js,samples/README.md)

__Usage:__


`node samples/async-batch-annotate-images.js`


-----




### Batch-annotate-files-gcs

View the [source code](https://github.com/googleapis/nodejs-vision/blob/main/samples/batch-annotate-files-gcs.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/batch-annotate-files-gcs.js,samples/README.md)

__Usage:__


`node samples/batch-annotate-files-gcs.js`


-----




### Batch-annotate-files

View the [source code](https://github.com/googleapis/nodejs-vision/blob/main/samples/batch-annotate-files.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/batch-annotate-files.js,samples/README.md)

__Usage:__


`node samples/batch-annotate-files.js`


-----




### Detect

View the [source code](https://github.com/googleapis/nodejs-vision/blob/main/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)

__Usage:__


`node samples/detect.js`


-----




### Detect.v1p1beta1

View the [source code](https://github.com/googleapis/nodejs-vision/blob/main/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)

__Usage:__


`node samples/detect.v1p1beta1.js`


-----




### Detect.v1p3beta1

View the [source code](https://github.com/googleapis/nodejs-vision/blob/main/samples/detect.v1p3beta1.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.v1p3beta1.js,samples/README.md)

__Usage:__


`node samples/detect.v1p3beta1.js`


-----




### Face Detection

View the [source code](https://github.com/googleapis/nodejs-vision/blob/main/samples/faceDetection.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/faceDetection.js,samples/README.md)

__Usage:__


`node samples/faceDetection.js`


-----




### Cloud Vision Quickstart

Performs label detection of an image with a cat.

View the [source code](https://github.com/googleapis/nodejs-vision/blob/main/samples/quickstart.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/quickstart.js,samples/README.md)

__Usage:__


`node quickstart.js`


-----




### Cloud Vision Custom API Endpoint

Demonstrates using a custom API endpoint for the Cloud Vision API.

View the [source code](https://github.com/googleapis/nodejs-vision/blob/main/samples/setEndpoint.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/setEndpoint.js,samples/README.md)

__Usage:__


`node setEndpoint.js`


-----




### Text Detection

View the [source code](https://github.com/googleapis/nodejs-vision/blob/main/samples/textDetection.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/textDetection.js,samples/README.md)

__Usage:__


`node samples/textDetection.js`


-----




### Cloud Vision Face Detection

Identify faces in an image using the Cloud Vision API.

View the [source code](https://github.com/googleapis/nodejs-vision/blob/main/samples/vision-face-detection.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/vision-face-detection.js,samples/README.md)

__Usage:__


`node vision-face-detection.js <fileName>`






[shell_img]: https://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
[product-docs]: https://cloud.google.com/vision
All samples have been migrated [here](https://github.com/GoogleCloudPlatform/nodejs-docs-samples/tree/main/vision).
3 changes: 0 additions & 3 deletions packages/google-cloud-vision/samples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
"files": [
"*.js"
],
"scripts": {
"test": "mocha system-test --timeout 600000"
},
"dependencies": {
"@google-cloud/vision": "^3.0.1",
"natural": "^5.0.0",
Expand Down
46 changes: 0 additions & 46 deletions packages/google-cloud-vision/samples/quickstart.js

This file was deleted.

0 comments on commit cd8c486

Please sign in to comment.