From fb215897d7f1abf52a4cd7a6e0980aac6f5c2bfb Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Fri, 26 Aug 2016 13:25:29 -0400 Subject: [PATCH] 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 --- packages/google-cloud-translate/README.md | 55 ++++++++++++++++++++ packages/google-cloud-translate/package.json | 2 +- 2 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 packages/google-cloud-translate/README.md diff --git a/packages/google-cloud-translate/README.md b/packages/google-cloud-translate/README.md new file mode 100644 index 00000000000..759c8c55f58 --- /dev/null +++ b/packages/google-cloud-translate/README.md @@ -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 diff --git a/packages/google-cloud-translate/package.json b/packages/google-cloud-translate/package.json index 4ebdbf60728..f5c25beca9e 100644 --- a/packages/google-cloud-translate/package.json +++ b/packages/google-cloud-translate/package.json @@ -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",