Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

translate: promote to GA #2420

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
120 changes: 60 additions & 60 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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]
Expand Down Expand Up @@ -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]
Expand Down Expand Up @@ -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) {});
Expand Down
2 changes: 1 addition & 1 deletion packages/translate/README.md
Original file line number Diff line number Diff line change
@@ -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].*
Expand Down