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

Commit 0853696

Browse files
Benjamin E. CoeJustinBeckwith
authored andcommitted
feat: add .repo-metadata.json and generate README (#255)
1 parent 899c982 commit 0853696

12 files changed

Lines changed: 146 additions & 319 deletions

.cloud-repo-tools.json

Lines changed: 0 additions & 51 deletions
This file was deleted.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ system-test/secrets.js
88
system-test/*key.json
99
*.lock
1010
package-lock.json
11+
__pycache__/

.readme-partials.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
introduction: |-
2+
[Cloud Natural Language API](https://cloud.google.com/natural-language/docs) provides natural
3+
language understanding technologies to developers, including sentiment analysis, entity
4+
analysis, and syntax analysis. This API is part of the larger Cloud Machine Learning API family.

.repo-metadata.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"name": "language",
3+
"name_pretty": "Natural Language",
4+
"product_documentation": "https://cloud.google.com/natural-language/docs/",
5+
"client_documentation": "https://cloud.google.com/nodejs/docs/reference/language/latest/",
6+
"issue_tracker": "https://issuetracker.google.com/savedsearches/559753",
7+
"release_level": "ga",
8+
"language": "nodejs",
9+
"repo": "googleapis/nodejs-language",
10+
"distribution_name": "@google-cloud/language",
11+
"api_id": "language.googleapis.com",
12+
"requires_billing": true
13+
}
14+

README.md

Lines changed: 51 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,63 @@
11
[//]: # "This README.md file is auto-generated, all changes to this file will be lost."
2-
[//]: # "To regenerate it, use `npm run generate-scaffolding`."
2+
[//]: # "To regenerate it, use `python -m synthtool`."
33
<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"/>
44

5-
# [Google Cloud Natural Language API: Node.js Client](https://github.com/googleapis/nodejs-language)
5+
# [Natural Language: Node.js Client](https://github.com/googleapis/nodejs-language)
66

7-
[![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style&#x3D;flat)](https://cloud.google.com/terms/launch-stages)
7+
[![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages)
88
[![npm version](https://img.shields.io/npm/v/@google-cloud/language.svg)](https://www.npmjs.org/package/@google-cloud/language)
99
[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-language/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-language)
1010

11-
[Cloud Natural Language API](https://cloud.google.com/natural-language/docs) provides natural language understanding technologies to developers, including sentiment analysis, entity analysis, and syntax analysis. This API is part of the larger Cloud Machine Learning API family.
1211

1312

14-
* [Using the client library](#using-the-client-library)
13+
14+
[Cloud Natural Language API](https://cloud.google.com/natural-language/docs) provides natural
15+
language understanding technologies to developers, including sentiment analysis, entity
16+
analysis, and syntax analysis. This API is part of the larger Cloud Machine Learning API family.
17+
18+
19+
* [Natural Language Node.js Client API Reference][client-docs]
20+
* [Natural Language Documentation][product-docs]
21+
* [github.com/googleapis/nodejs-language](https://github.com/googleapis/nodejs-language)
22+
23+
Read more about the client libraries for Cloud APIs, including the older
24+
Google APIs Client Libraries, in [Client Libraries Explained][explained].
25+
26+
[explained]: https://cloud.google.com/apis/docs/client-libraries-explained
27+
28+
**Table of contents:**
29+
30+
31+
* [Quickstart](#quickstart)
32+
* [Before you begin](#before-you-begin)
33+
* [Installing the client library](#installing-the-client-library)
34+
* [Using the client library](#using-the-client-library)
1535
* [Samples](#samples)
1636
* [Versioning](#versioning)
1737
* [Contributing](#contributing)
1838
* [License](#license)
1939

20-
## Using the client library
40+
## Quickstart
2141

22-
1. [Select or create a Cloud Platform project][projects].
42+
### Before you begin
2343

44+
1. [Select or create a Cloud Platform project][projects].
2445
1. [Enable billing for your project][billing].
25-
26-
1. [Enable the Google Cloud Natural Language API API][enable_api].
27-
46+
1. [Enable the Natural Language API][enable_api].
2847
1. [Set up authentication with a service account][auth] so you can access the
2948
API from your local workstation.
3049

31-
1. Install the client library:
50+
### Installing the client library
51+
52+
```bash
53+
npm install @google-cloud/language
54+
```
3255

33-
npm install --save @google-cloud/language
3456

35-
1. Try an example:
57+
### Using the client library
3658

3759
```javascript
38-
async function main() {
60+
async function quickstart() {
3961
// Imports the Google Cloud client library
4062
const language = require('@google-cloud/language');
4163

@@ -59,36 +81,42 @@ async function main() {
5981
console.log(`Sentiment magnitude: ${sentiment.magnitude}`);
6082
}
6183

62-
main().catch(console.error);
6384
```
6485

86+
87+
6588
## Samples
6689

6790
Samples are in the [`samples/`](https://github.com/googleapis/nodejs-language/tree/master/samples) directory. The samples' `README.md`
6891
has instructions for running the samples.
6992

7093
| Sample | Source Code | Try it |
7194
| --------------------------- | --------------------------------- | ------ |
95+
| Automl Natural Language Dataset | [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/automlNaturalLanguageDataset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/automlNaturalLanguageDataset.js,samples/README.md) |
96+
| Automl Natural Language Model | [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/automlNaturalLanguageModel.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/automlNaturalLanguageModel.js,samples/README.md) |
97+
| Automl Natural Language Predict | [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/automlNaturalLanguagePredict.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/automlNaturalLanguagePredict.js,samples/README.md) |
7298
| Quickstart | [source code](https://github.com/googleapis/nodejs-language/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-language&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) |
73-
| Analyze v1 | [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/analyze.v1.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/analyze.v1.js,samples/README.md) |
74-
| Analyze v1beta2 | [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/analyze.v1beta2.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/analyze.v1beta2.js,samples/README.md) |
75-
| AutoML Dataset | [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/automl/automlNaturalLanguageDataset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/automl/automlNaturalLanguageDataset.js,samples/README.md) |
76-
| AutoML Model | [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/automl/automlNaturalLanguageModel.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/automl/automlNaturalLanguageModel.js,samples/README.md) |
77-
| AutoML Predict | [source code](https://github.com/googleapis/nodejs-language/blob/master/samples/automl/automlNaturalLanguagePredict.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-language&page=editor&open_in_editor=samples/automl/automlNaturalLanguagePredict.js,samples/README.md) |
7899

79-
The [Natural Language API Node.js Client API Reference][client-docs] documentation
100+
101+
102+
The [Natural Language Node.js Client API Reference][client-docs] documentation
80103
also contains samples.
81104

82105
## Versioning
83106

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

109+
86110
This library is considered to be **General Availability (GA)**. This means it
87111
is stable; the code surface will not change in backwards-incompatible ways
88112
unless absolutely necessary (e.g. because of critical security issues) or with
89113
an extensive deprecation period. Issues and requests against **GA** libraries
90114
are addressed with the highest priority.
91115

116+
117+
118+
119+
92120
More Information: [Google Cloud Platform Launch Stages][launch_stages]
93121

94122
[launch_stages]: https://cloud.google.com/terms/launch-stages
@@ -103,21 +131,10 @@ Apache Version 2.0
103131

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

106-
## What's Next
107-
108-
* [Natural Language API Documentation][product-docs]
109-
* [Natural Language API Node.js Client API Reference][client-docs]
110-
* [github.com/googleapis/nodejs-language](https://github.com/googleapis/nodejs-language)
111-
112-
Read more about the client libraries for Cloud APIs, including the older
113-
Google APIs Client Libraries, in [Client Libraries Explained][explained].
114-
115-
[explained]: https://cloud.google.com/apis/docs/client-libraries-explained
116-
117134
[client-docs]: https://cloud.google.com/nodejs/docs/reference/language/latest/
118-
[product-docs]: https://cloud.google.com/natural-language/docs
135+
[product-docs]: https://cloud.google.com/natural-language/docs/
119136
[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png
120137
[projects]: https://console.cloud.google.com/project
121138
[billing]: https://support.google.com/cloud/answer/6293499#enable-billing
122139
[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=language.googleapis.com
123-
[auth]: https://cloud.google.com/docs/authentication/getting-started
140+
[auth]: https://cloud.google.com/docs/authentication/getting-started

package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,22 +32,20 @@
3232
"scripts": {
3333
"cover": "nyc --reporter=lcov mocha test/*.js && nyc report",
3434
"docs": "jsdoc -c .jsdoc.js",
35-
"generate-scaffolding": "repo-tools generate all && repo-tools generate lib_samples_readme -l samples/ --config ../.cloud-repo-tools.json",
3635
"lint": "eslint '**/*.js'",
3736
"samples-test": "cd samples/ && npm test && cd ../",
3837
"system-test": "mocha system-test/*.js --timeout 600000",
3938
"test-no-cover": "mocha test/*.js",
4039
"test": "npm run cover",
4140
"fix": "eslint --fix '**/*.js'",
42-
"docs-test": "linkinator docs -r --skip www.googleapis.com",
41+
"docs-test": "linkinator docs -r --skip https://github.com/googleapis/nodejs-language/blob/master/samples/.+",
4342
"predocs-test": "npm run docs"
4443
},
4544
"dependencies": {
4645
"google-gax": "^1.0.0",
4746
"lodash.merge": "^4.6.1"
4847
},
4948
"devDependencies": {
50-
"@google-cloud/nodejs-repo-tools": "^3.0.0",
5149
"codecov": "^3.0.2",
5250
"eslint": "^5.0.0",
5351
"eslint-config-prettier": "^4.0.0",

0 commit comments

Comments
 (0)