From 0064802ab9b586959b24a61fc18e44ad0558e7cd Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Mon, 20 May 2019 11:27:20 -0700 Subject: [PATCH] docs: generate new samples/README.md, README.md (#268) * 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 --- translate/package.json | 3 ++- translate/quickstart.js | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/translate/package.json b/translate/package.json index 19ab438e92c..5300b63bf51 100644 --- a/translate/package.json +++ b/translate/package.json @@ -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", diff --git a/translate/quickstart.js b/translate/quickstart.js index 1798e4316c6..65d00c900c7 100644 --- a/translate/quickstart.js +++ b/translate/quickstart.js @@ -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'); @@ -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);