@google-cloud/tasks
Advanced tools
Comparing version 2.1.1 to 2.1.2
@@ -7,2 +7,9 @@ # Changelog | ||
### [2.1.2](https://www.github.com/googleapis/nodejs-tasks/compare/v2.1.1...v2.1.2) (2020-10-27) | ||
### Bug Fixes | ||
* **samples:** region tag collided with tasks-api ([#476](https://www.github.com/googleapis/nodejs-tasks/issues/476)) ([fd73aa4](https://www.github.com/googleapis/nodejs-tasks/commit/fd73aa473e60dc9624b7615242099a2bd056f61b)) | ||
### [2.1.1](https://www.github.com/googleapis/nodejs-tasks/compare/v2.1.0...v2.1.1) (2020-09-12) | ||
@@ -9,0 +16,0 @@ |
{ | ||
"name": "@google-cloud/tasks", | ||
"description": "Cloud Tasks API client for Node.js", | ||
"version": "2.1.1", | ||
"version": "2.1.2", | ||
"license": "Apache-2.0", | ||
@@ -54,3 +54,3 @@ "author": "Google LLC", | ||
"@types/sinon": "^9.0.0", | ||
"c8": "^6.0.0", | ||
"c8": "^7.0.0", | ||
"codecov": "^3.0.2", | ||
@@ -68,4 +68,4 @@ "gts": "^2.0.0", | ||
"typescript": "^3.8.3", | ||
"webpack": "^4.41.2", | ||
"webpack-cli": "^3.3.10", | ||
"webpack": "^5.0.0", | ||
"webpack-cli": "^4.0.0", | ||
"@microsoft/api-documenter": "^7.8.10", | ||
@@ -72,0 +72,0 @@ "@microsoft/api-extractor": "^7.8.10" |
@@ -67,41 +67,43 @@ [//]: # "This README.md file is auto-generated, all changes to this file will be lost." | ||
// TODO(developer): Uncomment these lines and replace with your values. | ||
// const project = 'my-project-id'; | ||
// const queue = 'my-appengine-queue'; | ||
// const location = 'us-central1'; | ||
// const payload = 'hello'; | ||
async function quickstart() { | ||
// TODO(developer): Uncomment these lines and replace with your values. | ||
// const project = 'my-project-id'; | ||
// const queue = 'my-appengine-queue'; | ||
// const location = 'us-central1'; | ||
// const payload = 'hello'; | ||
// Construct the fully qualified queue name. | ||
const parent = client.queuePath(project, location, queue); | ||
// Construct the fully qualified queue name. | ||
const parent = client.queuePath(project, location, queue); | ||
const task = { | ||
appEngineHttpRequest: { | ||
httpMethod: 'POST', | ||
relativeUri: '/log_payload', | ||
}, | ||
}; | ||
const task = { | ||
appEngineHttpRequest: { | ||
httpMethod: 'POST', | ||
relativeUri: '/log_payload', | ||
}, | ||
}; | ||
if (payload) { | ||
task.appEngineHttpRequest.body = Buffer.from(payload).toString('base64'); | ||
} | ||
if (payload) { | ||
task.appEngineHttpRequest.body = Buffer.from(payload).toString('base64'); | ||
} | ||
if (inSeconds) { | ||
task.scheduleTime = { | ||
seconds: inSeconds + Date.now() / 1000, | ||
if (inSeconds) { | ||
task.scheduleTime = { | ||
seconds: inSeconds + Date.now() / 1000, | ||
}; | ||
} | ||
const request = { | ||
parent: parent, | ||
task: task, | ||
}; | ||
console.log('Sending task:'); | ||
console.log(task); | ||
// Send create task request. | ||
const [response] = await client.createTask(request); | ||
const name = response.name; | ||
console.log(`Created task ${name}`); | ||
} | ||
quickstart(); | ||
const request = { | ||
parent: parent, | ||
task: task, | ||
}; | ||
console.log('Sending task:'); | ||
console.log(task); | ||
// Send create task request. | ||
const [response] = await client.createTask(request); | ||
const name = response.name; | ||
console.log(`Created task ${name}`); | ||
``` | ||
@@ -108,0 +110,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3770057
196