Skip to content

Commit

Permalink
docs: generate new samples/README.md, README.md (#268)
Browse files Browse the repository at this point in the history
* Add README with instructions to run v3 translate

* Remove extra blank line

* docs: generate new samples/README.md, README.md

* docs: finish porting over changes to samples/README.md

* docs: add issue tracker link

* chore: address code review

* Move region tag
  • Loading branch information
bcoe authored and Ace Nassri committed Nov 17, 2022
1 parent 8b5a980 commit 46cfb74
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion translate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"node": ">=8"
},
"scripts": {
"test": "mocha --recursive --timeout 90000"
"test": "mocha --recursive --timeout 90000",
"test-v3": "mocha ./test/v3beta1/*.js"
},
"dependencies": {
"@google-cloud/automl": "^1.0.0",
Expand Down
6 changes: 3 additions & 3 deletions translate/quickstart.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@

'use strict';

// [START translate_quickstart]
async function quickstart(
async function main(
projectId = 'YOUR_PROJECT_ID' // Your GCP Project Id
) {
// [START translate_quickstart]
// Imports the Google Cloud client library
const {Translate} = require('@google-cloud/translate');

Expand All @@ -39,4 +39,4 @@ async function quickstart(
// [END translate_quickstart]

const args = process.argv.slice(2);
quickstart(...args).catch(console.error);
main(...args).catch(console.error);

0 comments on commit 46cfb74

Please sign in to comment.