1
// Package taskqueue provides access to the TaskQueue API.
3
// See https://developers.google.com/appengine/docs/python/taskqueue/rest
7
// import "google.golang.org/api/taskqueue/v1beta2"
9
// taskqueueService, err := taskqueue.New(oauthHttpClient)
17
"google.golang.org/api/googleapi"
25
// Always reference these packages, just in case the auto-generated code
27
var _ = bytes.NewBuffer
30
var _ = json.NewDecoder
33
var _ = googleapi.Version
35
var _ = strings.Replace
37
const apiId = "taskqueue:v1beta2"
38
const apiName = "taskqueue"
39
const apiVersion = "v1beta2"
40
const basePath = "https://www.googleapis.com/taskqueue/v1beta2/projects/"
42
// OAuth2 scopes used by this API.
44
// Manage your Tasks and Taskqueues
45
TaskqueueScope = "https://www.googleapis.com/auth/taskqueue"
47
// Consume Tasks from your Taskqueues
48
TaskqueueConsumerScope = "https://www.googleapis.com/auth/taskqueue.consumer"
51
func New(client *http.Client) (*Service, error) {
53
return nil, errors.New("client is nil")
55
s := &Service{client: client, BasePath: basePath}
56
s.Taskqueues = NewTaskqueuesService(s)
57
s.Tasks = NewTasksService(s)
63
BasePath string // API endpoint base URL
65
Taskqueues *TaskqueuesService
70
func NewTaskqueuesService(s *Service) *TaskqueuesService {
71
rs := &TaskqueuesService{s: s}
75
type TaskqueuesService struct {
79
func NewTasksService(s *Service) *TasksService {
80
rs := &TasksService{s: s}
84
type TasksService struct {
89
// EnqueueTimestamp: Time (in seconds since the epoch) at which the task
91
EnqueueTimestamp int64 `json:"enqueueTimestamp,omitempty,string"`
93
// Id: Name of the task.
94
Id string `json:"id,omitempty"`
96
// Kind: The kind of object returned, in this case set to task.
97
Kind string `json:"kind,omitempty"`
99
// LeaseTimestamp: Time (in seconds since the epoch) at which the task
100
// lease will expire. This value is 0 if the task isnt currently leased
102
LeaseTimestamp int64 `json:"leaseTimestamp,omitempty,string"`
104
// PayloadBase64: A bag of bytes which is the task payload. The payload
105
// on the JSON side is always Base64 encoded.
106
PayloadBase64 string `json:"payloadBase64,omitempty"`
108
// QueueName: Name of the queue that the task is in.
109
QueueName string `json:"queueName,omitempty"`
111
// Retry_count: The number of leases applied to this task.
112
Retry_count int64 `json:"retry_count,omitempty"`
114
// Tag: Tag for the task, could be used later to lease tasks grouped by
116
Tag string `json:"tag,omitempty"`
119
type TaskQueue struct {
120
// Acl: ACLs that are applicable to this TaskQueue object.
121
Acl *TaskQueueAcl `json:"acl,omitempty"`
123
// Id: Name of the taskqueue.
124
Id string `json:"id,omitempty"`
126
// Kind: The kind of REST object returned, in this case taskqueue.
127
Kind string `json:"kind,omitempty"`
129
// MaxLeases: The number of times we should lease out tasks before
130
// giving up on them. If unset we lease them out forever until a worker
132
MaxLeases int64 `json:"maxLeases,omitempty"`
134
// Stats: Statistics for the TaskQueue object in question.
135
Stats *TaskQueueStats `json:"stats,omitempty"`
138
type TaskQueueAcl struct {
139
// AdminEmails: Email addresses of users who are "admins" of the
140
// TaskQueue. This means they can control the queue, eg set ACLs for the
142
AdminEmails []string `json:"adminEmails,omitempty"`
144
// ConsumerEmails: Email addresses of users who can "consume" tasks from
145
// the TaskQueue. This means they can Dequeue and Delete tasks from the
147
ConsumerEmails []string `json:"consumerEmails,omitempty"`
149
// ProducerEmails: Email addresses of users who can "produce" tasks into
150
// the TaskQueue. This means they can Insert tasks into the queue.
151
ProducerEmails []string `json:"producerEmails,omitempty"`
154
type TaskQueueStats struct {
155
// LeasedLastHour: Number of tasks leased in the last hour.
156
LeasedLastHour int64 `json:"leasedLastHour,omitempty,string"`
158
// LeasedLastMinute: Number of tasks leased in the last minute.
159
LeasedLastMinute int64 `json:"leasedLastMinute,omitempty,string"`
161
// OldestTask: The timestamp (in seconds since the epoch) of the oldest
163
OldestTask int64 `json:"oldestTask,omitempty,string"`
165
// TotalTasks: Number of tasks in the queue.
166
TotalTasks int64 `json:"totalTasks,omitempty"`
170
// Items: The actual list of tasks returned as a result of the lease
172
Items []*Task `json:"items,omitempty"`
174
// Kind: The kind of object returned, a list of tasks.
175
Kind string `json:"kind,omitempty"`
179
// Items: The actual list of tasks currently active in the TaskQueue.
180
Items []*Task `json:"items,omitempty"`
182
// Kind: The kind of object returned, a list of tasks.
183
Kind string `json:"kind,omitempty"`
186
// method id "taskqueue.taskqueues.get":
188
type TaskqueuesGetCall struct {
192
opt_ map[string]interface{}
195
// Get: Get detailed information about a TaskQueue.
196
func (r *TaskqueuesService) Get(project string, taskqueue string) *TaskqueuesGetCall {
197
c := &TaskqueuesGetCall{s: r.s, opt_: make(map[string]interface{})}
199
c.taskqueue = taskqueue
203
// GetStats sets the optional parameter "getStats": Whether to get
205
func (c *TaskqueuesGetCall) GetStats(getStats bool) *TaskqueuesGetCall {
206
c.opt_["getStats"] = getStats
210
// Fields allows partial responses to be retrieved.
211
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
212
// for more information.
213
func (c *TaskqueuesGetCall) Fields(s ...googleapi.Field) *TaskqueuesGetCall {
214
c.opt_["fields"] = googleapi.CombineFields(s)
218
func (c *TaskqueuesGetCall) Do() (*TaskQueue, error) {
219
var body io.Reader = nil
220
params := make(url.Values)
221
params.Set("alt", "json")
222
if v, ok := c.opt_["getStats"]; ok {
223
params.Set("getStats", fmt.Sprintf("%v", v))
225
if v, ok := c.opt_["fields"]; ok {
226
params.Set("fields", fmt.Sprintf("%v", v))
228
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/taskqueues/{taskqueue}")
229
urls += "?" + params.Encode()
230
req, _ := http.NewRequest("GET", urls, body)
231
googleapi.Expand(req.URL, map[string]string{
232
"project": c.project,
233
"taskqueue": c.taskqueue,
235
req.Header.Set("User-Agent", "google-api-go-client/0.5")
236
res, err := c.s.client.Do(req)
240
defer googleapi.CloseBody(res)
241
if err := googleapi.CheckResponse(res); err != nil {
245
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
250
// "description": "Get detailed information about a TaskQueue.",
251
// "httpMethod": "GET",
252
// "id": "taskqueue.taskqueues.get",
253
// "parameterOrder": [
259
// "description": "Whether to get stats. Optional.",
260
// "location": "query",
264
// "description": "The project under which the queue lies.",
265
// "location": "path",
270
// "description": "The id of the taskqueue to get the properties of.",
271
// "location": "path",
276
// "path": "{project}/taskqueues/{taskqueue}",
278
// "$ref": "TaskQueue"
281
// "https://www.googleapis.com/auth/taskqueue",
282
// "https://www.googleapis.com/auth/taskqueue.consumer"
288
// method id "taskqueue.tasks.delete":
290
type TasksDeleteCall struct {
295
opt_ map[string]interface{}
298
// Delete: Delete a task from a TaskQueue.
299
func (r *TasksService) Delete(project string, taskqueue string, task string) *TasksDeleteCall {
300
c := &TasksDeleteCall{s: r.s, opt_: make(map[string]interface{})}
302
c.taskqueue = taskqueue
307
// Fields allows partial responses to be retrieved.
308
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
309
// for more information.
310
func (c *TasksDeleteCall) Fields(s ...googleapi.Field) *TasksDeleteCall {
311
c.opt_["fields"] = googleapi.CombineFields(s)
315
func (c *TasksDeleteCall) Do() error {
316
var body io.Reader = nil
317
params := make(url.Values)
318
params.Set("alt", "json")
319
if v, ok := c.opt_["fields"]; ok {
320
params.Set("fields", fmt.Sprintf("%v", v))
322
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/taskqueues/{taskqueue}/tasks/{task}")
323
urls += "?" + params.Encode()
324
req, _ := http.NewRequest("DELETE", urls, body)
325
googleapi.Expand(req.URL, map[string]string{
326
"project": c.project,
327
"taskqueue": c.taskqueue,
330
req.Header.Set("User-Agent", "google-api-go-client/0.5")
331
res, err := c.s.client.Do(req)
335
defer googleapi.CloseBody(res)
336
if err := googleapi.CheckResponse(res); err != nil {
341
// "description": "Delete a task from a TaskQueue.",
342
// "httpMethod": "DELETE",
343
// "id": "taskqueue.tasks.delete",
344
// "parameterOrder": [
351
// "description": "The project under which the queue lies.",
352
// "location": "path",
357
// "description": "The id of the task to delete.",
358
// "location": "path",
363
// "description": "The taskqueue to delete a task from.",
364
// "location": "path",
369
// "path": "{project}/taskqueues/{taskqueue}/tasks/{task}",
371
// "https://www.googleapis.com/auth/taskqueue",
372
// "https://www.googleapis.com/auth/taskqueue.consumer"
378
// method id "taskqueue.tasks.get":
380
type TasksGetCall struct {
385
opt_ map[string]interface{}
388
// Get: Get a particular task from a TaskQueue.
389
func (r *TasksService) Get(project string, taskqueue string, task string) *TasksGetCall {
390
c := &TasksGetCall{s: r.s, opt_: make(map[string]interface{})}
392
c.taskqueue = taskqueue
397
// Fields allows partial responses to be retrieved.
398
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
399
// for more information.
400
func (c *TasksGetCall) Fields(s ...googleapi.Field) *TasksGetCall {
401
c.opt_["fields"] = googleapi.CombineFields(s)
405
func (c *TasksGetCall) Do() (*Task, error) {
406
var body io.Reader = nil
407
params := make(url.Values)
408
params.Set("alt", "json")
409
if v, ok := c.opt_["fields"]; ok {
410
params.Set("fields", fmt.Sprintf("%v", v))
412
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/taskqueues/{taskqueue}/tasks/{task}")
413
urls += "?" + params.Encode()
414
req, _ := http.NewRequest("GET", urls, body)
415
googleapi.Expand(req.URL, map[string]string{
416
"project": c.project,
417
"taskqueue": c.taskqueue,
420
req.Header.Set("User-Agent", "google-api-go-client/0.5")
421
res, err := c.s.client.Do(req)
425
defer googleapi.CloseBody(res)
426
if err := googleapi.CheckResponse(res); err != nil {
430
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
435
// "description": "Get a particular task from a TaskQueue.",
436
// "httpMethod": "GET",
437
// "id": "taskqueue.tasks.get",
438
// "parameterOrder": [
445
// "description": "The project under which the queue lies.",
446
// "location": "path",
451
// "description": "The task to get properties of.",
452
// "location": "path",
457
// "description": "The taskqueue in which the task belongs.",
458
// "location": "path",
463
// "path": "{project}/taskqueues/{taskqueue}/tasks/{task}",
468
// "https://www.googleapis.com/auth/taskqueue",
469
// "https://www.googleapis.com/auth/taskqueue.consumer"
475
// method id "taskqueue.tasks.insert":
477
type TasksInsertCall struct {
482
opt_ map[string]interface{}
485
// Insert: Insert a new task in a TaskQueue
486
func (r *TasksService) Insert(project string, taskqueue string, task *Task) *TasksInsertCall {
487
c := &TasksInsertCall{s: r.s, opt_: make(map[string]interface{})}
489
c.taskqueue = taskqueue
494
// Fields allows partial responses to be retrieved.
495
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
496
// for more information.
497
func (c *TasksInsertCall) Fields(s ...googleapi.Field) *TasksInsertCall {
498
c.opt_["fields"] = googleapi.CombineFields(s)
502
func (c *TasksInsertCall) Do() (*Task, error) {
503
var body io.Reader = nil
504
body, err := googleapi.WithoutDataWrapper.JSONReader(c.task)
508
ctype := "application/json"
509
params := make(url.Values)
510
params.Set("alt", "json")
511
if v, ok := c.opt_["fields"]; ok {
512
params.Set("fields", fmt.Sprintf("%v", v))
514
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/taskqueues/{taskqueue}/tasks")
515
urls += "?" + params.Encode()
516
req, _ := http.NewRequest("POST", urls, body)
517
googleapi.Expand(req.URL, map[string]string{
518
"project": c.project,
519
"taskqueue": c.taskqueue,
521
req.Header.Set("Content-Type", ctype)
522
req.Header.Set("User-Agent", "google-api-go-client/0.5")
523
res, err := c.s.client.Do(req)
527
defer googleapi.CloseBody(res)
528
if err := googleapi.CheckResponse(res); err != nil {
532
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
537
// "description": "Insert a new task in a TaskQueue",
538
// "httpMethod": "POST",
539
// "id": "taskqueue.tasks.insert",
540
// "parameterOrder": [
546
// "description": "The project under which the queue lies",
547
// "location": "path",
552
// "description": "The taskqueue to insert the task into",
553
// "location": "path",
558
// "path": "{project}/taskqueues/{taskqueue}/tasks",
566
// "https://www.googleapis.com/auth/taskqueue",
567
// "https://www.googleapis.com/auth/taskqueue.consumer"
573
// method id "taskqueue.tasks.lease":
575
type TasksLeaseCall struct {
581
opt_ map[string]interface{}
584
// Lease: Lease 1 or more tasks from a TaskQueue.
585
func (r *TasksService) Lease(project string, taskqueue string, numTasks int64, leaseSecs int64) *TasksLeaseCall {
586
c := &TasksLeaseCall{s: r.s, opt_: make(map[string]interface{})}
588
c.taskqueue = taskqueue
589
c.numTasks = numTasks
590
c.leaseSecs = leaseSecs
594
// GroupByTag sets the optional parameter "groupByTag": When true, all
595
// returned tasks will have the same tag
596
func (c *TasksLeaseCall) GroupByTag(groupByTag bool) *TasksLeaseCall {
597
c.opt_["groupByTag"] = groupByTag
601
// Tag sets the optional parameter "tag": The tag allowed for tasks in
602
// the response. Must only be specified if group_by_tag is true. If
603
// group_by_tag is true and tag is not specified the tag will be that of
604
// the oldest task by eta, i.e. the first available tag
605
func (c *TasksLeaseCall) Tag(tag string) *TasksLeaseCall {
610
// Fields allows partial responses to be retrieved.
611
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
612
// for more information.
613
func (c *TasksLeaseCall) Fields(s ...googleapi.Field) *TasksLeaseCall {
614
c.opt_["fields"] = googleapi.CombineFields(s)
618
func (c *TasksLeaseCall) Do() (*Tasks, error) {
619
var body io.Reader = nil
620
params := make(url.Values)
621
params.Set("alt", "json")
622
params.Set("leaseSecs", fmt.Sprintf("%v", c.leaseSecs))
623
params.Set("numTasks", fmt.Sprintf("%v", c.numTasks))
624
if v, ok := c.opt_["groupByTag"]; ok {
625
params.Set("groupByTag", fmt.Sprintf("%v", v))
627
if v, ok := c.opt_["tag"]; ok {
628
params.Set("tag", fmt.Sprintf("%v", v))
630
if v, ok := c.opt_["fields"]; ok {
631
params.Set("fields", fmt.Sprintf("%v", v))
633
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/taskqueues/{taskqueue}/tasks/lease")
634
urls += "?" + params.Encode()
635
req, _ := http.NewRequest("POST", urls, body)
636
googleapi.Expand(req.URL, map[string]string{
637
"project": c.project,
638
"taskqueue": c.taskqueue,
640
req.Header.Set("User-Agent", "google-api-go-client/0.5")
641
res, err := c.s.client.Do(req)
645
defer googleapi.CloseBody(res)
646
if err := googleapi.CheckResponse(res); err != nil {
650
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
655
// "description": "Lease 1 or more tasks from a TaskQueue.",
656
// "httpMethod": "POST",
657
// "id": "taskqueue.tasks.lease",
658
// "parameterOrder": [
666
// "description": "When true, all returned tasks will have the same tag",
667
// "location": "query",
671
// "description": "The lease in seconds.",
672
// "format": "int32",
673
// "location": "query",
678
// "description": "The number of tasks to lease.",
679
// "format": "int32",
680
// "location": "query",
685
// "description": "The project under which the queue lies.",
686
// "location": "path",
691
// "description": "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",
692
// "location": "query",
696
// "description": "The taskqueue to lease a task from.",
697
// "location": "path",
702
// "path": "{project}/taskqueues/{taskqueue}/tasks/lease",
707
// "https://www.googleapis.com/auth/taskqueue",
708
// "https://www.googleapis.com/auth/taskqueue.consumer"
714
// method id "taskqueue.tasks.list":
716
type TasksListCall struct {
720
opt_ map[string]interface{}
723
// List: List Tasks in a TaskQueue
724
func (r *TasksService) List(project string, taskqueue string) *TasksListCall {
725
c := &TasksListCall{s: r.s, opt_: make(map[string]interface{})}
727
c.taskqueue = taskqueue
731
// Fields allows partial responses to be retrieved.
732
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
733
// for more information.
734
func (c *TasksListCall) Fields(s ...googleapi.Field) *TasksListCall {
735
c.opt_["fields"] = googleapi.CombineFields(s)
739
func (c *TasksListCall) Do() (*Tasks2, error) {
740
var body io.Reader = nil
741
params := make(url.Values)
742
params.Set("alt", "json")
743
if v, ok := c.opt_["fields"]; ok {
744
params.Set("fields", fmt.Sprintf("%v", v))
746
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/taskqueues/{taskqueue}/tasks")
747
urls += "?" + params.Encode()
748
req, _ := http.NewRequest("GET", urls, body)
749
googleapi.Expand(req.URL, map[string]string{
750
"project": c.project,
751
"taskqueue": c.taskqueue,
753
req.Header.Set("User-Agent", "google-api-go-client/0.5")
754
res, err := c.s.client.Do(req)
758
defer googleapi.CloseBody(res)
759
if err := googleapi.CheckResponse(res); err != nil {
763
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
768
// "description": "List Tasks in a TaskQueue",
769
// "httpMethod": "GET",
770
// "id": "taskqueue.tasks.list",
771
// "parameterOrder": [
777
// "description": "The project under which the queue lies.",
778
// "location": "path",
783
// "description": "The id of the taskqueue to list tasks from.",
784
// "location": "path",
789
// "path": "{project}/taskqueues/{taskqueue}/tasks",
794
// "https://www.googleapis.com/auth/taskqueue",
795
// "https://www.googleapis.com/auth/taskqueue.consumer"
801
// method id "taskqueue.tasks.patch":
803
type TasksPatchCall struct {
808
newLeaseSeconds int64
810
opt_ map[string]interface{}
813
// Patch: Update tasks that are leased out of a TaskQueue. This method
814
// supports patch semantics.
815
func (r *TasksService) Patch(project string, taskqueue string, task string, newLeaseSeconds int64, task2 *Task) *TasksPatchCall {
816
c := &TasksPatchCall{s: r.s, opt_: make(map[string]interface{})}
818
c.taskqueue = taskqueue
820
c.newLeaseSeconds = newLeaseSeconds
825
// Fields allows partial responses to be retrieved.
826
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
827
// for more information.
828
func (c *TasksPatchCall) Fields(s ...googleapi.Field) *TasksPatchCall {
829
c.opt_["fields"] = googleapi.CombineFields(s)
833
func (c *TasksPatchCall) Do() (*Task, error) {
834
var body io.Reader = nil
835
body, err := googleapi.WithoutDataWrapper.JSONReader(c.task2)
839
ctype := "application/json"
840
params := make(url.Values)
841
params.Set("alt", "json")
842
params.Set("newLeaseSeconds", fmt.Sprintf("%v", c.newLeaseSeconds))
843
if v, ok := c.opt_["fields"]; ok {
844
params.Set("fields", fmt.Sprintf("%v", v))
846
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/taskqueues/{taskqueue}/tasks/{task}")
847
urls += "?" + params.Encode()
848
req, _ := http.NewRequest("PATCH", urls, body)
849
googleapi.Expand(req.URL, map[string]string{
850
"project": c.project,
851
"taskqueue": c.taskqueue,
854
req.Header.Set("Content-Type", ctype)
855
req.Header.Set("User-Agent", "google-api-go-client/0.5")
856
res, err := c.s.client.Do(req)
860
defer googleapi.CloseBody(res)
861
if err := googleapi.CheckResponse(res); err != nil {
865
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
870
// "description": "Update tasks that are leased out of a TaskQueue. This method supports patch semantics.",
871
// "httpMethod": "PATCH",
872
// "id": "taskqueue.tasks.patch",
873
// "parameterOrder": [
880
// "newLeaseSeconds": {
881
// "description": "The new lease in seconds.",
882
// "format": "int32",
883
// "location": "query",
888
// "description": "The project under which the queue lies.",
889
// "location": "path",
894
// "location": "path",
899
// "location": "path",
904
// "path": "{project}/taskqueues/{taskqueue}/tasks/{task}",
912
// "https://www.googleapis.com/auth/taskqueue",
913
// "https://www.googleapis.com/auth/taskqueue.consumer"
919
// method id "taskqueue.tasks.update":
921
type TasksUpdateCall struct {
926
newLeaseSeconds int64
928
opt_ map[string]interface{}
931
// Update: Update tasks that are leased out of a TaskQueue.
932
func (r *TasksService) Update(project string, taskqueue string, task string, newLeaseSeconds int64, task2 *Task) *TasksUpdateCall {
933
c := &TasksUpdateCall{s: r.s, opt_: make(map[string]interface{})}
935
c.taskqueue = taskqueue
937
c.newLeaseSeconds = newLeaseSeconds
942
// Fields allows partial responses to be retrieved.
943
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
944
// for more information.
945
func (c *TasksUpdateCall) Fields(s ...googleapi.Field) *TasksUpdateCall {
946
c.opt_["fields"] = googleapi.CombineFields(s)
950
func (c *TasksUpdateCall) Do() (*Task, error) {
951
var body io.Reader = nil
952
body, err := googleapi.WithoutDataWrapper.JSONReader(c.task2)
956
ctype := "application/json"
957
params := make(url.Values)
958
params.Set("alt", "json")
959
params.Set("newLeaseSeconds", fmt.Sprintf("%v", c.newLeaseSeconds))
960
if v, ok := c.opt_["fields"]; ok {
961
params.Set("fields", fmt.Sprintf("%v", v))
963
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/taskqueues/{taskqueue}/tasks/{task}")
964
urls += "?" + params.Encode()
965
req, _ := http.NewRequest("POST", urls, body)
966
googleapi.Expand(req.URL, map[string]string{
967
"project": c.project,
968
"taskqueue": c.taskqueue,
971
req.Header.Set("Content-Type", ctype)
972
req.Header.Set("User-Agent", "google-api-go-client/0.5")
973
res, err := c.s.client.Do(req)
977
defer googleapi.CloseBody(res)
978
if err := googleapi.CheckResponse(res); err != nil {
982
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
987
// "description": "Update tasks that are leased out of a TaskQueue.",
988
// "httpMethod": "POST",
989
// "id": "taskqueue.tasks.update",
990
// "parameterOrder": [
997
// "newLeaseSeconds": {
998
// "description": "The new lease in seconds.",
999
// "format": "int32",
1000
// "location": "query",
1001
// "required": true,
1002
// "type": "integer"
1005
// "description": "The project under which the queue lies.",
1006
// "location": "path",
1007
// "required": true,
1011
// "location": "path",
1012
// "required": true,
1016
// "location": "path",
1017
// "required": true,
1021
// "path": "{project}/taskqueues/{taskqueue}/tasks/{task}",
1029
// "https://www.googleapis.com/auth/taskqueue",
1030
// "https://www.googleapis.com/auth/taskqueue.consumer"