Skip to content

Commit

Permalink
build: use repo metadata to generate the readme (#389)
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinBeckwith authored May 29, 2019
1 parent 4cd1129 commit 5c1ae7b
Show file tree
Hide file tree
Showing 7 changed files with 140 additions and 177 deletions.
23 changes: 0 additions & 23 deletions packages/google-cloud-vision/.cloud-repo-tools.json

This file was deleted.

3 changes: 1 addition & 2 deletions packages/google-cloud-vision/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ system-test/secrets.js
system-test/*key.json
*.lock
.DS_Store
google-cloud-logging-winston-*.tgz
google-cloud-logging-bunyan-*.tgz
__pycache__
package-lock.json
.vscode
13 changes: 13 additions & 0 deletions packages/google-cloud-vision/.repo-metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "vision",
"name_pretty": "Google Cloud Vision API",
"product_documentation": "https://cloud.google.com/vision",
"client_documentation": "https://cloud.google.com/nodejs/docs/reference/vision/latest/",
"issue_tracker": "https://issuetracker.google.com/savedsearches/559765",
"release_level": "beta",
"language": "nodejs",
"repo": "googleapis/nodejs-vision",
"distribution_name": "@google-cloud/vision",
"api_id": "vision.googleapis.com",
"requires_billing": true
}
75 changes: 48 additions & 27 deletions packages/google-cloud-vision/README.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,58 @@
[//]: # "This README.md file is auto-generated, all changes to this file will be lost."
[//]: # "To regenerate it, use `npm run generate-scaffolding`."
[//]: # "To regenerate it, use `python -m synthtool`."
<img src="https://avatars2.githubusercontent.com/u/2810941?v=3&s=96" alt="Google Cloud Platform logo" title="Google Cloud Platform" align="right" height="96" width="96"/>

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

[![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style&#x3D;flat)](https://cloud.google.com/terms/launch-stages)
[![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages)
[![npm version](https://img.shields.io/npm/v/@google-cloud/vision.svg)](https://www.npmjs.org/package/@google-cloud/vision)
[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-vision/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-vision)

The [Cloud Vision API](https://cloud.google.com/vision/docs) allows developers to easily integrate vision detection features within applications, including image labeling, face and landmark detection, optical character recognition (OCR), and tagging of explicit content.


* [Using the client library](#using-the-client-library)

Google Cloud Vision API client for Node.js


* [Google Cloud Vision API Node.js Client API Reference][client-docs]
* [Google Cloud Vision API Documentation][product-docs]
* [github.com/googleapis/nodejs-vision](https://github.com/googleapis/nodejs-vision)

Read more about the client libraries for Cloud APIs, including the older
Google APIs Client Libraries, in [Client Libraries Explained][explained].

[explained]: https://cloud.google.com/apis/docs/client-libraries-explained

**Table of contents:**


* [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)

## Using the client library
## Quickstart

1. [Select or create a Cloud Platform project][projects].
### Before you begin

1. [Select or create a Cloud Platform project][projects].
1. [Enable billing for your project][billing].

1. [Enable the Google Cloud Vision API API][enable_api].

1. [Set up authentication with a service account][auth] so you can access the
API from your local workstation.

1. Install the client library:
### Installing the client library

```bash
npm install @google-cloud/vision
```

npm install --save @google-cloud/vision

1. Try an example:
### Using the client library

```javascript
async function quickstart() {
Expand All @@ -48,30 +68,42 @@ async function quickstart() {
console.log('Labels:');
labels.forEach(label => console.log(label.description));
}

```



## Samples

Samples are in the [`samples/`](https://github.com/googleapis/nodejs-vision/tree/master/samples) directory. The samples' `README.md`
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) |
| Detect | [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) |
| Face Detection | [source code](https://github.com/googleapis/nodejs-vision/blob/master/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) |
| Quickstart | [source code](https://github.com/googleapis/nodejs-vision/blob/master/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) |
| Text Detection | [source code](https://github.com/googleapis/nodejs-vision/blob/master/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) |



The [Vision API Node.js Client API Reference][client-docs] documentation
The [Google Cloud Vision API Node.js Client API Reference][client-docs] documentation
also contains samples.

## Versioning

This library follows [Semantic Versioning](http://semver.org/).



This library is considered to be in **beta**. This means it is expected to be
mostly stable while we work toward a general availability release; however,
complete stability is not guaranteed. We will address issues and requests
against beta libraries with a high priority.




More Information: [Google Cloud Platform Launch Stages][launch_stages]

[launch_stages]: https://cloud.google.com/terms/launch-stages
Expand All @@ -86,21 +118,10 @@ Apache Version 2.0

See [LICENSE](https://github.com/googleapis/nodejs-vision/blob/master/LICENSE)

## What's Next

* [Vision API Documentation][product-docs]
* [Vision API Node.js Client API Reference][client-docs]
* [github.com/googleapis/nodejs-vision](https://github.com/googleapis/nodejs-vision)

Read more about the client libraries for Cloud APIs, including the older
Google APIs Client Libraries, in [Client Libraries Explained][explained].

[explained]: https://cloud.google.com/apis/docs/client-libraries-explained

[client-docs]: https://cloud.google.com/nodejs/docs/reference/vision/latest/
[product-docs]: https://cloud.google.com/vision/docs
[product-docs]: https://cloud.google.com/vision
[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png
[projects]: https://console.cloud.google.com/project
[billing]: https://support.google.com/cloud/answer/6293499#enable-billing
[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=vision.googleapis.com
[auth]: https://cloud.google.com/docs/authentication/getting-started
[auth]: https://cloud.google.com/docs/authentication/getting-started
5 changes: 1 addition & 4 deletions packages/google-cloud-vision/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,12 @@
"Google Cloud Vision API"
],
"scripts": {
"cover": "nyc --reporter=lcov mocha test/*.js && nyc report",
"docs": "jsdoc -c .jsdoc.js",
"generate-scaffolding": "repo-tools generate all && repo-tools generate lib_samples_readme -l samples/ --config ../.cloud-repo-tools.json",
"lint": "eslint '**/*.js'",
"samples-test": "cd samples/ && npm link ../ && npm test && cd ../",
"system-test": "mocha system-test/*.js smoke-test/*.js --timeout 600000",
"test-no-cover": "mocha test/*.js",
"test": "npm run cover",
"test": "nyc mocha",
"fix": "eslint --fix '**/*.js'",
"docs-test": "linkinator docs -r --skip www.googleapis.com",
"predocs-test": "npm run docs"
Expand All @@ -48,7 +46,6 @@
"protobufjs": "^6.8.6"
},
"devDependencies": {
"@google-cloud/nodejs-repo-tools": "^3.0.0",
"@google-cloud/storage": "^2.0.0",
"codecov": "^3.0.2",
"eslint": "^5.0.1",
Expand Down
Loading

0 comments on commit 5c1ae7b

Please sign in to comment.