From b9b7dfab6f59788a64194ab8747d856a937f1d3e Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Fri, 30 Jun 2017 16:22:23 -0400 Subject: [PATCH] translate: promote to GA (#2420) --- README.md | 120 +++++++++++++++++------------------ packages/translate/README.md | 2 +- 2 files changed, 61 insertions(+), 61 deletions(-) diff --git a/README.md b/README.md index fc5c04f4265..f51eb4f616a 100644 --- a/README.md +++ b/README.md @@ -14,12 +14,12 @@ This client supports the following Google Cloud Platform services at a [General * [Cloud Datastore](#cloud-datastore-ga) (GA) * [Cloud Storage](#cloud-storage-ga) (GA) +* [Cloud Translation API](#cloud-translation-api-ga) (GA) * [Google Stackdriver Logging](#google-stackdriver-logging-ga) (GA) This client supports the following Google Cloud Platform services at a [Beta](#versioning) quality level: * [Cloud Natural Language](#cloud-natural-language-beta) (Beta) -* [Cloud Translation API](#cloud-translation-api-beta) (Beta) * [Cloud Vision](#cloud-vision-beta) (Beta) * [Google BigQuery](#google-bigquery-beta) (Beta) @@ -280,6 +280,64 @@ localReadStream.pipe(remoteWriteStream); ``` +## Cloud Translation API (GA) + +- [API Documentation][gcloud-translate-docs] +- [Official Documentation][cloud-translate-docs] + +#### Using the Google Translate API module + +``` +$ npm install --save @google-cloud/translate +``` + +```js +var translate = require('@google-cloud/translate'); +``` + +#### Preview + +```js +// Authenticating on a per-API-basis. You don't need to do this if you auth on a +// global basis (see Authentication section above). + +var translateClient = translate({ + projectId: 'grape-spaceship-123', + keyFilename: '/path/to/keyfile.json' +}); + +// Translate a string of text. +translateClient.translate('Hello', 'es', function(err, translation) { + if (!err) { + // translation = 'Hola' + } +}); + +// Detect a language from a string of text. +translateClient.detect('Hello', function(err, results) { + if (!err) { + // results = { + // language: 'en', + // confidence: 1, + // input: 'Hello' + // } + } +}); + +// Get a list of supported languages. +translateClient.getLanguages(function(err, languages) { + if (!err) { + // languages = [ + // 'af', + // 'ar', + // 'az', + // ... + // ] + } +}); +``` + + ## Google Stackdriver Logging (GA) - [API Documentation][gcloud-logging-docs] @@ -472,64 +530,6 @@ document.annotate(function(err, annotation) { ``` -## Cloud Translation API (Beta) - -- [API Documentation][gcloud-translate-docs] -- [Official Documentation][cloud-translate-docs] - -#### Using the Google Translate API module - -``` -$ npm install --save @google-cloud/translate -``` - -```js -var translate = require('@google-cloud/translate'); -``` - -#### Preview - -```js -// Authenticating on a per-API-basis. You don't need to do this if you auth on a -// global basis (see Authentication section above). - -var translateClient = translate({ - projectId: 'grape-spaceship-123', - keyFilename: '/path/to/keyfile.json' -}); - -// Translate a string of text. -translateClient.translate('Hello', 'es', function(err, translation) { - if (!err) { - // translation = 'Hola' - } -}); - -// Detect a language from a string of text. -translateClient.detect('Hello', function(err, results) { - if (!err) { - // results = { - // language: 'en', - // confidence: 1, - // input: 'Hello' - // } - } -}); - -// Get a list of supported languages. -translateClient.getLanguages(function(err, languages) { - if (!err) { - // languages = [ - // 'af', - // 'ar', - // 'az', - // ... - // ] - } -}); -``` - - ## Cloud Vision (Beta) - [API Documentation][gcloud-vision-docs] @@ -795,7 +795,7 @@ var nsRecord = zone.record('ns', { data: 'ns-cloud1.googledomains.com.' }); -zone.addRecords([nsRecord], function(err, change) {}); +zone.addRecords([nsRecord], function(err, change) {}); // Create a zonefile from the records in your zone. zone.export('/zonefile.zone', function(err) {}); diff --git a/packages/translate/README.md b/packages/translate/README.md index bd42fc19f3d..f9f96add1a9 100644 --- a/packages/translate/README.md +++ b/packages/translate/README.md @@ -1,4 +1,4 @@ -# @google-cloud/translate ([Beta][versioning]) +# @google-cloud/translate ([GA][versioning]) > Cloud Translation API Client Library for Node.js *Looking for more Google APIs than just Translation? You might want to check out [`google-cloud`][google-cloud].*