Skip to content

Commit

Permalink
prepare READMEs for beta release (#1864)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenplusplus authored and callmehiphop committed Dec 8, 2016
1 parent 6122cca commit 1f4d734
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 17 deletions.
18 changes: 7 additions & 11 deletions packages/google-cloud-translate/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @google-cloud/translate
# @google-cloud/translate ([Alpha][versioning])
> Google Translate API Client Library for Node.js
*Looking for more Google APIs than just Translate? You might want to check out [`google-cloud`][google-cloud].*
Expand Down Expand Up @@ -62,24 +62,18 @@ var translate = require('@google-cloud/translate')({

It's incredibly easy to get authenticated and start using Google's APIs. You can set your credentials on a global basis as well as on a per-API basis. See each individual API section below to see how you can auth on a per-API-basis. This is useful if you want to use different accounts for different Google Cloud services.

### On Google Compute Engine
### On Google Cloud Platform

If you are running this client on Google Compute Engine, we handle authentication for you with no configuration. You just need to make sure that when you [set up the GCE instance][gce-how-to], you add the correct scopes for the APIs you want to access.
If you are running this client on Google Cloud Platform, we handle authentication for you with no configuration. You just need to make sure that when you [set up the GCE instance][gce-how-to], you add the correct scopes for the APIs you want to access.

``` js
// Authenticating on a global basis.
var projectId = process.env.GCLOUD_PROJECT; // E.g. 'grape-spaceship-123'

var translate = require('@google-cloud/translate')({
projectId: projectId
});

var translate = require('@google-cloud/translate')();
// ...you're good to go!
```

### With a Google Developers Service Account

If you are not running this client on Google Compute Engine, you need a Google Developers service account. To create a service account:
If you are not running this client on Google Cloud Platform, you need a Google Developers service account. To create a service account:

1. Visit the [Google Developers Console][dev-console].
2. Create a new project or click on an existing project.
Expand Down Expand Up @@ -128,6 +122,8 @@ var translate = require('@google-cloud/translate')({
// ...you're good to go!
```


[versioning]: https://github.com/GoogleCloudPlatform/google-cloud-node#versioning
[google-cloud]: https://github.com/GoogleCloudPlatform/google-cloud-node/
[api-key-howto]: https://cloud.google.com/translate/v2/using_rest#auth
[gcloud-translate-docs]: https://googlecloudplatform.github.io/google-cloud-node/#/docs/translate
Expand Down
6 changes: 0 additions & 6 deletions packages/google-cloud-translate/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,12 @@ var PKG = require('../package.json');
* The Google Translate API lets websites and programs integrate with Google
* Translate programmatically.
*
* Google Translate API is available as a paid service. See the
* [Pricing](https://cloud.google.com/translate/v2/pricing.html) and
* [FAQ](https://cloud.google.com/translate/v2/faq.html) pages for details.
*
* @constructor
* @alias module:translate
*
* @resource [Getting Started]{@link https://cloud.google.com/translate/v2/getting_started}
* @resource [Identifying your application to Google]{@link https://cloud.google.com/translate/v2/using_rest#auth}
*
* @throws {Error} If an API key is not provided.
*
* @param {object} options - [Configuration object](#/docs).
* @param {string=} options.key - An API key.
*
Expand Down

0 comments on commit 1f4d734

Please sign in to comment.