@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/v1.ts CHANGED
@@ -310,6 +310,47 @@ export namespace tasks_v1 {
310
310
 
311
311
  /**
312
312
  * 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.
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: ['https://www.googleapis.com/auth/tasks'],
334
+ * });
335
+ *
336
+ * // Acquire an auth client, and bind it to all future calls
337
+ * const authClient = await auth.getClient();
338
+ * google.options({auth: authClient});
339
+ *
340
+ * // Do the magic
341
+ * const res = await tasks.tasklists.delete({
342
+ * // Task list identifier.
343
+ * tasklist: 'placeholder-value',
344
+ * });
345
+ * console.log(res.data);
346
+ * }
347
+ *
348
+ * main().catch(e => {
349
+ * console.error(e);
350
+ * throw e;
351
+ * });
352
+ *
353
+ * ```
313
354
  *
314
355
  * @param params - Parameters for request
315
356
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -398,6 +439,60 @@ export namespace tasks_v1 {
398
439
 
399
440
  /**
400
441
  * Returns the authenticated user's specified task list.
442
+ * @example
443
+ * ```js
444
+ * // Before running the sample:
445
+ * // - Enable the API at:
446
+ * // https://console.developers.google.com/apis/api/tasks.googleapis.com
447
+ * // - Login into gcloud by running:
448
+ * // ```sh
449
+ * // $ gcloud auth application-default login
450
+ * // ```
451
+ * // - Install the npm module by running:
452
+ * // ```sh
453
+ * // $ npm install googleapis
454
+ * // ```
455
+ *
456
+ * const {google} = require('googleapis');
457
+ * const tasks = google.tasks('v1');
458
+ *
459
+ * async function main() {
460
+ * const auth = new google.auth.GoogleAuth({
461
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
462
+ * scopes: [
463
+ * 'https://www.googleapis.com/auth/tasks',
464
+ * 'https://www.googleapis.com/auth/tasks.readonly',
465
+ * ],
466
+ * });
467
+ *
468
+ * // Acquire an auth client, and bind it to all future calls
469
+ * const authClient = await auth.getClient();
470
+ * google.options({auth: authClient});
471
+ *
472
+ * // Do the magic
473
+ * const res = await tasks.tasklists.get({
474
+ * // Task list identifier.
475
+ * tasklist: 'placeholder-value',
476
+ * });
477
+ * console.log(res.data);
478
+ *
479
+ * // Example response
480
+ * // {
481
+ * // "etag": "my_etag",
482
+ * // "id": "my_id",
483
+ * // "kind": "my_kind",
484
+ * // "selfLink": "my_selfLink",
485
+ * // "title": "my_title",
486
+ * // "updated": "my_updated"
487
+ * // }
488
+ * }
489
+ *
490
+ * main().catch(e => {
491
+ * console.error(e);
492
+ * throw e;
493
+ * });
494
+ *
495
+ * ```
401
496
  *
402
497
  * @param params - Parameters for request
403
498
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -488,6 +583,67 @@ export namespace tasks_v1 {
488
583
 
489
584
  /**
490
585
  * 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.
586
+ * @example
587
+ * ```js
588
+ * // Before running the sample:
589
+ * // - Enable the API at:
590
+ * // https://console.developers.google.com/apis/api/tasks.googleapis.com
591
+ * // - Login into gcloud by running:
592
+ * // ```sh
593
+ * // $ gcloud auth application-default login
594
+ * // ```
595
+ * // - Install the npm module by running:
596
+ * // ```sh
597
+ * // $ npm install googleapis
598
+ * // ```
599
+ *
600
+ * const {google} = require('googleapis');
601
+ * const tasks = google.tasks('v1');
602
+ *
603
+ * async function main() {
604
+ * const auth = new google.auth.GoogleAuth({
605
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
606
+ * scopes: ['https://www.googleapis.com/auth/tasks'],
607
+ * });
608
+ *
609
+ * // Acquire an auth client, and bind it to all future calls
610
+ * const authClient = await auth.getClient();
611
+ * google.options({auth: authClient});
612
+ *
613
+ * // Do the magic
614
+ * const res = await tasks.tasklists.insert({
615
+ * // Request body metadata
616
+ * requestBody: {
617
+ * // request body parameters
618
+ * // {
619
+ * // "etag": "my_etag",
620
+ * // "id": "my_id",
621
+ * // "kind": "my_kind",
622
+ * // "selfLink": "my_selfLink",
623
+ * // "title": "my_title",
624
+ * // "updated": "my_updated"
625
+ * // }
626
+ * },
627
+ * });
628
+ * console.log(res.data);
629
+ *
630
+ * // Example response
631
+ * // {
632
+ * // "etag": "my_etag",
633
+ * // "id": "my_id",
634
+ * // "kind": "my_kind",
635
+ * // "selfLink": "my_selfLink",
636
+ * // "title": "my_title",
637
+ * // "updated": "my_updated"
638
+ * // }
639
+ * }
640
+ *
641
+ * main().catch(e => {
642
+ * console.error(e);
643
+ * throw e;
644
+ * });
645
+ *
646
+ * ```
491
647
  *
492
648
  * @param params - Parameters for request
493
649
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -578,6 +734,60 @@ export namespace tasks_v1 {
578
734
 
579
735
  /**
580
736
  * Returns all the authenticated user's task lists. A user can have up to 2000 lists at a time.
737
+ * @example
738
+ * ```js
739
+ * // Before running the sample:
740
+ * // - Enable the API at:
741
+ * // https://console.developers.google.com/apis/api/tasks.googleapis.com
742
+ * // - Login into gcloud by running:
743
+ * // ```sh
744
+ * // $ gcloud auth application-default login
745
+ * // ```
746
+ * // - Install the npm module by running:
747
+ * // ```sh
748
+ * // $ npm install googleapis
749
+ * // ```
750
+ *
751
+ * const {google} = require('googleapis');
752
+ * const tasks = google.tasks('v1');
753
+ *
754
+ * async function main() {
755
+ * const auth = new google.auth.GoogleAuth({
756
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
757
+ * scopes: [
758
+ * 'https://www.googleapis.com/auth/tasks',
759
+ * 'https://www.googleapis.com/auth/tasks.readonly',
760
+ * ],
761
+ * });
762
+ *
763
+ * // Acquire an auth client, and bind it to all future calls
764
+ * const authClient = await auth.getClient();
765
+ * google.options({auth: authClient});
766
+ *
767
+ * // Do the magic
768
+ * const res = await tasks.tasklists.list({
769
+ * // Maximum number of task lists returned on one page. Optional. The default is 1000 (max allowed: 1000).
770
+ * maxResults: 'placeholder-value',
771
+ * // Token specifying the result page to return. Optional.
772
+ * pageToken: 'placeholder-value',
773
+ * });
774
+ * console.log(res.data);
775
+ *
776
+ * // Example response
777
+ * // {
778
+ * // "etag": "my_etag",
779
+ * // "items": [],
780
+ * // "kind": "my_kind",
781
+ * // "nextPageToken": "my_nextPageToken"
782
+ * // }
783
+ * }
784
+ *
785
+ * main().catch(e => {
786
+ * console.error(e);
787
+ * throw e;
788
+ * });
789
+ *
790
+ * ```
581
791
  *
582
792
  * @param params - Parameters for request
583
793
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -668,6 +878,70 @@ export namespace tasks_v1 {
668
878
 
669
879
  /**
670
880
  * Updates the authenticated user's specified task list. This method supports patch semantics.
881
+ * @example
882
+ * ```js
883
+ * // Before running the sample:
884
+ * // - Enable the API at:
885
+ * // https://console.developers.google.com/apis/api/tasks.googleapis.com
886
+ * // - Login into gcloud by running:
887
+ * // ```sh
888
+ * // $ gcloud auth application-default login
889
+ * // ```
890
+ * // - Install the npm module by running:
891
+ * // ```sh
892
+ * // $ npm install googleapis
893
+ * // ```
894
+ *
895
+ * const {google} = require('googleapis');
896
+ * const tasks = google.tasks('v1');
897
+ *
898
+ * async function main() {
899
+ * const auth = new google.auth.GoogleAuth({
900
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
901
+ * scopes: ['https://www.googleapis.com/auth/tasks'],
902
+ * });
903
+ *
904
+ * // Acquire an auth client, and bind it to all future calls
905
+ * const authClient = await auth.getClient();
906
+ * google.options({auth: authClient});
907
+ *
908
+ * // Do the magic
909
+ * const res = await tasks.tasklists.patch({
910
+ * // Task list identifier.
911
+ * tasklist: 'placeholder-value',
912
+ *
913
+ * // Request body metadata
914
+ * requestBody: {
915
+ * // request body parameters
916
+ * // {
917
+ * // "etag": "my_etag",
918
+ * // "id": "my_id",
919
+ * // "kind": "my_kind",
920
+ * // "selfLink": "my_selfLink",
921
+ * // "title": "my_title",
922
+ * // "updated": "my_updated"
923
+ * // }
924
+ * },
925
+ * });
926
+ * console.log(res.data);
927
+ *
928
+ * // Example response
929
+ * // {
930
+ * // "etag": "my_etag",
931
+ * // "id": "my_id",
932
+ * // "kind": "my_kind",
933
+ * // "selfLink": "my_selfLink",
934
+ * // "title": "my_title",
935
+ * // "updated": "my_updated"
936
+ * // }
937
+ * }
938
+ *
939
+ * main().catch(e => {
940
+ * console.error(e);
941
+ * throw e;
942
+ * });
943
+ *
944
+ * ```
671
945
  *
672
946
  * @param params - Parameters for request
673
947
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -758,6 +1032,70 @@ export namespace tasks_v1 {
758
1032
 
759
1033
  /**
760
1034
  * Updates the authenticated user's specified task list.
1035
+ * @example
1036
+ * ```js
1037
+ * // Before running the sample:
1038
+ * // - Enable the API at:
1039
+ * // https://console.developers.google.com/apis/api/tasks.googleapis.com
1040
+ * // - Login into gcloud by running:
1041
+ * // ```sh
1042
+ * // $ gcloud auth application-default login
1043
+ * // ```
1044
+ * // - Install the npm module by running:
1045
+ * // ```sh
1046
+ * // $ npm install googleapis
1047
+ * // ```
1048
+ *
1049
+ * const {google} = require('googleapis');
1050
+ * const tasks = google.tasks('v1');
1051
+ *
1052
+ * async function main() {
1053
+ * const auth = new google.auth.GoogleAuth({
1054
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1055
+ * scopes: ['https://www.googleapis.com/auth/tasks'],
1056
+ * });
1057
+ *
1058
+ * // Acquire an auth client, and bind it to all future calls
1059
+ * const authClient = await auth.getClient();
1060
+ * google.options({auth: authClient});
1061
+ *
1062
+ * // Do the magic
1063
+ * const res = await tasks.tasklists.update({
1064
+ * // Task list identifier.
1065
+ * tasklist: 'placeholder-value',
1066
+ *
1067
+ * // Request body metadata
1068
+ * requestBody: {
1069
+ * // request body parameters
1070
+ * // {
1071
+ * // "etag": "my_etag",
1072
+ * // "id": "my_id",
1073
+ * // "kind": "my_kind",
1074
+ * // "selfLink": "my_selfLink",
1075
+ * // "title": "my_title",
1076
+ * // "updated": "my_updated"
1077
+ * // }
1078
+ * },
1079
+ * });
1080
+ * console.log(res.data);
1081
+ *
1082
+ * // Example response
1083
+ * // {
1084
+ * // "etag": "my_etag",
1085
+ * // "id": "my_id",
1086
+ * // "kind": "my_kind",
1087
+ * // "selfLink": "my_selfLink",
1088
+ * // "title": "my_title",
1089
+ * // "updated": "my_updated"
1090
+ * // }
1091
+ * }
1092
+ *
1093
+ * main().catch(e => {
1094
+ * console.error(e);
1095
+ * throw e;
1096
+ * });
1097
+ *
1098
+ * ```
761
1099
  *
762
1100
  * @param params - Parameters for request
763
1101
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -906,6 +1244,47 @@ export namespace tasks_v1 {
906
1244
 
907
1245
  /**
908
1246
  * 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.
1247
+ * @example
1248
+ * ```js
1249
+ * // Before running the sample:
1250
+ * // - Enable the API at:
1251
+ * // https://console.developers.google.com/apis/api/tasks.googleapis.com
1252
+ * // - Login into gcloud by running:
1253
+ * // ```sh
1254
+ * // $ gcloud auth application-default login
1255
+ * // ```
1256
+ * // - Install the npm module by running:
1257
+ * // ```sh
1258
+ * // $ npm install googleapis
1259
+ * // ```
1260
+ *
1261
+ * const {google} = require('googleapis');
1262
+ * const tasks = google.tasks('v1');
1263
+ *
1264
+ * async function main() {
1265
+ * const auth = new google.auth.GoogleAuth({
1266
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1267
+ * scopes: ['https://www.googleapis.com/auth/tasks'],
1268
+ * });
1269
+ *
1270
+ * // Acquire an auth client, and bind it to all future calls
1271
+ * const authClient = await auth.getClient();
1272
+ * google.options({auth: authClient});
1273
+ *
1274
+ * // Do the magic
1275
+ * const res = await tasks.tasks.clear({
1276
+ * // Task list identifier.
1277
+ * tasklist: 'placeholder-value',
1278
+ * });
1279
+ * console.log(res.data);
1280
+ * }
1281
+ *
1282
+ * main().catch(e => {
1283
+ * console.error(e);
1284
+ * throw e;
1285
+ * });
1286
+ *
1287
+ * ```
909
1288
  *
910
1289
  * @param params - Parameters for request
911
1290
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -994,6 +1373,49 @@ export namespace tasks_v1 {
994
1373
 
995
1374
  /**
996
1375
  * 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.
1376
+ * @example
1377
+ * ```js
1378
+ * // Before running the sample:
1379
+ * // - Enable the API at:
1380
+ * // https://console.developers.google.com/apis/api/tasks.googleapis.com
1381
+ * // - Login into gcloud by running:
1382
+ * // ```sh
1383
+ * // $ gcloud auth application-default login
1384
+ * // ```
1385
+ * // - Install the npm module by running:
1386
+ * // ```sh
1387
+ * // $ npm install googleapis
1388
+ * // ```
1389
+ *
1390
+ * const {google} = require('googleapis');
1391
+ * const tasks = google.tasks('v1');
1392
+ *
1393
+ * async function main() {
1394
+ * const auth = new google.auth.GoogleAuth({
1395
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1396
+ * scopes: ['https://www.googleapis.com/auth/tasks'],
1397
+ * });
1398
+ *
1399
+ * // Acquire an auth client, and bind it to all future calls
1400
+ * const authClient = await auth.getClient();
1401
+ * google.options({auth: authClient});
1402
+ *
1403
+ * // Do the magic
1404
+ * const res = await tasks.tasks.delete({
1405
+ * // Task identifier.
1406
+ * task: 'placeholder-value',
1407
+ * // Task list identifier.
1408
+ * tasklist: 'placeholder-value',
1409
+ * });
1410
+ * console.log(res.data);
1411
+ * }
1412
+ *
1413
+ * main().catch(e => {
1414
+ * console.error(e);
1415
+ * throw e;
1416
+ * });
1417
+ *
1418
+ * ```
997
1419
  *
998
1420
  * @param params - Parameters for request
999
1421
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1082,6 +1504,73 @@ export namespace tasks_v1 {
1082
1504
 
1083
1505
  /**
1084
1506
  * Returns the specified task.
1507
+ * @example
1508
+ * ```js
1509
+ * // Before running the sample:
1510
+ * // - Enable the API at:
1511
+ * // https://console.developers.google.com/apis/api/tasks.googleapis.com
1512
+ * // - Login into gcloud by running:
1513
+ * // ```sh
1514
+ * // $ gcloud auth application-default login
1515
+ * // ```
1516
+ * // - Install the npm module by running:
1517
+ * // ```sh
1518
+ * // $ npm install googleapis
1519
+ * // ```
1520
+ *
1521
+ * const {google} = require('googleapis');
1522
+ * const tasks = google.tasks('v1');
1523
+ *
1524
+ * async function main() {
1525
+ * const auth = new google.auth.GoogleAuth({
1526
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1527
+ * scopes: [
1528
+ * 'https://www.googleapis.com/auth/tasks',
1529
+ * 'https://www.googleapis.com/auth/tasks.readonly',
1530
+ * ],
1531
+ * });
1532
+ *
1533
+ * // Acquire an auth client, and bind it to all future calls
1534
+ * const authClient = await auth.getClient();
1535
+ * google.options({auth: authClient});
1536
+ *
1537
+ * // Do the magic
1538
+ * const res = await tasks.tasks.get({
1539
+ * // Task identifier.
1540
+ * task: 'placeholder-value',
1541
+ * // Task list identifier.
1542
+ * tasklist: 'placeholder-value',
1543
+ * });
1544
+ * console.log(res.data);
1545
+ *
1546
+ * // Example response
1547
+ * // {
1548
+ * // "assignmentInfo": {},
1549
+ * // "completed": "my_completed",
1550
+ * // "deleted": false,
1551
+ * // "due": "my_due",
1552
+ * // "etag": "my_etag",
1553
+ * // "hidden": false,
1554
+ * // "id": "my_id",
1555
+ * // "kind": "my_kind",
1556
+ * // "links": [],
1557
+ * // "notes": "my_notes",
1558
+ * // "parent": "my_parent",
1559
+ * // "position": "my_position",
1560
+ * // "selfLink": "my_selfLink",
1561
+ * // "status": "my_status",
1562
+ * // "title": "my_title",
1563
+ * // "updated": "my_updated",
1564
+ * // "webViewLink": "my_webViewLink"
1565
+ * // }
1566
+ * }
1567
+ *
1568
+ * main().catch(e => {
1569
+ * console.error(e);
1570
+ * throw e;
1571
+ * });
1572
+ *
1573
+ * ```
1085
1574
  *
1086
1575
  * @param params - Parameters for request
1087
1576
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1172,6 +1661,96 @@ export namespace tasks_v1 {
1172
1661
 
1173
1662
  /**
1174
1663
  * 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.
1664
+ * @example
1665
+ * ```js
1666
+ * // Before running the sample:
1667
+ * // - Enable the API at:
1668
+ * // https://console.developers.google.com/apis/api/tasks.googleapis.com
1669
+ * // - Login into gcloud by running:
1670
+ * // ```sh
1671
+ * // $ gcloud auth application-default login
1672
+ * // ```
1673
+ * // - Install the npm module by running:
1674
+ * // ```sh
1675
+ * // $ npm install googleapis
1676
+ * // ```
1677
+ *
1678
+ * const {google} = require('googleapis');
1679
+ * const tasks = google.tasks('v1');
1680
+ *
1681
+ * async function main() {
1682
+ * const auth = new google.auth.GoogleAuth({
1683
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1684
+ * scopes: ['https://www.googleapis.com/auth/tasks'],
1685
+ * });
1686
+ *
1687
+ * // Acquire an auth client, and bind it to all future calls
1688
+ * const authClient = await auth.getClient();
1689
+ * google.options({auth: authClient});
1690
+ *
1691
+ * // Do the magic
1692
+ * const res = await tasks.tasks.insert({
1693
+ * // 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.
1694
+ * parent: 'placeholder-value',
1695
+ * // Previous sibling task identifier. If the task is created at the first position among its siblings, this parameter is omitted. Optional.
1696
+ * previous: 'placeholder-value',
1697
+ * // Task list identifier.
1698
+ * tasklist: 'placeholder-value',
1699
+ *
1700
+ * // Request body metadata
1701
+ * requestBody: {
1702
+ * // request body parameters
1703
+ * // {
1704
+ * // "assignmentInfo": {},
1705
+ * // "completed": "my_completed",
1706
+ * // "deleted": false,
1707
+ * // "due": "my_due",
1708
+ * // "etag": "my_etag",
1709
+ * // "hidden": false,
1710
+ * // "id": "my_id",
1711
+ * // "kind": "my_kind",
1712
+ * // "links": [],
1713
+ * // "notes": "my_notes",
1714
+ * // "parent": "my_parent",
1715
+ * // "position": "my_position",
1716
+ * // "selfLink": "my_selfLink",
1717
+ * // "status": "my_status",
1718
+ * // "title": "my_title",
1719
+ * // "updated": "my_updated",
1720
+ * // "webViewLink": "my_webViewLink"
1721
+ * // }
1722
+ * },
1723
+ * });
1724
+ * console.log(res.data);
1725
+ *
1726
+ * // Example response
1727
+ * // {
1728
+ * // "assignmentInfo": {},
1729
+ * // "completed": "my_completed",
1730
+ * // "deleted": false,
1731
+ * // "due": "my_due",
1732
+ * // "etag": "my_etag",
1733
+ * // "hidden": false,
1734
+ * // "id": "my_id",
1735
+ * // "kind": "my_kind",
1736
+ * // "links": [],
1737
+ * // "notes": "my_notes",
1738
+ * // "parent": "my_parent",
1739
+ * // "position": "my_position",
1740
+ * // "selfLink": "my_selfLink",
1741
+ * // "status": "my_status",
1742
+ * // "title": "my_title",
1743
+ * // "updated": "my_updated",
1744
+ * // "webViewLink": "my_webViewLink"
1745
+ * // }
1746
+ * }
1747
+ *
1748
+ * main().catch(e => {
1749
+ * console.error(e);
1750
+ * throw e;
1751
+ * });
1752
+ *
1753
+ * ```
1175
1754
  *
1176
1755
  * @param params - Parameters for request
1177
1756
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1262,6 +1841,80 @@ export namespace tasks_v1 {
1262
1841
 
1263
1842
  /**
1264
1843
  * 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.
1844
+ * @example
1845
+ * ```js
1846
+ * // Before running the sample:
1847
+ * // - Enable the API at:
1848
+ * // https://console.developers.google.com/apis/api/tasks.googleapis.com
1849
+ * // - Login into gcloud by running:
1850
+ * // ```sh
1851
+ * // $ gcloud auth application-default login
1852
+ * // ```
1853
+ * // - Install the npm module by running:
1854
+ * // ```sh
1855
+ * // $ npm install googleapis
1856
+ * // ```
1857
+ *
1858
+ * const {google} = require('googleapis');
1859
+ * const tasks = google.tasks('v1');
1860
+ *
1861
+ * async function main() {
1862
+ * const auth = new google.auth.GoogleAuth({
1863
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1864
+ * scopes: [
1865
+ * 'https://www.googleapis.com/auth/tasks',
1866
+ * 'https://www.googleapis.com/auth/tasks.readonly',
1867
+ * ],
1868
+ * });
1869
+ *
1870
+ * // Acquire an auth client, and bind it to all future calls
1871
+ * const authClient = await auth.getClient();
1872
+ * google.options({auth: authClient});
1873
+ *
1874
+ * // Do the magic
1875
+ * const res = await tasks.tasks.list({
1876
+ * // 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.
1877
+ * completedMax: 'placeholder-value',
1878
+ * // 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.
1879
+ * completedMin: 'placeholder-value',
1880
+ * // 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.
1881
+ * dueMax: 'placeholder-value',
1882
+ * // 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.
1883
+ * dueMin: 'placeholder-value',
1884
+ * // Maximum number of tasks returned on one page. Optional. The default is 20 (max allowed: 100).
1885
+ * maxResults: 'placeholder-value',
1886
+ * // Token specifying the result page to return. Optional.
1887
+ * pageToken: 'placeholder-value',
1888
+ * // Optional. Flag indicating whether tasks assigned to the current user are returned in the result. Optional. The default is False.
1889
+ * showAssigned: 'placeholder-value',
1890
+ * // 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.
1891
+ * showCompleted: 'placeholder-value',
1892
+ * // Flag indicating whether deleted tasks are returned in the result. Optional. The default is False.
1893
+ * showDeleted: 'placeholder-value',
1894
+ * // Flag indicating whether hidden tasks are returned in the result. Optional. The default is False.
1895
+ * showHidden: 'placeholder-value',
1896
+ * // Task list identifier.
1897
+ * tasklist: 'placeholder-value',
1898
+ * // 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.
1899
+ * updatedMin: 'placeholder-value',
1900
+ * });
1901
+ * console.log(res.data);
1902
+ *
1903
+ * // Example response
1904
+ * // {
1905
+ * // "etag": "my_etag",
1906
+ * // "items": [],
1907
+ * // "kind": "my_kind",
1908
+ * // "nextPageToken": "my_nextPageToken"
1909
+ * // }
1910
+ * }
1911
+ *
1912
+ * main().catch(e => {
1913
+ * console.error(e);
1914
+ * throw e;
1915
+ * });
1916
+ *
1917
+ * ```
1265
1918
  *
1266
1919
  * @param params - Parameters for request
1267
1920
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1352,6 +2005,76 @@ export namespace tasks_v1 {
1352
2005
 
1353
2006
  /**
1354
2007
  * 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.
2008
+ * @example
2009
+ * ```js
2010
+ * // Before running the sample:
2011
+ * // - Enable the API at:
2012
+ * // https://console.developers.google.com/apis/api/tasks.googleapis.com
2013
+ * // - Login into gcloud by running:
2014
+ * // ```sh
2015
+ * // $ gcloud auth application-default login
2016
+ * // ```
2017
+ * // - Install the npm module by running:
2018
+ * // ```sh
2019
+ * // $ npm install googleapis
2020
+ * // ```
2021
+ *
2022
+ * const {google} = require('googleapis');
2023
+ * const tasks = google.tasks('v1');
2024
+ *
2025
+ * async function main() {
2026
+ * const auth = new google.auth.GoogleAuth({
2027
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2028
+ * scopes: ['https://www.googleapis.com/auth/tasks'],
2029
+ * });
2030
+ *
2031
+ * // Acquire an auth client, and bind it to all future calls
2032
+ * const authClient = await auth.getClient();
2033
+ * google.options({auth: authClient});
2034
+ *
2035
+ * // Do the magic
2036
+ * const res = await tasks.tasks.move({
2037
+ * // 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.
2038
+ * destinationTasklist: 'placeholder-value',
2039
+ * // 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.
2040
+ * parent: 'placeholder-value',
2041
+ * // 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.
2042
+ * previous: 'placeholder-value',
2043
+ * // Task identifier.
2044
+ * task: 'placeholder-value',
2045
+ * // Task list identifier.
2046
+ * tasklist: 'placeholder-value',
2047
+ * });
2048
+ * console.log(res.data);
2049
+ *
2050
+ * // Example response
2051
+ * // {
2052
+ * // "assignmentInfo": {},
2053
+ * // "completed": "my_completed",
2054
+ * // "deleted": false,
2055
+ * // "due": "my_due",
2056
+ * // "etag": "my_etag",
2057
+ * // "hidden": false,
2058
+ * // "id": "my_id",
2059
+ * // "kind": "my_kind",
2060
+ * // "links": [],
2061
+ * // "notes": "my_notes",
2062
+ * // "parent": "my_parent",
2063
+ * // "position": "my_position",
2064
+ * // "selfLink": "my_selfLink",
2065
+ * // "status": "my_status",
2066
+ * // "title": "my_title",
2067
+ * // "updated": "my_updated",
2068
+ * // "webViewLink": "my_webViewLink"
2069
+ * // }
2070
+ * }
2071
+ *
2072
+ * main().catch(e => {
2073
+ * console.error(e);
2074
+ * throw e;
2075
+ * });
2076
+ *
2077
+ * ```
1355
2078
  *
1356
2079
  * @param params - Parameters for request
1357
2080
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1441,6 +2164,94 @@ export namespace tasks_v1 {
1441
2164
 
1442
2165
  /**
1443
2166
  * Updates the specified task. This method supports patch semantics.
2167
+ * @example
2168
+ * ```js
2169
+ * // Before running the sample:
2170
+ * // - Enable the API at:
2171
+ * // https://console.developers.google.com/apis/api/tasks.googleapis.com
2172
+ * // - Login into gcloud by running:
2173
+ * // ```sh
2174
+ * // $ gcloud auth application-default login
2175
+ * // ```
2176
+ * // - Install the npm module by running:
2177
+ * // ```sh
2178
+ * // $ npm install googleapis
2179
+ * // ```
2180
+ *
2181
+ * const {google} = require('googleapis');
2182
+ * const tasks = google.tasks('v1');
2183
+ *
2184
+ * async function main() {
2185
+ * const auth = new google.auth.GoogleAuth({
2186
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2187
+ * scopes: ['https://www.googleapis.com/auth/tasks'],
2188
+ * });
2189
+ *
2190
+ * // Acquire an auth client, and bind it to all future calls
2191
+ * const authClient = await auth.getClient();
2192
+ * google.options({auth: authClient});
2193
+ *
2194
+ * // Do the magic
2195
+ * const res = await tasks.tasks.patch({
2196
+ * // Task identifier.
2197
+ * task: 'placeholder-value',
2198
+ * // Task list identifier.
2199
+ * tasklist: 'placeholder-value',
2200
+ *
2201
+ * // Request body metadata
2202
+ * requestBody: {
2203
+ * // request body parameters
2204
+ * // {
2205
+ * // "assignmentInfo": {},
2206
+ * // "completed": "my_completed",
2207
+ * // "deleted": false,
2208
+ * // "due": "my_due",
2209
+ * // "etag": "my_etag",
2210
+ * // "hidden": false,
2211
+ * // "id": "my_id",
2212
+ * // "kind": "my_kind",
2213
+ * // "links": [],
2214
+ * // "notes": "my_notes",
2215
+ * // "parent": "my_parent",
2216
+ * // "position": "my_position",
2217
+ * // "selfLink": "my_selfLink",
2218
+ * // "status": "my_status",
2219
+ * // "title": "my_title",
2220
+ * // "updated": "my_updated",
2221
+ * // "webViewLink": "my_webViewLink"
2222
+ * // }
2223
+ * },
2224
+ * });
2225
+ * console.log(res.data);
2226
+ *
2227
+ * // Example response
2228
+ * // {
2229
+ * // "assignmentInfo": {},
2230
+ * // "completed": "my_completed",
2231
+ * // "deleted": false,
2232
+ * // "due": "my_due",
2233
+ * // "etag": "my_etag",
2234
+ * // "hidden": false,
2235
+ * // "id": "my_id",
2236
+ * // "kind": "my_kind",
2237
+ * // "links": [],
2238
+ * // "notes": "my_notes",
2239
+ * // "parent": "my_parent",
2240
+ * // "position": "my_position",
2241
+ * // "selfLink": "my_selfLink",
2242
+ * // "status": "my_status",
2243
+ * // "title": "my_title",
2244
+ * // "updated": "my_updated",
2245
+ * // "webViewLink": "my_webViewLink"
2246
+ * // }
2247
+ * }
2248
+ *
2249
+ * main().catch(e => {
2250
+ * console.error(e);
2251
+ * throw e;
2252
+ * });
2253
+ *
2254
+ * ```
1444
2255
  *
1445
2256
  * @param params - Parameters for request
1446
2257
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1531,6 +2342,94 @@ export namespace tasks_v1 {
1531
2342
 
1532
2343
  /**
1533
2344
  * Updates the specified task.
2345
+ * @example
2346
+ * ```js
2347
+ * // Before running the sample:
2348
+ * // - Enable the API at:
2349
+ * // https://console.developers.google.com/apis/api/tasks.googleapis.com
2350
+ * // - Login into gcloud by running:
2351
+ * // ```sh
2352
+ * // $ gcloud auth application-default login
2353
+ * // ```
2354
+ * // - Install the npm module by running:
2355
+ * // ```sh
2356
+ * // $ npm install googleapis
2357
+ * // ```
2358
+ *
2359
+ * const {google} = require('googleapis');
2360
+ * const tasks = google.tasks('v1');
2361
+ *
2362
+ * async function main() {
2363
+ * const auth = new google.auth.GoogleAuth({
2364
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2365
+ * scopes: ['https://www.googleapis.com/auth/tasks'],
2366
+ * });
2367
+ *
2368
+ * // Acquire an auth client, and bind it to all future calls
2369
+ * const authClient = await auth.getClient();
2370
+ * google.options({auth: authClient});
2371
+ *
2372
+ * // Do the magic
2373
+ * const res = await tasks.tasks.update({
2374
+ * // Task identifier.
2375
+ * task: 'placeholder-value',
2376
+ * // Task list identifier.
2377
+ * tasklist: 'placeholder-value',
2378
+ *
2379
+ * // Request body metadata
2380
+ * requestBody: {
2381
+ * // request body parameters
2382
+ * // {
2383
+ * // "assignmentInfo": {},
2384
+ * // "completed": "my_completed",
2385
+ * // "deleted": false,
2386
+ * // "due": "my_due",
2387
+ * // "etag": "my_etag",
2388
+ * // "hidden": false,
2389
+ * // "id": "my_id",
2390
+ * // "kind": "my_kind",
2391
+ * // "links": [],
2392
+ * // "notes": "my_notes",
2393
+ * // "parent": "my_parent",
2394
+ * // "position": "my_position",
2395
+ * // "selfLink": "my_selfLink",
2396
+ * // "status": "my_status",
2397
+ * // "title": "my_title",
2398
+ * // "updated": "my_updated",
2399
+ * // "webViewLink": "my_webViewLink"
2400
+ * // }
2401
+ * },
2402
+ * });
2403
+ * console.log(res.data);
2404
+ *
2405
+ * // Example response
2406
+ * // {
2407
+ * // "assignmentInfo": {},
2408
+ * // "completed": "my_completed",
2409
+ * // "deleted": false,
2410
+ * // "due": "my_due",
2411
+ * // "etag": "my_etag",
2412
+ * // "hidden": false,
2413
+ * // "id": "my_id",
2414
+ * // "kind": "my_kind",
2415
+ * // "links": [],
2416
+ * // "notes": "my_notes",
2417
+ * // "parent": "my_parent",
2418
+ * // "position": "my_position",
2419
+ * // "selfLink": "my_selfLink",
2420
+ * // "status": "my_status",
2421
+ * // "title": "my_title",
2422
+ * // "updated": "my_updated",
2423
+ * // "webViewLink": "my_webViewLink"
2424
+ * // }
2425
+ * }
2426
+ *
2427
+ * main().catch(e => {
2428
+ * console.error(e);
2429
+ * throw e;
2430
+ * });
2431
+ *
2432
+ * ```
1534
2433
  *
1535
2434
  * @param params - Parameters for request
1536
2435
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1721,7 +2620,7 @@ export namespace tasks_v1 {
1721
2620
  */
1722
2621
  destinationTasklist?: string;
1723
2622
  /**
1724
- * 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 can not be set as parent task (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.
2623
+ * 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.
1725
2624
  */
1726
2625
  parent?: string;
1727
2626
  /**