-
Notifications
You must be signed in to change notification settings - Fork 592
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add readmes for all packages (#1495)
* add bigquery readme * add all readmes * copy readme as part of release script * gcloud-node -> google-cloud-node * fix youre good to gos * add resource manager scope * exclude unecessary files
- Loading branch information
1 parent
589d525
commit fb21589
Showing
2 changed files
with
56 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# @google-cloud/translate | ||
> 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].* | ||
|
||
- [API Documentation][gcloud-translate-docs] | ||
- [Official Documentation][cloud-translate-docs] | ||
|
||
**An API key is required for Translate.** See [Identifying your application to Google][api-key-howto]. | ||
|
||
|
||
```sh | ||
$ npm install --save @google-cloud/translate | ||
``` | ||
```js | ||
var translate = require('@google-cloud/translate')({ | ||
key: 'API Key' | ||
}); | ||
|
||
// Translate a string of text. | ||
translate.translate('Hello', 'es', function(err, translation) { | ||
if (!err) { | ||
// translation = 'Hola' | ||
} | ||
}); | ||
|
||
// Detect a language from a string of text. | ||
translate.detect('Hello', function(err, results) { | ||
if (!err) { | ||
// results = { | ||
// language: 'en', | ||
// confidence: 1, | ||
// input: 'Hello' | ||
// } | ||
} | ||
}); | ||
|
||
// Get a list of supported languages. | ||
translate.getLanguages(function(err, languages) { | ||
if (!err) { | ||
// languages = [ | ||
// 'af', | ||
// 'ar', | ||
// 'az', | ||
// ... | ||
// ] | ||
} | ||
}); | ||
``` | ||
|
||
|
||
[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 | ||
[cloud-translate-docs]: https://cloud.google.com/translate/docs |
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