6.0.0 • Published 4 years ago
@datafire/google_taskqueue v6.0.0
@datafire/google_taskqueue
Client library for TaskQueue
Installation and Usage
npm install --save @datafire/google_taskqueue
let google_taskqueue = require('@datafire/google_taskqueue').create({
access_token: "",
refresh_token: "",
client_id: "",
client_secret: "",
redirect_uri: ""
});
.then(data => {
console.log(data);
});
Description
Accesses a Google App Engine Pull Task Queue over REST.
Actions
oauthCallback
Exchange the code passed to your redirect URI for an access_token
google_taskqueue.oauthCallback({
"code": ""
}, context)
Input
- input
object
- code required
string
- code required
Output
- output
object
- access_token
string
- refresh_token
string
- token_type
string
- scope
string
- expiration
string
- access_token
oauthRefresh
Exchange a refresh_token for an access_token
google_taskqueue.oauthRefresh(null, context)
Input
This action has no parameters
Output
- output
object
- access_token
string
- refresh_token
string
- token_type
string
- scope
string
- expiration
string
- access_token
taskqueues.get
Get detailed information about a TaskQueue.
google_taskqueue.taskqueues.get({
"project": "",
"taskqueue": ""
}, context)
Input
- input
object
- getStats
boolean
: Whether to get stats. Optional. - project required
string
: The project under which the queue lies. - taskqueue required
string
: The id of the taskqueue to get the properties of. - alt
string
(values: json): Data format for the response. - fields
string
: Selector specifying which fields to include in a partial response. - key
string
: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. - oauth_token
string
: OAuth 2.0 token for the current user. - prettyPrint
boolean
: Returns response with indentations and line breaks. - quotaUser
string
: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided. - userIp
string
: IP address of the site where the request originates. Use this if you want to enforce per-user limits.
- getStats
Output
- output TaskQueue
tasks.list
List Tasks in a TaskQueue
google_taskqueue.tasks.list({
"project": "",
"taskqueue": ""
}, context)
Input
- input
object
- project required
string
: The project under which the queue lies. - taskqueue required
string
: The id of the taskqueue to list tasks from. - alt
string
(values: json): Data format for the response. - fields
string
: Selector specifying which fields to include in a partial response. - key
string
: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. - oauth_token
string
: OAuth 2.0 token for the current user. - prettyPrint
boolean
: Returns response with indentations and line breaks. - quotaUser
string
: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided. - userIp
string
: IP address of the site where the request originates. Use this if you want to enforce per-user limits.
- project required
Output
- output Tasks2
tasks.insert
Insert a new task in a TaskQueue
google_taskqueue.tasks.insert({
"project": "",
"taskqueue": ""
}, context)
Input
- input
object
- body Task
- project required
string
: The project under which the queue lies - taskqueue required
string
: The taskqueue to insert the task into - alt
string
(values: json): Data format for the response. - fields
string
: Selector specifying which fields to include in a partial response. - key
string
: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. - oauth_token
string
: OAuth 2.0 token for the current user. - prettyPrint
boolean
: Returns response with indentations and line breaks. - quotaUser
string
: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided. - userIp
string
: IP address of the site where the request originates. Use this if you want to enforce per-user limits.
Output
- output Task
tasks.lease
Lease 1 or more tasks from a TaskQueue.
google_taskqueue.tasks.lease({
"leaseSecs": 0,
"numTasks": 0,
"project": "",
"taskqueue": ""
}, context)
Input
- input
object
- groupByTag
boolean
: When true, all returned tasks will have the same tag - leaseSecs required
integer
: The lease in seconds. - numTasks required
integer
: The number of tasks to lease. - project required
string
: The project under which the queue lies. - tag
string
: The tag allowed for tasks in the response. Must only be specified if group_by_tag is true. If group_by_tag is true and tag is not specified the tag will be that of the oldest task by eta, i.e. the first available tag - taskqueue required
string
: The taskqueue to lease a task from. - alt
string
(values: json): Data format for the response. - fields
string
: Selector specifying which fields to include in a partial response. - key
string
: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. - oauth_token
string
: OAuth 2.0 token for the current user. - prettyPrint
boolean
: Returns response with indentations and line breaks. - quotaUser
string
: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided. - userIp
string
: IP address of the site where the request originates. Use this if you want to enforce per-user limits.
- groupByTag
Output
- output Tasks
tasks.delete
Delete a task from a TaskQueue.
google_taskqueue.tasks.delete({
"project": "",
"task": "",
"taskqueue": ""
}, context)
Input
- input
object
- project required
string
: The project under which the queue lies. - task required
string
: The id of the task to delete. - taskqueue required
string
: The taskqueue to delete a task from. - alt
string
(values: json): Data format for the response. - fields
string
: Selector specifying which fields to include in a partial response. - key
string
: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. - oauth_token
string
: OAuth 2.0 token for the current user. - prettyPrint
boolean
: Returns response with indentations and line breaks. - quotaUser
string
: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided. - userIp
string
: IP address of the site where the request originates. Use this if you want to enforce per-user limits.
- project required
Output
Output schema unknown
tasks.get
Get a particular task from a TaskQueue.
google_taskqueue.tasks.get({
"project": "",
"task": "",
"taskqueue": ""
}, context)
Input
- input
object
- project required
string
: The project under which the queue lies. - task required
string
: The task to get properties of. - taskqueue required
string
: The taskqueue in which the task belongs. - alt
string
(values: json): Data format for the response. - fields
string
: Selector specifying which fields to include in a partial response. - key
string
: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. - oauth_token
string
: OAuth 2.0 token for the current user. - prettyPrint
boolean
: Returns response with indentations and line breaks. - quotaUser
string
: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided. - userIp
string
: IP address of the site where the request originates. Use this if you want to enforce per-user limits.
- project required
Output
- output Task
tasks.patch
Update tasks that are leased out of a TaskQueue. This method supports patch semantics.
google_taskqueue.tasks.patch({
"newLeaseSeconds": 0,
"project": "",
"task": "",
"taskqueue": ""
}, context)
Input
- input
object
- body Task
- newLeaseSeconds required
integer
: The new lease in seconds. - project required
string
: The project under which the queue lies. - task required
string
- taskqueue required
string
- alt
string
(values: json): Data format for the response. - fields
string
: Selector specifying which fields to include in a partial response. - key
string
: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. - oauth_token
string
: OAuth 2.0 token for the current user. - prettyPrint
boolean
: Returns response with indentations and line breaks. - quotaUser
string
: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided. - userIp
string
: IP address of the site where the request originates. Use this if you want to enforce per-user limits.
Output
- output Task
tasks.update
Update tasks that are leased out of a TaskQueue.
google_taskqueue.tasks.update({
"newLeaseSeconds": 0,
"project": "",
"task": "",
"taskqueue": ""
}, context)
Input
- input
object
- body Task
- newLeaseSeconds required
integer
: The new lease in seconds. - project required
string
: The project under which the queue lies. - task required
string
- taskqueue required
string
- alt
string
(values: json): Data format for the response. - fields
string
: Selector specifying which fields to include in a partial response. - key
string
: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. - oauth_token
string
: OAuth 2.0 token for the current user. - prettyPrint
boolean
: Returns response with indentations and line breaks. - quotaUser
string
: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided. - userIp
string
: IP address of the site where the request originates. Use this if you want to enforce per-user limits.
Output
- output Task
Definitions
Task
- Task
object
- enqueueTimestamp
string
: Time (in seconds since the epoch) at which the task was enqueued. - id
string
: Name of the task. - kind
string
: The kind of object returned, in this case set to task. - leaseTimestamp
string
: Time (in seconds since the epoch) at which the task lease will expire. This value is 0 if the task isnt currently leased out to a worker. - payloadBase64
string
: A bag of bytes which is the task payload. The payload on the JSON side is always Base64 encoded. - queueName
string
: Name of the queue that the task is in. - retry_count
integer
: The number of leases applied to this task. - tag
string
: Tag for the task, could be used later to lease tasks grouped by a specific tag.
- enqueueTimestamp
TaskQueue
- TaskQueue
object
- acl
object
: ACLs that are applicable to this TaskQueue object.- adminEmails
array
: Email addresses of users who are "admins" of the TaskQueue. This means they can control the queue, eg set ACLs for the queue.- items
string
- items
- consumerEmails
array
: Email addresses of users who can "consume" tasks from the TaskQueue. This means they can Dequeue and Delete tasks from the queue.- items
string
- items
- producerEmails
array
: Email addresses of users who can "produce" tasks into the TaskQueue. This means they can Insert tasks into the queue.- items
string
- items
- adminEmails
- id
string
: Name of the taskqueue. - kind
string
: The kind of REST object returned, in this case taskqueue. - maxLeases
integer
: The number of times we should lease out tasks before giving up on them. If unset we lease them out forever until a worker deletes the task. - stats
object
: Statistics for the TaskQueue object in question.- leasedLastHour
string
: Number of tasks leased in the last hour. - leasedLastMinute
string
: Number of tasks leased in the last minute. - oldestTask
string
: The timestamp (in seconds since the epoch) of the oldest unfinished task. - totalTasks
integer
: Number of tasks in the queue.
- leasedLastHour
- acl
Tasks
- Tasks
object
- items
array
: The actual list of tasks returned as a result of the lease operation.- items Task
- kind
string
: The kind of object returned, a list of tasks.
- items
Tasks2
- Tasks2
object
- items
array
: The actual list of tasks currently active in the TaskQueue.- items Task
- kind
string
: The kind of object returned, a list of tasks.
- items