@googleapis/tasks 8.0.1 → 10.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +45 -0
- package/README.md +0 -9
- package/build/index.js +2 -2
- package/build/index.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -0
- package/build/v1.d.ts +900 -2
- package/build/v1.js +6 -1
- package/build/v1.js.map +1 -1
- package/package.json +4 -4
- package/v1.ts +900 -1
package/build/v1.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosResponseWithHTTP2, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common';
|
|
3
2
|
import { Readable } from 'stream';
|
|
4
3
|
export declare namespace tasks_v1 {
|
|
@@ -256,6 +255,47 @@ export declare namespace tasks_v1 {
|
|
|
256
255
|
constructor(context: APIRequestContext);
|
|
257
256
|
/**
|
|
258
257
|
* Deletes the authenticated user's specified task list. If the list contains assigned tasks, both the assigned tasks and the original tasks in the assignment surface (Docs, Chat Spaces) are deleted.
|
|
258
|
+
* @example
|
|
259
|
+
* ```js
|
|
260
|
+
* // Before running the sample:
|
|
261
|
+
* // - Enable the API at:
|
|
262
|
+
* // https://console.developers.google.com/apis/api/tasks.googleapis.com
|
|
263
|
+
* // - Login into gcloud by running:
|
|
264
|
+
* // ```sh
|
|
265
|
+
* // $ gcloud auth application-default login
|
|
266
|
+
* // ```
|
|
267
|
+
* // - Install the npm module by running:
|
|
268
|
+
* // ```sh
|
|
269
|
+
* // $ npm install googleapis
|
|
270
|
+
* // ```
|
|
271
|
+
*
|
|
272
|
+
* const {google} = require('googleapis');
|
|
273
|
+
* const tasks = google.tasks('v1');
|
|
274
|
+
*
|
|
275
|
+
* async function main() {
|
|
276
|
+
* const auth = new google.auth.GoogleAuth({
|
|
277
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
278
|
+
* scopes: ['https://www.googleapis.com/auth/tasks'],
|
|
279
|
+
* });
|
|
280
|
+
*
|
|
281
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
282
|
+
* const authClient = await auth.getClient();
|
|
283
|
+
* google.options({auth: authClient});
|
|
284
|
+
*
|
|
285
|
+
* // Do the magic
|
|
286
|
+
* const res = await tasks.tasklists.delete({
|
|
287
|
+
* // Task list identifier.
|
|
288
|
+
* tasklist: 'placeholder-value',
|
|
289
|
+
* });
|
|
290
|
+
* console.log(res.data);
|
|
291
|
+
* }
|
|
292
|
+
*
|
|
293
|
+
* main().catch(e => {
|
|
294
|
+
* console.error(e);
|
|
295
|
+
* throw e;
|
|
296
|
+
* });
|
|
297
|
+
*
|
|
298
|
+
* ```
|
|
259
299
|
*
|
|
260
300
|
* @param params - Parameters for request
|
|
261
301
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -270,6 +310,60 @@ export declare namespace tasks_v1 {
|
|
|
270
310
|
delete(callback: BodyResponseCallback<void>): void;
|
|
271
311
|
/**
|
|
272
312
|
* Returns the authenticated user's specified task list.
|
|
313
|
+
* @example
|
|
314
|
+
* ```js
|
|
315
|
+
* // Before running the sample:
|
|
316
|
+
* // - Enable the API at:
|
|
317
|
+
* // https://console.developers.google.com/apis/api/tasks.googleapis.com
|
|
318
|
+
* // - Login into gcloud by running:
|
|
319
|
+
* // ```sh
|
|
320
|
+
* // $ gcloud auth application-default login
|
|
321
|
+
* // ```
|
|
322
|
+
* // - Install the npm module by running:
|
|
323
|
+
* // ```sh
|
|
324
|
+
* // $ npm install googleapis
|
|
325
|
+
* // ```
|
|
326
|
+
*
|
|
327
|
+
* const {google} = require('googleapis');
|
|
328
|
+
* const tasks = google.tasks('v1');
|
|
329
|
+
*
|
|
330
|
+
* async function main() {
|
|
331
|
+
* const auth = new google.auth.GoogleAuth({
|
|
332
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
333
|
+
* scopes: [
|
|
334
|
+
* 'https://www.googleapis.com/auth/tasks',
|
|
335
|
+
* 'https://www.googleapis.com/auth/tasks.readonly',
|
|
336
|
+
* ],
|
|
337
|
+
* });
|
|
338
|
+
*
|
|
339
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
340
|
+
* const authClient = await auth.getClient();
|
|
341
|
+
* google.options({auth: authClient});
|
|
342
|
+
*
|
|
343
|
+
* // Do the magic
|
|
344
|
+
* const res = await tasks.tasklists.get({
|
|
345
|
+
* // Task list identifier.
|
|
346
|
+
* tasklist: 'placeholder-value',
|
|
347
|
+
* });
|
|
348
|
+
* console.log(res.data);
|
|
349
|
+
*
|
|
350
|
+
* // Example response
|
|
351
|
+
* // {
|
|
352
|
+
* // "etag": "my_etag",
|
|
353
|
+
* // "id": "my_id",
|
|
354
|
+
* // "kind": "my_kind",
|
|
355
|
+
* // "selfLink": "my_selfLink",
|
|
356
|
+
* // "title": "my_title",
|
|
357
|
+
* // "updated": "my_updated"
|
|
358
|
+
* // }
|
|
359
|
+
* }
|
|
360
|
+
*
|
|
361
|
+
* main().catch(e => {
|
|
362
|
+
* console.error(e);
|
|
363
|
+
* throw e;
|
|
364
|
+
* });
|
|
365
|
+
*
|
|
366
|
+
* ```
|
|
273
367
|
*
|
|
274
368
|
* @param params - Parameters for request
|
|
275
369
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -284,6 +378,67 @@ export declare namespace tasks_v1 {
|
|
|
284
378
|
get(callback: BodyResponseCallback<Schema$TaskList>): void;
|
|
285
379
|
/**
|
|
286
380
|
* Creates a new task list and adds it to the authenticated user's task lists. A user can have up to 2000 lists at a time.
|
|
381
|
+
* @example
|
|
382
|
+
* ```js
|
|
383
|
+
* // Before running the sample:
|
|
384
|
+
* // - Enable the API at:
|
|
385
|
+
* // https://console.developers.google.com/apis/api/tasks.googleapis.com
|
|
386
|
+
* // - Login into gcloud by running:
|
|
387
|
+
* // ```sh
|
|
388
|
+
* // $ gcloud auth application-default login
|
|
389
|
+
* // ```
|
|
390
|
+
* // - Install the npm module by running:
|
|
391
|
+
* // ```sh
|
|
392
|
+
* // $ npm install googleapis
|
|
393
|
+
* // ```
|
|
394
|
+
*
|
|
395
|
+
* const {google} = require('googleapis');
|
|
396
|
+
* const tasks = google.tasks('v1');
|
|
397
|
+
*
|
|
398
|
+
* async function main() {
|
|
399
|
+
* const auth = new google.auth.GoogleAuth({
|
|
400
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
401
|
+
* scopes: ['https://www.googleapis.com/auth/tasks'],
|
|
402
|
+
* });
|
|
403
|
+
*
|
|
404
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
405
|
+
* const authClient = await auth.getClient();
|
|
406
|
+
* google.options({auth: authClient});
|
|
407
|
+
*
|
|
408
|
+
* // Do the magic
|
|
409
|
+
* const res = await tasks.tasklists.insert({
|
|
410
|
+
* // Request body metadata
|
|
411
|
+
* requestBody: {
|
|
412
|
+
* // request body parameters
|
|
413
|
+
* // {
|
|
414
|
+
* // "etag": "my_etag",
|
|
415
|
+
* // "id": "my_id",
|
|
416
|
+
* // "kind": "my_kind",
|
|
417
|
+
* // "selfLink": "my_selfLink",
|
|
418
|
+
* // "title": "my_title",
|
|
419
|
+
* // "updated": "my_updated"
|
|
420
|
+
* // }
|
|
421
|
+
* },
|
|
422
|
+
* });
|
|
423
|
+
* console.log(res.data);
|
|
424
|
+
*
|
|
425
|
+
* // Example response
|
|
426
|
+
* // {
|
|
427
|
+
* // "etag": "my_etag",
|
|
428
|
+
* // "id": "my_id",
|
|
429
|
+
* // "kind": "my_kind",
|
|
430
|
+
* // "selfLink": "my_selfLink",
|
|
431
|
+
* // "title": "my_title",
|
|
432
|
+
* // "updated": "my_updated"
|
|
433
|
+
* // }
|
|
434
|
+
* }
|
|
435
|
+
*
|
|
436
|
+
* main().catch(e => {
|
|
437
|
+
* console.error(e);
|
|
438
|
+
* throw e;
|
|
439
|
+
* });
|
|
440
|
+
*
|
|
441
|
+
* ```
|
|
287
442
|
*
|
|
288
443
|
* @param params - Parameters for request
|
|
289
444
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -298,6 +453,60 @@ export declare namespace tasks_v1 {
|
|
|
298
453
|
insert(callback: BodyResponseCallback<Schema$TaskList>): void;
|
|
299
454
|
/**
|
|
300
455
|
* Returns all the authenticated user's task lists. A user can have up to 2000 lists at a time.
|
|
456
|
+
* @example
|
|
457
|
+
* ```js
|
|
458
|
+
* // Before running the sample:
|
|
459
|
+
* // - Enable the API at:
|
|
460
|
+
* // https://console.developers.google.com/apis/api/tasks.googleapis.com
|
|
461
|
+
* // - Login into gcloud by running:
|
|
462
|
+
* // ```sh
|
|
463
|
+
* // $ gcloud auth application-default login
|
|
464
|
+
* // ```
|
|
465
|
+
* // - Install the npm module by running:
|
|
466
|
+
* // ```sh
|
|
467
|
+
* // $ npm install googleapis
|
|
468
|
+
* // ```
|
|
469
|
+
*
|
|
470
|
+
* const {google} = require('googleapis');
|
|
471
|
+
* const tasks = google.tasks('v1');
|
|
472
|
+
*
|
|
473
|
+
* async function main() {
|
|
474
|
+
* const auth = new google.auth.GoogleAuth({
|
|
475
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
476
|
+
* scopes: [
|
|
477
|
+
* 'https://www.googleapis.com/auth/tasks',
|
|
478
|
+
* 'https://www.googleapis.com/auth/tasks.readonly',
|
|
479
|
+
* ],
|
|
480
|
+
* });
|
|
481
|
+
*
|
|
482
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
483
|
+
* const authClient = await auth.getClient();
|
|
484
|
+
* google.options({auth: authClient});
|
|
485
|
+
*
|
|
486
|
+
* // Do the magic
|
|
487
|
+
* const res = await tasks.tasklists.list({
|
|
488
|
+
* // Maximum number of task lists returned on one page. Optional. The default is 1000 (max allowed: 1000).
|
|
489
|
+
* maxResults: 'placeholder-value',
|
|
490
|
+
* // Token specifying the result page to return. Optional.
|
|
491
|
+
* pageToken: 'placeholder-value',
|
|
492
|
+
* });
|
|
493
|
+
* console.log(res.data);
|
|
494
|
+
*
|
|
495
|
+
* // Example response
|
|
496
|
+
* // {
|
|
497
|
+
* // "etag": "my_etag",
|
|
498
|
+
* // "items": [],
|
|
499
|
+
* // "kind": "my_kind",
|
|
500
|
+
* // "nextPageToken": "my_nextPageToken"
|
|
501
|
+
* // }
|
|
502
|
+
* }
|
|
503
|
+
*
|
|
504
|
+
* main().catch(e => {
|
|
505
|
+
* console.error(e);
|
|
506
|
+
* throw e;
|
|
507
|
+
* });
|
|
508
|
+
*
|
|
509
|
+
* ```
|
|
301
510
|
*
|
|
302
511
|
* @param params - Parameters for request
|
|
303
512
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -312,6 +521,70 @@ export declare namespace tasks_v1 {
|
|
|
312
521
|
list(callback: BodyResponseCallback<Schema$TaskLists>): void;
|
|
313
522
|
/**
|
|
314
523
|
* Updates the authenticated user's specified task list. This method supports patch semantics.
|
|
524
|
+
* @example
|
|
525
|
+
* ```js
|
|
526
|
+
* // Before running the sample:
|
|
527
|
+
* // - Enable the API at:
|
|
528
|
+
* // https://console.developers.google.com/apis/api/tasks.googleapis.com
|
|
529
|
+
* // - Login into gcloud by running:
|
|
530
|
+
* // ```sh
|
|
531
|
+
* // $ gcloud auth application-default login
|
|
532
|
+
* // ```
|
|
533
|
+
* // - Install the npm module by running:
|
|
534
|
+
* // ```sh
|
|
535
|
+
* // $ npm install googleapis
|
|
536
|
+
* // ```
|
|
537
|
+
*
|
|
538
|
+
* const {google} = require('googleapis');
|
|
539
|
+
* const tasks = google.tasks('v1');
|
|
540
|
+
*
|
|
541
|
+
* async function main() {
|
|
542
|
+
* const auth = new google.auth.GoogleAuth({
|
|
543
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
544
|
+
* scopes: ['https://www.googleapis.com/auth/tasks'],
|
|
545
|
+
* });
|
|
546
|
+
*
|
|
547
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
548
|
+
* const authClient = await auth.getClient();
|
|
549
|
+
* google.options({auth: authClient});
|
|
550
|
+
*
|
|
551
|
+
* // Do the magic
|
|
552
|
+
* const res = await tasks.tasklists.patch({
|
|
553
|
+
* // Task list identifier.
|
|
554
|
+
* tasklist: 'placeholder-value',
|
|
555
|
+
*
|
|
556
|
+
* // Request body metadata
|
|
557
|
+
* requestBody: {
|
|
558
|
+
* // request body parameters
|
|
559
|
+
* // {
|
|
560
|
+
* // "etag": "my_etag",
|
|
561
|
+
* // "id": "my_id",
|
|
562
|
+
* // "kind": "my_kind",
|
|
563
|
+
* // "selfLink": "my_selfLink",
|
|
564
|
+
* // "title": "my_title",
|
|
565
|
+
* // "updated": "my_updated"
|
|
566
|
+
* // }
|
|
567
|
+
* },
|
|
568
|
+
* });
|
|
569
|
+
* console.log(res.data);
|
|
570
|
+
*
|
|
571
|
+
* // Example response
|
|
572
|
+
* // {
|
|
573
|
+
* // "etag": "my_etag",
|
|
574
|
+
* // "id": "my_id",
|
|
575
|
+
* // "kind": "my_kind",
|
|
576
|
+
* // "selfLink": "my_selfLink",
|
|
577
|
+
* // "title": "my_title",
|
|
578
|
+
* // "updated": "my_updated"
|
|
579
|
+
* // }
|
|
580
|
+
* }
|
|
581
|
+
*
|
|
582
|
+
* main().catch(e => {
|
|
583
|
+
* console.error(e);
|
|
584
|
+
* throw e;
|
|
585
|
+
* });
|
|
586
|
+
*
|
|
587
|
+
* ```
|
|
315
588
|
*
|
|
316
589
|
* @param params - Parameters for request
|
|
317
590
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -326,6 +599,70 @@ export declare namespace tasks_v1 {
|
|
|
326
599
|
patch(callback: BodyResponseCallback<Schema$TaskList>): void;
|
|
327
600
|
/**
|
|
328
601
|
* Updates the authenticated user's specified task list.
|
|
602
|
+
* @example
|
|
603
|
+
* ```js
|
|
604
|
+
* // Before running the sample:
|
|
605
|
+
* // - Enable the API at:
|
|
606
|
+
* // https://console.developers.google.com/apis/api/tasks.googleapis.com
|
|
607
|
+
* // - Login into gcloud by running:
|
|
608
|
+
* // ```sh
|
|
609
|
+
* // $ gcloud auth application-default login
|
|
610
|
+
* // ```
|
|
611
|
+
* // - Install the npm module by running:
|
|
612
|
+
* // ```sh
|
|
613
|
+
* // $ npm install googleapis
|
|
614
|
+
* // ```
|
|
615
|
+
*
|
|
616
|
+
* const {google} = require('googleapis');
|
|
617
|
+
* const tasks = google.tasks('v1');
|
|
618
|
+
*
|
|
619
|
+
* async function main() {
|
|
620
|
+
* const auth = new google.auth.GoogleAuth({
|
|
621
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
622
|
+
* scopes: ['https://www.googleapis.com/auth/tasks'],
|
|
623
|
+
* });
|
|
624
|
+
*
|
|
625
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
626
|
+
* const authClient = await auth.getClient();
|
|
627
|
+
* google.options({auth: authClient});
|
|
628
|
+
*
|
|
629
|
+
* // Do the magic
|
|
630
|
+
* const res = await tasks.tasklists.update({
|
|
631
|
+
* // Task list identifier.
|
|
632
|
+
* tasklist: 'placeholder-value',
|
|
633
|
+
*
|
|
634
|
+
* // Request body metadata
|
|
635
|
+
* requestBody: {
|
|
636
|
+
* // request body parameters
|
|
637
|
+
* // {
|
|
638
|
+
* // "etag": "my_etag",
|
|
639
|
+
* // "id": "my_id",
|
|
640
|
+
* // "kind": "my_kind",
|
|
641
|
+
* // "selfLink": "my_selfLink",
|
|
642
|
+
* // "title": "my_title",
|
|
643
|
+
* // "updated": "my_updated"
|
|
644
|
+
* // }
|
|
645
|
+
* },
|
|
646
|
+
* });
|
|
647
|
+
* console.log(res.data);
|
|
648
|
+
*
|
|
649
|
+
* // Example response
|
|
650
|
+
* // {
|
|
651
|
+
* // "etag": "my_etag",
|
|
652
|
+
* // "id": "my_id",
|
|
653
|
+
* // "kind": "my_kind",
|
|
654
|
+
* // "selfLink": "my_selfLink",
|
|
655
|
+
* // "title": "my_title",
|
|
656
|
+
* // "updated": "my_updated"
|
|
657
|
+
* // }
|
|
658
|
+
* }
|
|
659
|
+
*
|
|
660
|
+
* main().catch(e => {
|
|
661
|
+
* console.error(e);
|
|
662
|
+
* throw e;
|
|
663
|
+
* });
|
|
664
|
+
*
|
|
665
|
+
* ```
|
|
329
666
|
*
|
|
330
667
|
* @param params - Parameters for request
|
|
331
668
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -392,6 +729,47 @@ export declare namespace tasks_v1 {
|
|
|
392
729
|
constructor(context: APIRequestContext);
|
|
393
730
|
/**
|
|
394
731
|
* Clears all completed tasks from the specified task list. The affected tasks will be marked as 'hidden' and no longer be returned by default when retrieving all tasks for a task list.
|
|
732
|
+
* @example
|
|
733
|
+
* ```js
|
|
734
|
+
* // Before running the sample:
|
|
735
|
+
* // - Enable the API at:
|
|
736
|
+
* // https://console.developers.google.com/apis/api/tasks.googleapis.com
|
|
737
|
+
* // - Login into gcloud by running:
|
|
738
|
+
* // ```sh
|
|
739
|
+
* // $ gcloud auth application-default login
|
|
740
|
+
* // ```
|
|
741
|
+
* // - Install the npm module by running:
|
|
742
|
+
* // ```sh
|
|
743
|
+
* // $ npm install googleapis
|
|
744
|
+
* // ```
|
|
745
|
+
*
|
|
746
|
+
* const {google} = require('googleapis');
|
|
747
|
+
* const tasks = google.tasks('v1');
|
|
748
|
+
*
|
|
749
|
+
* async function main() {
|
|
750
|
+
* const auth = new google.auth.GoogleAuth({
|
|
751
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
752
|
+
* scopes: ['https://www.googleapis.com/auth/tasks'],
|
|
753
|
+
* });
|
|
754
|
+
*
|
|
755
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
756
|
+
* const authClient = await auth.getClient();
|
|
757
|
+
* google.options({auth: authClient});
|
|
758
|
+
*
|
|
759
|
+
* // Do the magic
|
|
760
|
+
* const res = await tasks.tasks.clear({
|
|
761
|
+
* // Task list identifier.
|
|
762
|
+
* tasklist: 'placeholder-value',
|
|
763
|
+
* });
|
|
764
|
+
* console.log(res.data);
|
|
765
|
+
* }
|
|
766
|
+
*
|
|
767
|
+
* main().catch(e => {
|
|
768
|
+
* console.error(e);
|
|
769
|
+
* throw e;
|
|
770
|
+
* });
|
|
771
|
+
*
|
|
772
|
+
* ```
|
|
395
773
|
*
|
|
396
774
|
* @param params - Parameters for request
|
|
397
775
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -406,6 +784,49 @@ export declare namespace tasks_v1 {
|
|
|
406
784
|
clear(callback: BodyResponseCallback<void>): void;
|
|
407
785
|
/**
|
|
408
786
|
* Deletes the specified task from the task list. If the task is assigned, both the assigned task and the original task (in Docs, Chat Spaces) are deleted. To delete the assigned task only, navigate to the assignment surface and unassign the task from there.
|
|
787
|
+
* @example
|
|
788
|
+
* ```js
|
|
789
|
+
* // Before running the sample:
|
|
790
|
+
* // - Enable the API at:
|
|
791
|
+
* // https://console.developers.google.com/apis/api/tasks.googleapis.com
|
|
792
|
+
* // - Login into gcloud by running:
|
|
793
|
+
* // ```sh
|
|
794
|
+
* // $ gcloud auth application-default login
|
|
795
|
+
* // ```
|
|
796
|
+
* // - Install the npm module by running:
|
|
797
|
+
* // ```sh
|
|
798
|
+
* // $ npm install googleapis
|
|
799
|
+
* // ```
|
|
800
|
+
*
|
|
801
|
+
* const {google} = require('googleapis');
|
|
802
|
+
* const tasks = google.tasks('v1');
|
|
803
|
+
*
|
|
804
|
+
* async function main() {
|
|
805
|
+
* const auth = new google.auth.GoogleAuth({
|
|
806
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
807
|
+
* scopes: ['https://www.googleapis.com/auth/tasks'],
|
|
808
|
+
* });
|
|
809
|
+
*
|
|
810
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
811
|
+
* const authClient = await auth.getClient();
|
|
812
|
+
* google.options({auth: authClient});
|
|
813
|
+
*
|
|
814
|
+
* // Do the magic
|
|
815
|
+
* const res = await tasks.tasks.delete({
|
|
816
|
+
* // Task identifier.
|
|
817
|
+
* task: 'placeholder-value',
|
|
818
|
+
* // Task list identifier.
|
|
819
|
+
* tasklist: 'placeholder-value',
|
|
820
|
+
* });
|
|
821
|
+
* console.log(res.data);
|
|
822
|
+
* }
|
|
823
|
+
*
|
|
824
|
+
* main().catch(e => {
|
|
825
|
+
* console.error(e);
|
|
826
|
+
* throw e;
|
|
827
|
+
* });
|
|
828
|
+
*
|
|
829
|
+
* ```
|
|
409
830
|
*
|
|
410
831
|
* @param params - Parameters for request
|
|
411
832
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -420,6 +841,73 @@ export declare namespace tasks_v1 {
|
|
|
420
841
|
delete(callback: BodyResponseCallback<void>): void;
|
|
421
842
|
/**
|
|
422
843
|
* Returns the specified task.
|
|
844
|
+
* @example
|
|
845
|
+
* ```js
|
|
846
|
+
* // Before running the sample:
|
|
847
|
+
* // - Enable the API at:
|
|
848
|
+
* // https://console.developers.google.com/apis/api/tasks.googleapis.com
|
|
849
|
+
* // - Login into gcloud by running:
|
|
850
|
+
* // ```sh
|
|
851
|
+
* // $ gcloud auth application-default login
|
|
852
|
+
* // ```
|
|
853
|
+
* // - Install the npm module by running:
|
|
854
|
+
* // ```sh
|
|
855
|
+
* // $ npm install googleapis
|
|
856
|
+
* // ```
|
|
857
|
+
*
|
|
858
|
+
* const {google} = require('googleapis');
|
|
859
|
+
* const tasks = google.tasks('v1');
|
|
860
|
+
*
|
|
861
|
+
* async function main() {
|
|
862
|
+
* const auth = new google.auth.GoogleAuth({
|
|
863
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
864
|
+
* scopes: [
|
|
865
|
+
* 'https://www.googleapis.com/auth/tasks',
|
|
866
|
+
* 'https://www.googleapis.com/auth/tasks.readonly',
|
|
867
|
+
* ],
|
|
868
|
+
* });
|
|
869
|
+
*
|
|
870
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
871
|
+
* const authClient = await auth.getClient();
|
|
872
|
+
* google.options({auth: authClient});
|
|
873
|
+
*
|
|
874
|
+
* // Do the magic
|
|
875
|
+
* const res = await tasks.tasks.get({
|
|
876
|
+
* // Task identifier.
|
|
877
|
+
* task: 'placeholder-value',
|
|
878
|
+
* // Task list identifier.
|
|
879
|
+
* tasklist: 'placeholder-value',
|
|
880
|
+
* });
|
|
881
|
+
* console.log(res.data);
|
|
882
|
+
*
|
|
883
|
+
* // Example response
|
|
884
|
+
* // {
|
|
885
|
+
* // "assignmentInfo": {},
|
|
886
|
+
* // "completed": "my_completed",
|
|
887
|
+
* // "deleted": false,
|
|
888
|
+
* // "due": "my_due",
|
|
889
|
+
* // "etag": "my_etag",
|
|
890
|
+
* // "hidden": false,
|
|
891
|
+
* // "id": "my_id",
|
|
892
|
+
* // "kind": "my_kind",
|
|
893
|
+
* // "links": [],
|
|
894
|
+
* // "notes": "my_notes",
|
|
895
|
+
* // "parent": "my_parent",
|
|
896
|
+
* // "position": "my_position",
|
|
897
|
+
* // "selfLink": "my_selfLink",
|
|
898
|
+
* // "status": "my_status",
|
|
899
|
+
* // "title": "my_title",
|
|
900
|
+
* // "updated": "my_updated",
|
|
901
|
+
* // "webViewLink": "my_webViewLink"
|
|
902
|
+
* // }
|
|
903
|
+
* }
|
|
904
|
+
*
|
|
905
|
+
* main().catch(e => {
|
|
906
|
+
* console.error(e);
|
|
907
|
+
* throw e;
|
|
908
|
+
* });
|
|
909
|
+
*
|
|
910
|
+
* ```
|
|
423
911
|
*
|
|
424
912
|
* @param params - Parameters for request
|
|
425
913
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -434,6 +922,96 @@ export declare namespace tasks_v1 {
|
|
|
434
922
|
get(callback: BodyResponseCallback<Schema$Task>): void;
|
|
435
923
|
/**
|
|
436
924
|
* Creates a new task on the specified task list. Tasks assigned from Docs or Chat Spaces cannot be inserted from Tasks Public API; they can only be created by assigning them from Docs or Chat Spaces. A user can have up to 20,000 non-hidden tasks per list and up to 100,000 tasks in total at a time.
|
|
925
|
+
* @example
|
|
926
|
+
* ```js
|
|
927
|
+
* // Before running the sample:
|
|
928
|
+
* // - Enable the API at:
|
|
929
|
+
* // https://console.developers.google.com/apis/api/tasks.googleapis.com
|
|
930
|
+
* // - Login into gcloud by running:
|
|
931
|
+
* // ```sh
|
|
932
|
+
* // $ gcloud auth application-default login
|
|
933
|
+
* // ```
|
|
934
|
+
* // - Install the npm module by running:
|
|
935
|
+
* // ```sh
|
|
936
|
+
* // $ npm install googleapis
|
|
937
|
+
* // ```
|
|
938
|
+
*
|
|
939
|
+
* const {google} = require('googleapis');
|
|
940
|
+
* const tasks = google.tasks('v1');
|
|
941
|
+
*
|
|
942
|
+
* async function main() {
|
|
943
|
+
* const auth = new google.auth.GoogleAuth({
|
|
944
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
945
|
+
* scopes: ['https://www.googleapis.com/auth/tasks'],
|
|
946
|
+
* });
|
|
947
|
+
*
|
|
948
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
949
|
+
* const authClient = await auth.getClient();
|
|
950
|
+
* google.options({auth: authClient});
|
|
951
|
+
*
|
|
952
|
+
* // Do the magic
|
|
953
|
+
* const res = await tasks.tasks.insert({
|
|
954
|
+
* // Parent task identifier. If the task is created at the top level, this parameter is omitted. An assigned task cannot be a parent task, nor can it have a parent. Setting the parent to an assigned task results in failure of the request. Optional.
|
|
955
|
+
* parent: 'placeholder-value',
|
|
956
|
+
* // Previous sibling task identifier. If the task is created at the first position among its siblings, this parameter is omitted. Optional.
|
|
957
|
+
* previous: 'placeholder-value',
|
|
958
|
+
* // Task list identifier.
|
|
959
|
+
* tasklist: 'placeholder-value',
|
|
960
|
+
*
|
|
961
|
+
* // Request body metadata
|
|
962
|
+
* requestBody: {
|
|
963
|
+
* // request body parameters
|
|
964
|
+
* // {
|
|
965
|
+
* // "assignmentInfo": {},
|
|
966
|
+
* // "completed": "my_completed",
|
|
967
|
+
* // "deleted": false,
|
|
968
|
+
* // "due": "my_due",
|
|
969
|
+
* // "etag": "my_etag",
|
|
970
|
+
* // "hidden": false,
|
|
971
|
+
* // "id": "my_id",
|
|
972
|
+
* // "kind": "my_kind",
|
|
973
|
+
* // "links": [],
|
|
974
|
+
* // "notes": "my_notes",
|
|
975
|
+
* // "parent": "my_parent",
|
|
976
|
+
* // "position": "my_position",
|
|
977
|
+
* // "selfLink": "my_selfLink",
|
|
978
|
+
* // "status": "my_status",
|
|
979
|
+
* // "title": "my_title",
|
|
980
|
+
* // "updated": "my_updated",
|
|
981
|
+
* // "webViewLink": "my_webViewLink"
|
|
982
|
+
* // }
|
|
983
|
+
* },
|
|
984
|
+
* });
|
|
985
|
+
* console.log(res.data);
|
|
986
|
+
*
|
|
987
|
+
* // Example response
|
|
988
|
+
* // {
|
|
989
|
+
* // "assignmentInfo": {},
|
|
990
|
+
* // "completed": "my_completed",
|
|
991
|
+
* // "deleted": false,
|
|
992
|
+
* // "due": "my_due",
|
|
993
|
+
* // "etag": "my_etag",
|
|
994
|
+
* // "hidden": false,
|
|
995
|
+
* // "id": "my_id",
|
|
996
|
+
* // "kind": "my_kind",
|
|
997
|
+
* // "links": [],
|
|
998
|
+
* // "notes": "my_notes",
|
|
999
|
+
* // "parent": "my_parent",
|
|
1000
|
+
* // "position": "my_position",
|
|
1001
|
+
* // "selfLink": "my_selfLink",
|
|
1002
|
+
* // "status": "my_status",
|
|
1003
|
+
* // "title": "my_title",
|
|
1004
|
+
* // "updated": "my_updated",
|
|
1005
|
+
* // "webViewLink": "my_webViewLink"
|
|
1006
|
+
* // }
|
|
1007
|
+
* }
|
|
1008
|
+
*
|
|
1009
|
+
* main().catch(e => {
|
|
1010
|
+
* console.error(e);
|
|
1011
|
+
* throw e;
|
|
1012
|
+
* });
|
|
1013
|
+
*
|
|
1014
|
+
* ```
|
|
437
1015
|
*
|
|
438
1016
|
* @param params - Parameters for request
|
|
439
1017
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -448,6 +1026,80 @@ export declare namespace tasks_v1 {
|
|
|
448
1026
|
insert(callback: BodyResponseCallback<Schema$Task>): void;
|
|
449
1027
|
/**
|
|
450
1028
|
* Returns all tasks in the specified task list. Doesn't return assigned tasks by default (from Docs, Chat Spaces). A user can have up to 20,000 non-hidden tasks per list and up to 100,000 tasks in total at a time.
|
|
1029
|
+
* @example
|
|
1030
|
+
* ```js
|
|
1031
|
+
* // Before running the sample:
|
|
1032
|
+
* // - Enable the API at:
|
|
1033
|
+
* // https://console.developers.google.com/apis/api/tasks.googleapis.com
|
|
1034
|
+
* // - Login into gcloud by running:
|
|
1035
|
+
* // ```sh
|
|
1036
|
+
* // $ gcloud auth application-default login
|
|
1037
|
+
* // ```
|
|
1038
|
+
* // - Install the npm module by running:
|
|
1039
|
+
* // ```sh
|
|
1040
|
+
* // $ npm install googleapis
|
|
1041
|
+
* // ```
|
|
1042
|
+
*
|
|
1043
|
+
* const {google} = require('googleapis');
|
|
1044
|
+
* const tasks = google.tasks('v1');
|
|
1045
|
+
*
|
|
1046
|
+
* async function main() {
|
|
1047
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1048
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1049
|
+
* scopes: [
|
|
1050
|
+
* 'https://www.googleapis.com/auth/tasks',
|
|
1051
|
+
* 'https://www.googleapis.com/auth/tasks.readonly',
|
|
1052
|
+
* ],
|
|
1053
|
+
* });
|
|
1054
|
+
*
|
|
1055
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1056
|
+
* const authClient = await auth.getClient();
|
|
1057
|
+
* google.options({auth: authClient});
|
|
1058
|
+
*
|
|
1059
|
+
* // Do the magic
|
|
1060
|
+
* const res = await tasks.tasks.list({
|
|
1061
|
+
* // Upper bound for a task's completion date (as a RFC 3339 timestamp) to filter by. Optional. The default is not to filter by completion date.
|
|
1062
|
+
* completedMax: 'placeholder-value',
|
|
1063
|
+
* // Lower bound for a task's completion date (as a RFC 3339 timestamp) to filter by. Optional. The default is not to filter by completion date.
|
|
1064
|
+
* completedMin: 'placeholder-value',
|
|
1065
|
+
* // Upper bound for a task's due date (as a RFC 3339 timestamp) to filter by. Optional. The default is not to filter by due date.
|
|
1066
|
+
* dueMax: 'placeholder-value',
|
|
1067
|
+
* // Lower bound for a task's due date (as a RFC 3339 timestamp) to filter by. Optional. The default is not to filter by due date.
|
|
1068
|
+
* dueMin: 'placeholder-value',
|
|
1069
|
+
* // Maximum number of tasks returned on one page. Optional. The default is 20 (max allowed: 100).
|
|
1070
|
+
* maxResults: 'placeholder-value',
|
|
1071
|
+
* // Token specifying the result page to return. Optional.
|
|
1072
|
+
* pageToken: 'placeholder-value',
|
|
1073
|
+
* // Optional. Flag indicating whether tasks assigned to the current user are returned in the result. Optional. The default is False.
|
|
1074
|
+
* showAssigned: 'placeholder-value',
|
|
1075
|
+
* // Flag indicating whether completed tasks are returned in the result. Note that showHidden must also be True to show tasks completed in first party clients, such as the web UI and Google's mobile apps. Optional. The default is True.
|
|
1076
|
+
* showCompleted: 'placeholder-value',
|
|
1077
|
+
* // Flag indicating whether deleted tasks are returned in the result. Optional. The default is False.
|
|
1078
|
+
* showDeleted: 'placeholder-value',
|
|
1079
|
+
* // Flag indicating whether hidden tasks are returned in the result. Optional. The default is False.
|
|
1080
|
+
* showHidden: 'placeholder-value',
|
|
1081
|
+
* // Task list identifier.
|
|
1082
|
+
* tasklist: 'placeholder-value',
|
|
1083
|
+
* // Lower bound for a task's last modification time (as a RFC 3339 timestamp) to filter by. Optional. The default is not to filter by last modification time.
|
|
1084
|
+
* updatedMin: 'placeholder-value',
|
|
1085
|
+
* });
|
|
1086
|
+
* console.log(res.data);
|
|
1087
|
+
*
|
|
1088
|
+
* // Example response
|
|
1089
|
+
* // {
|
|
1090
|
+
* // "etag": "my_etag",
|
|
1091
|
+
* // "items": [],
|
|
1092
|
+
* // "kind": "my_kind",
|
|
1093
|
+
* // "nextPageToken": "my_nextPageToken"
|
|
1094
|
+
* // }
|
|
1095
|
+
* }
|
|
1096
|
+
*
|
|
1097
|
+
* main().catch(e => {
|
|
1098
|
+
* console.error(e);
|
|
1099
|
+
* throw e;
|
|
1100
|
+
* });
|
|
1101
|
+
*
|
|
1102
|
+
* ```
|
|
451
1103
|
*
|
|
452
1104
|
* @param params - Parameters for request
|
|
453
1105
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -462,6 +1114,76 @@ export declare namespace tasks_v1 {
|
|
|
462
1114
|
list(callback: BodyResponseCallback<Schema$Tasks>): void;
|
|
463
1115
|
/**
|
|
464
1116
|
* Moves the specified task to another position in the destination task list. If the destination list is not specified, the task is moved within its current list. This can include putting it as a child task under a new parent and/or move it to a different position among its sibling tasks. A user can have up to 2,000 subtasks per task.
|
|
1117
|
+
* @example
|
|
1118
|
+
* ```js
|
|
1119
|
+
* // Before running the sample:
|
|
1120
|
+
* // - Enable the API at:
|
|
1121
|
+
* // https://console.developers.google.com/apis/api/tasks.googleapis.com
|
|
1122
|
+
* // - Login into gcloud by running:
|
|
1123
|
+
* // ```sh
|
|
1124
|
+
* // $ gcloud auth application-default login
|
|
1125
|
+
* // ```
|
|
1126
|
+
* // - Install the npm module by running:
|
|
1127
|
+
* // ```sh
|
|
1128
|
+
* // $ npm install googleapis
|
|
1129
|
+
* // ```
|
|
1130
|
+
*
|
|
1131
|
+
* const {google} = require('googleapis');
|
|
1132
|
+
* const tasks = google.tasks('v1');
|
|
1133
|
+
*
|
|
1134
|
+
* async function main() {
|
|
1135
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1136
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1137
|
+
* scopes: ['https://www.googleapis.com/auth/tasks'],
|
|
1138
|
+
* });
|
|
1139
|
+
*
|
|
1140
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1141
|
+
* const authClient = await auth.getClient();
|
|
1142
|
+
* google.options({auth: authClient});
|
|
1143
|
+
*
|
|
1144
|
+
* // Do the magic
|
|
1145
|
+
* const res = await tasks.tasks.move({
|
|
1146
|
+
* // Optional. Destination task list identifier. If set, the task is moved from tasklist to the destinationTasklist list. Otherwise the task is moved within its current list. Recurrent tasks cannot currently be moved between lists.
|
|
1147
|
+
* destinationTasklist: 'placeholder-value',
|
|
1148
|
+
* // Optional. New parent task identifier. If the task is moved to the top level, this parameter is omitted. The task set as parent must exist in the task list and can not be hidden. Exceptions: 1. Assigned and repeating tasks cannot be set as parent tasks (have subtasks), or be moved under a parent task (become subtasks). 2. Tasks that are both completed and hidden cannot be nested, so the parent field must be empty.
|
|
1149
|
+
* parent: 'placeholder-value',
|
|
1150
|
+
* // Optional. New previous sibling task identifier. If the task is moved to the first position among its siblings, this parameter is omitted. The task set as previous must exist in the task list and can not be hidden. Exceptions: 1. Tasks that are both completed and hidden can only be moved to position 0, so the previous field must be empty.
|
|
1151
|
+
* previous: 'placeholder-value',
|
|
1152
|
+
* // Task identifier.
|
|
1153
|
+
* task: 'placeholder-value',
|
|
1154
|
+
* // Task list identifier.
|
|
1155
|
+
* tasklist: 'placeholder-value',
|
|
1156
|
+
* });
|
|
1157
|
+
* console.log(res.data);
|
|
1158
|
+
*
|
|
1159
|
+
* // Example response
|
|
1160
|
+
* // {
|
|
1161
|
+
* // "assignmentInfo": {},
|
|
1162
|
+
* // "completed": "my_completed",
|
|
1163
|
+
* // "deleted": false,
|
|
1164
|
+
* // "due": "my_due",
|
|
1165
|
+
* // "etag": "my_etag",
|
|
1166
|
+
* // "hidden": false,
|
|
1167
|
+
* // "id": "my_id",
|
|
1168
|
+
* // "kind": "my_kind",
|
|
1169
|
+
* // "links": [],
|
|
1170
|
+
* // "notes": "my_notes",
|
|
1171
|
+
* // "parent": "my_parent",
|
|
1172
|
+
* // "position": "my_position",
|
|
1173
|
+
* // "selfLink": "my_selfLink",
|
|
1174
|
+
* // "status": "my_status",
|
|
1175
|
+
* // "title": "my_title",
|
|
1176
|
+
* // "updated": "my_updated",
|
|
1177
|
+
* // "webViewLink": "my_webViewLink"
|
|
1178
|
+
* // }
|
|
1179
|
+
* }
|
|
1180
|
+
*
|
|
1181
|
+
* main().catch(e => {
|
|
1182
|
+
* console.error(e);
|
|
1183
|
+
* throw e;
|
|
1184
|
+
* });
|
|
1185
|
+
*
|
|
1186
|
+
* ```
|
|
465
1187
|
*
|
|
466
1188
|
* @param params - Parameters for request
|
|
467
1189
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -476,6 +1198,94 @@ export declare namespace tasks_v1 {
|
|
|
476
1198
|
move(callback: BodyResponseCallback<Schema$Task>): void;
|
|
477
1199
|
/**
|
|
478
1200
|
* Updates the specified task. This method supports patch semantics.
|
|
1201
|
+
* @example
|
|
1202
|
+
* ```js
|
|
1203
|
+
* // Before running the sample:
|
|
1204
|
+
* // - Enable the API at:
|
|
1205
|
+
* // https://console.developers.google.com/apis/api/tasks.googleapis.com
|
|
1206
|
+
* // - Login into gcloud by running:
|
|
1207
|
+
* // ```sh
|
|
1208
|
+
* // $ gcloud auth application-default login
|
|
1209
|
+
* // ```
|
|
1210
|
+
* // - Install the npm module by running:
|
|
1211
|
+
* // ```sh
|
|
1212
|
+
* // $ npm install googleapis
|
|
1213
|
+
* // ```
|
|
1214
|
+
*
|
|
1215
|
+
* const {google} = require('googleapis');
|
|
1216
|
+
* const tasks = google.tasks('v1');
|
|
1217
|
+
*
|
|
1218
|
+
* async function main() {
|
|
1219
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1220
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1221
|
+
* scopes: ['https://www.googleapis.com/auth/tasks'],
|
|
1222
|
+
* });
|
|
1223
|
+
*
|
|
1224
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1225
|
+
* const authClient = await auth.getClient();
|
|
1226
|
+
* google.options({auth: authClient});
|
|
1227
|
+
*
|
|
1228
|
+
* // Do the magic
|
|
1229
|
+
* const res = await tasks.tasks.patch({
|
|
1230
|
+
* // Task identifier.
|
|
1231
|
+
* task: 'placeholder-value',
|
|
1232
|
+
* // Task list identifier.
|
|
1233
|
+
* tasklist: 'placeholder-value',
|
|
1234
|
+
*
|
|
1235
|
+
* // Request body metadata
|
|
1236
|
+
* requestBody: {
|
|
1237
|
+
* // request body parameters
|
|
1238
|
+
* // {
|
|
1239
|
+
* // "assignmentInfo": {},
|
|
1240
|
+
* // "completed": "my_completed",
|
|
1241
|
+
* // "deleted": false,
|
|
1242
|
+
* // "due": "my_due",
|
|
1243
|
+
* // "etag": "my_etag",
|
|
1244
|
+
* // "hidden": false,
|
|
1245
|
+
* // "id": "my_id",
|
|
1246
|
+
* // "kind": "my_kind",
|
|
1247
|
+
* // "links": [],
|
|
1248
|
+
* // "notes": "my_notes",
|
|
1249
|
+
* // "parent": "my_parent",
|
|
1250
|
+
* // "position": "my_position",
|
|
1251
|
+
* // "selfLink": "my_selfLink",
|
|
1252
|
+
* // "status": "my_status",
|
|
1253
|
+
* // "title": "my_title",
|
|
1254
|
+
* // "updated": "my_updated",
|
|
1255
|
+
* // "webViewLink": "my_webViewLink"
|
|
1256
|
+
* // }
|
|
1257
|
+
* },
|
|
1258
|
+
* });
|
|
1259
|
+
* console.log(res.data);
|
|
1260
|
+
*
|
|
1261
|
+
* // Example response
|
|
1262
|
+
* // {
|
|
1263
|
+
* // "assignmentInfo": {},
|
|
1264
|
+
* // "completed": "my_completed",
|
|
1265
|
+
* // "deleted": false,
|
|
1266
|
+
* // "due": "my_due",
|
|
1267
|
+
* // "etag": "my_etag",
|
|
1268
|
+
* // "hidden": false,
|
|
1269
|
+
* // "id": "my_id",
|
|
1270
|
+
* // "kind": "my_kind",
|
|
1271
|
+
* // "links": [],
|
|
1272
|
+
* // "notes": "my_notes",
|
|
1273
|
+
* // "parent": "my_parent",
|
|
1274
|
+
* // "position": "my_position",
|
|
1275
|
+
* // "selfLink": "my_selfLink",
|
|
1276
|
+
* // "status": "my_status",
|
|
1277
|
+
* // "title": "my_title",
|
|
1278
|
+
* // "updated": "my_updated",
|
|
1279
|
+
* // "webViewLink": "my_webViewLink"
|
|
1280
|
+
* // }
|
|
1281
|
+
* }
|
|
1282
|
+
*
|
|
1283
|
+
* main().catch(e => {
|
|
1284
|
+
* console.error(e);
|
|
1285
|
+
* throw e;
|
|
1286
|
+
* });
|
|
1287
|
+
*
|
|
1288
|
+
* ```
|
|
479
1289
|
*
|
|
480
1290
|
* @param params - Parameters for request
|
|
481
1291
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -490,6 +1300,94 @@ export declare namespace tasks_v1 {
|
|
|
490
1300
|
patch(callback: BodyResponseCallback<Schema$Task>): void;
|
|
491
1301
|
/**
|
|
492
1302
|
* Updates the specified task.
|
|
1303
|
+
* @example
|
|
1304
|
+
* ```js
|
|
1305
|
+
* // Before running the sample:
|
|
1306
|
+
* // - Enable the API at:
|
|
1307
|
+
* // https://console.developers.google.com/apis/api/tasks.googleapis.com
|
|
1308
|
+
* // - Login into gcloud by running:
|
|
1309
|
+
* // ```sh
|
|
1310
|
+
* // $ gcloud auth application-default login
|
|
1311
|
+
* // ```
|
|
1312
|
+
* // - Install the npm module by running:
|
|
1313
|
+
* // ```sh
|
|
1314
|
+
* // $ npm install googleapis
|
|
1315
|
+
* // ```
|
|
1316
|
+
*
|
|
1317
|
+
* const {google} = require('googleapis');
|
|
1318
|
+
* const tasks = google.tasks('v1');
|
|
1319
|
+
*
|
|
1320
|
+
* async function main() {
|
|
1321
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1322
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1323
|
+
* scopes: ['https://www.googleapis.com/auth/tasks'],
|
|
1324
|
+
* });
|
|
1325
|
+
*
|
|
1326
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1327
|
+
* const authClient = await auth.getClient();
|
|
1328
|
+
* google.options({auth: authClient});
|
|
1329
|
+
*
|
|
1330
|
+
* // Do the magic
|
|
1331
|
+
* const res = await tasks.tasks.update({
|
|
1332
|
+
* // Task identifier.
|
|
1333
|
+
* task: 'placeholder-value',
|
|
1334
|
+
* // Task list identifier.
|
|
1335
|
+
* tasklist: 'placeholder-value',
|
|
1336
|
+
*
|
|
1337
|
+
* // Request body metadata
|
|
1338
|
+
* requestBody: {
|
|
1339
|
+
* // request body parameters
|
|
1340
|
+
* // {
|
|
1341
|
+
* // "assignmentInfo": {},
|
|
1342
|
+
* // "completed": "my_completed",
|
|
1343
|
+
* // "deleted": false,
|
|
1344
|
+
* // "due": "my_due",
|
|
1345
|
+
* // "etag": "my_etag",
|
|
1346
|
+
* // "hidden": false,
|
|
1347
|
+
* // "id": "my_id",
|
|
1348
|
+
* // "kind": "my_kind",
|
|
1349
|
+
* // "links": [],
|
|
1350
|
+
* // "notes": "my_notes",
|
|
1351
|
+
* // "parent": "my_parent",
|
|
1352
|
+
* // "position": "my_position",
|
|
1353
|
+
* // "selfLink": "my_selfLink",
|
|
1354
|
+
* // "status": "my_status",
|
|
1355
|
+
* // "title": "my_title",
|
|
1356
|
+
* // "updated": "my_updated",
|
|
1357
|
+
* // "webViewLink": "my_webViewLink"
|
|
1358
|
+
* // }
|
|
1359
|
+
* },
|
|
1360
|
+
* });
|
|
1361
|
+
* console.log(res.data);
|
|
1362
|
+
*
|
|
1363
|
+
* // Example response
|
|
1364
|
+
* // {
|
|
1365
|
+
* // "assignmentInfo": {},
|
|
1366
|
+
* // "completed": "my_completed",
|
|
1367
|
+
* // "deleted": false,
|
|
1368
|
+
* // "due": "my_due",
|
|
1369
|
+
* // "etag": "my_etag",
|
|
1370
|
+
* // "hidden": false,
|
|
1371
|
+
* // "id": "my_id",
|
|
1372
|
+
* // "kind": "my_kind",
|
|
1373
|
+
* // "links": [],
|
|
1374
|
+
* // "notes": "my_notes",
|
|
1375
|
+
* // "parent": "my_parent",
|
|
1376
|
+
* // "position": "my_position",
|
|
1377
|
+
* // "selfLink": "my_selfLink",
|
|
1378
|
+
* // "status": "my_status",
|
|
1379
|
+
* // "title": "my_title",
|
|
1380
|
+
* // "updated": "my_updated",
|
|
1381
|
+
* // "webViewLink": "my_webViewLink"
|
|
1382
|
+
* // }
|
|
1383
|
+
* }
|
|
1384
|
+
*
|
|
1385
|
+
* main().catch(e => {
|
|
1386
|
+
* console.error(e);
|
|
1387
|
+
* throw e;
|
|
1388
|
+
* });
|
|
1389
|
+
*
|
|
1390
|
+
* ```
|
|
493
1391
|
*
|
|
494
1392
|
* @param params - Parameters for request
|
|
495
1393
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -603,7 +1501,7 @@ export declare namespace tasks_v1 {
|
|
|
603
1501
|
*/
|
|
604
1502
|
destinationTasklist?: string;
|
|
605
1503
|
/**
|
|
606
|
-
* Optional. New parent task identifier. If the task is moved to the top level, this parameter is omitted. The task set as parent must exist in the task list and can not be hidden. Exceptions: 1. Assigned tasks
|
|
1504
|
+
* Optional. New parent task identifier. If the task is moved to the top level, this parameter is omitted. The task set as parent must exist in the task list and can not be hidden. Exceptions: 1. Assigned and repeating tasks cannot be set as parent tasks (have subtasks), or be moved under a parent task (become subtasks). 2. Tasks that are both completed and hidden cannot be nested, so the parent field must be empty.
|
|
607
1505
|
*/
|
|
608
1506
|
parent?: string;
|
|
609
1507
|
/**
|