This repository has been archived by the owner on Jun 28, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
313 additions
and
154 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
76 changes: 47 additions & 29 deletions
76
src/main/resources/com/google/api/codegen/nodejs/README.md.snip
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,63 @@ | ||
@snippet generate(metadata) | ||
{@metadata.fullName} for NodeJS | ||
================================================= | ||
|
||
{@metadata.identifier} contains the IDL-generated [grpc][] library for the service: [{@metadata.fullName}] ({@metadata.majorVersion}) defined in the [googleapis][] git repository. | ||
|
||
[googleapis]:https://github.com/googleapis/googleapis/tree/master/{@metadata.protoPath} | ||
[grpc]:http://www.grpc.io/docs/tutorials/basic/node.html | ||
[{@metadata.fullName}]: https://developers.google.com/apis-explorer/?hl=en_US#p/{@metadata.discoveryApiName}/{@metadata.majorVersion}/ | ||
@extends "nodejs/method_sample.snip" | ||
|
||
Getting started | ||
--------------- | ||
|
||
{@metadata.identifier} will allow you to connect to the [{@metadata.fullName}][] and access all its methods. | ||
@snippet generate(metadata) | ||
{@title(metadata)} | ||
|
||
In order to achieve so, you need to set up authentication, as well as install the library locally. | ||
{@quickStart(metadata)} | ||
|
||
{@commonLinkDeclarations(metadata)} | ||
@end | ||
|
||
Setup Authentication | ||
-------------------- | ||
@private title(metadata) | ||
@# NodeJS Client for {@metadata.fullName} ({@metadata.developmentStatus}) | ||
|
||
To authenticate all of your API calls, first install and setup the [Google Cloud SDK][]. | ||
Once done, you can then run the following command in your terminal: | ||
Idiomatic NodeJS client for [{@metadata.fullName}][Product Documentation] | ||
|
||
$ gcloud beta auth application-default login | ||
- [Client Library Documentation][] | ||
- [Product Documentation][] | ||
@end | ||
|
||
or | ||
@private quickStart(metadata) | ||
@## Quick Start | ||
In order to use this library, you first need to go through the following steps: | ||
|
||
$ gcloud auth login | ||
- [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) | ||
- [Enable the {@metadata.shortName} api.](https://console.cloud.google.com/apis/api/{@metadata.shortName}) | ||
- [Setup Authentication.](https://googlecloudplatform.github.io/google-cloud-node/@#/docs/google-cloud/master/guides/authentication) | ||
|
||
Please see the [gcloud beta auth application-default login][] to find documentation showing the difference between these commands. | ||
@### Installation | ||
``` | ||
$ npm install {@metadata.identifier} | ||
``` | ||
|
||
[Google Cloud SDK]: https://cloud.google.com/sdk/ | ||
[gcloud beta auth application-default login]: https://cloud.google.com/sdk/gcloud/reference/beta/auth/application-default/login | ||
@if metadata.exampleMethods | ||
{@exampleMethods(metadata.exampleMethods, metadata)} | ||
|
||
@end | ||
@### Next Steps | ||
- Read the [Client Library Documentation][] for {@metadata.fullName} to see other available methods on the client. | ||
- Read the [{@metadata.fullName} Product documentation][Product Documentation] to learn more about the product and see How-to Guides. | ||
- View this [repository's main README](https://github.com/GoogleCloudPlatform/google-cloud-node/blob/master/README.md) to see the full list of Cloud APIs that we cover. | ||
@end | ||
|
||
Installation | ||
------------------- | ||
@private exampleMethods(methods, metadata) | ||
@if methods | ||
@### Preview | ||
|
||
Install this library using gem: | ||
@end | ||
@join method : methods on BREAK | ||
@#### {@method.apiClassName} | ||
```js | ||
var {@method.apiModuleName} = require('@metadata.identifier').{@metadata.majorVersion}({ | ||
// optional auth parameters. | ||
}); | ||
$ npm install {@metadata.identifier} | ||
{@decorateSampleCode(method, sampleCode(method))} | ||
``` | ||
@end | ||
@end | ||
|
||
At this point you are all set to continue. | ||
@private commonLinkDeclarations(metadata) | ||
[Client Library Documentation]: https://googlecloudplatform.github.io/google-cloud-node/@#/docs/{@metadata.shortName}/latest/{@metadata.shortName} | ||
[Product Documentation]: https://cloud.google.com/{@metadata.shortName} | ||
@end |
Oops, something went wrong.