Skip to content

Commit

Permalink
add readmes for all packages (#1495)
Browse files Browse the repository at this point in the history
* 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
stephenplusplus authored and callmehiphop committed Aug 26, 2016
1 parent 589d525 commit fb21589
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 1 deletion.
55 changes: 55 additions & 0 deletions packages/google-cloud-translate/README.md
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
2 changes: 1 addition & 1 deletion packages/google-cloud-translate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@google-cloud/translate",
"version": "0.1.1",
"author": "Google Inc.",
"description": "Google Cloud Translate Client Library for Node.js",
"description": "Google Translate API Client Library for Node.js",
"contributors": [
{
"name": "Burcu Dogan",
Expand Down

0 comments on commit fb21589

Please sign in to comment.