@googleapis/searchconsole 1.0.5 → 3.0.1

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
@@ -23,7 +23,7 @@ import {
23
23
  Compute,
24
24
  UserRefreshClient,
25
25
  BaseExternalAccountClient,
26
- GaxiosPromise,
26
+ GaxiosResponseWithHTTP2,
27
27
  GoogleConfigurable,
28
28
  createAPIRequest,
29
29
  MethodOptions,
@@ -630,6 +630,73 @@ export namespace searchconsole_v1 {
630
630
 
631
631
  /**
632
632
  * Query your data with filters and parameters that you define. Returns zero or more rows grouped by the row keys that you define. You must define a date range of one or more days. When date is one of the group by values, any days without data are omitted from the result list. If you need to know which days have data, issue a broad date range query grouped by date for any metric, and see which day rows are returned.
633
+ * @example
634
+ * ```js
635
+ * // Before running the sample:
636
+ * // - Enable the API at:
637
+ * // https://console.developers.google.com/apis/api/searchconsole.googleapis.com
638
+ * // - Login into gcloud by running:
639
+ * // ```sh
640
+ * // $ gcloud auth application-default login
641
+ * // ```
642
+ * // - Install the npm module by running:
643
+ * // ```sh
644
+ * // $ npm install googleapis
645
+ * // ```
646
+ *
647
+ * const {google} = require('googleapis');
648
+ * const searchconsole = google.searchconsole('v1');
649
+ *
650
+ * async function main() {
651
+ * const auth = new google.auth.GoogleAuth({
652
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
653
+ * scopes: [
654
+ * 'https://www.googleapis.com/auth/webmasters',
655
+ * 'https://www.googleapis.com/auth/webmasters.readonly',
656
+ * ],
657
+ * });
658
+ *
659
+ * // Acquire an auth client, and bind it to all future calls
660
+ * const authClient = await auth.getClient();
661
+ * google.options({auth: authClient});
662
+ *
663
+ * // Do the magic
664
+ * const res = await webmasters.searchanalytics.query({
665
+ * // The site's URL, including protocol. For example: `http://www.example.com/`.
666
+ * siteUrl: 'placeholder-value',
667
+ *
668
+ * // Request body metadata
669
+ * requestBody: {
670
+ * // request body parameters
671
+ * // {
672
+ * // "aggregationType": "my_aggregationType",
673
+ * // "dataState": "my_dataState",
674
+ * // "dimensionFilterGroups": [],
675
+ * // "dimensions": [],
676
+ * // "endDate": "my_endDate",
677
+ * // "rowLimit": 0,
678
+ * // "searchType": "my_searchType",
679
+ * // "startDate": "my_startDate",
680
+ * // "startRow": 0,
681
+ * // "type": "my_type"
682
+ * // }
683
+ * },
684
+ * });
685
+ * console.log(res.data);
686
+ *
687
+ * // Example response
688
+ * // {
689
+ * // "responseAggregationType": "my_responseAggregationType",
690
+ * // "rows": []
691
+ * // }
692
+ * }
693
+ *
694
+ * main().catch(e => {
695
+ * console.error(e);
696
+ * throw e;
697
+ * });
698
+ *
699
+ * ```
633
700
  *
634
701
  * @param params - Parameters for request
635
702
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -639,11 +706,11 @@ export namespace searchconsole_v1 {
639
706
  query(
640
707
  params: Params$Resource$Searchanalytics$Query,
641
708
  options: StreamMethodOptions
642
- ): GaxiosPromise<Readable>;
709
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
643
710
  query(
644
711
  params?: Params$Resource$Searchanalytics$Query,
645
712
  options?: MethodOptions
646
- ): GaxiosPromise<Schema$SearchAnalyticsQueryResponse>;
713
+ ): Promise<GaxiosResponseWithHTTP2<Schema$SearchAnalyticsQueryResponse>>;
647
714
  query(
648
715
  params: Params$Resource$Searchanalytics$Query,
649
716
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -678,8 +745,8 @@ export namespace searchconsole_v1 {
678
745
  | BodyResponseCallback<Readable>
679
746
  ):
680
747
  | void
681
- | GaxiosPromise<Schema$SearchAnalyticsQueryResponse>
682
- | GaxiosPromise<Readable> {
748
+ | Promise<GaxiosResponseWithHTTP2<Schema$SearchAnalyticsQueryResponse>>
749
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
683
750
  let params = (paramsOrCallback ||
684
751
  {}) as Params$Resource$Searchanalytics$Query;
685
752
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -747,6 +814,49 @@ export namespace searchconsole_v1 {
747
814
 
748
815
  /**
749
816
  * Deletes a sitemap from the Sitemaps report. Does not stop Google from crawling this sitemap or the URLs that were previously crawled in the deleted sitemap.
817
+ * @example
818
+ * ```js
819
+ * // Before running the sample:
820
+ * // - Enable the API at:
821
+ * // https://console.developers.google.com/apis/api/searchconsole.googleapis.com
822
+ * // - Login into gcloud by running:
823
+ * // ```sh
824
+ * // $ gcloud auth application-default login
825
+ * // ```
826
+ * // - Install the npm module by running:
827
+ * // ```sh
828
+ * // $ npm install googleapis
829
+ * // ```
830
+ *
831
+ * const {google} = require('googleapis');
832
+ * const searchconsole = google.searchconsole('v1');
833
+ *
834
+ * async function main() {
835
+ * const auth = new google.auth.GoogleAuth({
836
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
837
+ * scopes: ['https://www.googleapis.com/auth/webmasters'],
838
+ * });
839
+ *
840
+ * // Acquire an auth client, and bind it to all future calls
841
+ * const authClient = await auth.getClient();
842
+ * google.options({auth: authClient});
843
+ *
844
+ * // Do the magic
845
+ * const res = await webmasters.sitemaps.delete({
846
+ * // The URL of the actual sitemap. For example: `http://www.example.com/sitemap.xml`.
847
+ * feedpath: 'placeholder-value',
848
+ * // The site's URL, including protocol. For example: `http://www.example.com/`.
849
+ * siteUrl: 'placeholder-value',
850
+ * });
851
+ * console.log(res.data);
852
+ * }
853
+ *
854
+ * main().catch(e => {
855
+ * console.error(e);
856
+ * throw e;
857
+ * });
858
+ *
859
+ * ```
750
860
  *
751
861
  * @param params - Parameters for request
752
862
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -756,11 +866,11 @@ export namespace searchconsole_v1 {
756
866
  delete(
757
867
  params: Params$Resource$Sitemaps$Delete,
758
868
  options: StreamMethodOptions
759
- ): GaxiosPromise<Readable>;
869
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
760
870
  delete(
761
871
  params?: Params$Resource$Sitemaps$Delete,
762
872
  options?: MethodOptions
763
- ): GaxiosPromise<void>;
873
+ ): Promise<GaxiosResponseWithHTTP2<void>>;
764
874
  delete(
765
875
  params: Params$Resource$Sitemaps$Delete,
766
876
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -787,7 +897,10 @@ export namespace searchconsole_v1 {
787
897
  | BodyResponseCallback<void>
788
898
  | BodyResponseCallback<Readable>,
789
899
  callback?: BodyResponseCallback<void> | BodyResponseCallback<Readable>
790
- ): void | GaxiosPromise<void> | GaxiosPromise<Readable> {
900
+ ):
901
+ | void
902
+ | Promise<GaxiosResponseWithHTTP2<void>>
903
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
791
904
  let params = (paramsOrCallback || {}) as Params$Resource$Sitemaps$Delete;
792
905
  let options = (optionsOrCallback || {}) as MethodOptions;
793
906
 
@@ -832,6 +945,65 @@ export namespace searchconsole_v1 {
832
945
 
833
946
  /**
834
947
  * Retrieves information about a specific sitemap.
948
+ * @example
949
+ * ```js
950
+ * // Before running the sample:
951
+ * // - Enable the API at:
952
+ * // https://console.developers.google.com/apis/api/searchconsole.googleapis.com
953
+ * // - Login into gcloud by running:
954
+ * // ```sh
955
+ * // $ gcloud auth application-default login
956
+ * // ```
957
+ * // - Install the npm module by running:
958
+ * // ```sh
959
+ * // $ npm install googleapis
960
+ * // ```
961
+ *
962
+ * const {google} = require('googleapis');
963
+ * const searchconsole = google.searchconsole('v1');
964
+ *
965
+ * async function main() {
966
+ * const auth = new google.auth.GoogleAuth({
967
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
968
+ * scopes: [
969
+ * 'https://www.googleapis.com/auth/webmasters',
970
+ * 'https://www.googleapis.com/auth/webmasters.readonly',
971
+ * ],
972
+ * });
973
+ *
974
+ * // Acquire an auth client, and bind it to all future calls
975
+ * const authClient = await auth.getClient();
976
+ * google.options({auth: authClient});
977
+ *
978
+ * // Do the magic
979
+ * const res = await webmasters.sitemaps.get({
980
+ * // The URL of the actual sitemap. For example: `http://www.example.com/sitemap.xml`.
981
+ * feedpath: 'placeholder-value',
982
+ * // The site's URL, including protocol. For example: `http://www.example.com/`.
983
+ * siteUrl: 'placeholder-value',
984
+ * });
985
+ * console.log(res.data);
986
+ *
987
+ * // Example response
988
+ * // {
989
+ * // "contents": [],
990
+ * // "errors": "my_errors",
991
+ * // "isPending": false,
992
+ * // "isSitemapsIndex": false,
993
+ * // "lastDownloaded": "my_lastDownloaded",
994
+ * // "lastSubmitted": "my_lastSubmitted",
995
+ * // "path": "my_path",
996
+ * // "type": "my_type",
997
+ * // "warnings": "my_warnings"
998
+ * // }
999
+ * }
1000
+ *
1001
+ * main().catch(e => {
1002
+ * console.error(e);
1003
+ * throw e;
1004
+ * });
1005
+ *
1006
+ * ```
835
1007
  *
836
1008
  * @param params - Parameters for request
837
1009
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -841,11 +1013,11 @@ export namespace searchconsole_v1 {
841
1013
  get(
842
1014
  params: Params$Resource$Sitemaps$Get,
843
1015
  options: StreamMethodOptions
844
- ): GaxiosPromise<Readable>;
1016
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
845
1017
  get(
846
1018
  params?: Params$Resource$Sitemaps$Get,
847
1019
  options?: MethodOptions
848
- ): GaxiosPromise<Schema$WmxSitemap>;
1020
+ ): Promise<GaxiosResponseWithHTTP2<Schema$WmxSitemap>>;
849
1021
  get(
850
1022
  params: Params$Resource$Sitemaps$Get,
851
1023
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -874,7 +1046,10 @@ export namespace searchconsole_v1 {
874
1046
  callback?:
875
1047
  | BodyResponseCallback<Schema$WmxSitemap>
876
1048
  | BodyResponseCallback<Readable>
877
- ): void | GaxiosPromise<Schema$WmxSitemap> | GaxiosPromise<Readable> {
1049
+ ):
1050
+ | void
1051
+ | Promise<GaxiosResponseWithHTTP2<Schema$WmxSitemap>>
1052
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
878
1053
  let params = (paramsOrCallback || {}) as Params$Resource$Sitemaps$Get;
879
1054
  let options = (optionsOrCallback || {}) as MethodOptions;
880
1055
 
@@ -919,6 +1094,57 @@ export namespace searchconsole_v1 {
919
1094
 
920
1095
  /**
921
1096
  * Lists the [sitemaps-entries](/webmaster-tools/v3/sitemaps) submitted for this site, or included in the sitemap index file (if `sitemapIndex` is specified in the request).
1097
+ * @example
1098
+ * ```js
1099
+ * // Before running the sample:
1100
+ * // - Enable the API at:
1101
+ * // https://console.developers.google.com/apis/api/searchconsole.googleapis.com
1102
+ * // - Login into gcloud by running:
1103
+ * // ```sh
1104
+ * // $ gcloud auth application-default login
1105
+ * // ```
1106
+ * // - Install the npm module by running:
1107
+ * // ```sh
1108
+ * // $ npm install googleapis
1109
+ * // ```
1110
+ *
1111
+ * const {google} = require('googleapis');
1112
+ * const searchconsole = google.searchconsole('v1');
1113
+ *
1114
+ * async function main() {
1115
+ * const auth = new google.auth.GoogleAuth({
1116
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1117
+ * scopes: [
1118
+ * 'https://www.googleapis.com/auth/webmasters',
1119
+ * 'https://www.googleapis.com/auth/webmasters.readonly',
1120
+ * ],
1121
+ * });
1122
+ *
1123
+ * // Acquire an auth client, and bind it to all future calls
1124
+ * const authClient = await auth.getClient();
1125
+ * google.options({auth: authClient});
1126
+ *
1127
+ * // Do the magic
1128
+ * const res = await webmasters.sitemaps.list({
1129
+ * // A URL of a site's sitemap index. For example: `http://www.example.com/sitemapindex.xml`.
1130
+ * sitemapIndex: 'placeholder-value',
1131
+ * // The site's URL, including protocol. For example: `http://www.example.com/`.
1132
+ * siteUrl: 'placeholder-value',
1133
+ * });
1134
+ * console.log(res.data);
1135
+ *
1136
+ * // Example response
1137
+ * // {
1138
+ * // "sitemap": []
1139
+ * // }
1140
+ * }
1141
+ *
1142
+ * main().catch(e => {
1143
+ * console.error(e);
1144
+ * throw e;
1145
+ * });
1146
+ *
1147
+ * ```
922
1148
  *
923
1149
  * @param params - Parameters for request
924
1150
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -928,11 +1154,11 @@ export namespace searchconsole_v1 {
928
1154
  list(
929
1155
  params: Params$Resource$Sitemaps$List,
930
1156
  options: StreamMethodOptions
931
- ): GaxiosPromise<Readable>;
1157
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
932
1158
  list(
933
1159
  params?: Params$Resource$Sitemaps$List,
934
1160
  options?: MethodOptions
935
- ): GaxiosPromise<Schema$SitemapsListResponse>;
1161
+ ): Promise<GaxiosResponseWithHTTP2<Schema$SitemapsListResponse>>;
936
1162
  list(
937
1163
  params: Params$Resource$Sitemaps$List,
938
1164
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -965,8 +1191,8 @@ export namespace searchconsole_v1 {
965
1191
  | BodyResponseCallback<Readable>
966
1192
  ):
967
1193
  | void
968
- | GaxiosPromise<Schema$SitemapsListResponse>
969
- | GaxiosPromise<Readable> {
1194
+ | Promise<GaxiosResponseWithHTTP2<Schema$SitemapsListResponse>>
1195
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
970
1196
  let params = (paramsOrCallback || {}) as Params$Resource$Sitemaps$List;
971
1197
  let options = (optionsOrCallback || {}) as MethodOptions;
972
1198
 
@@ -1012,6 +1238,49 @@ export namespace searchconsole_v1 {
1012
1238
 
1013
1239
  /**
1014
1240
  * Submits a sitemap for a site.
1241
+ * @example
1242
+ * ```js
1243
+ * // Before running the sample:
1244
+ * // - Enable the API at:
1245
+ * // https://console.developers.google.com/apis/api/searchconsole.googleapis.com
1246
+ * // - Login into gcloud by running:
1247
+ * // ```sh
1248
+ * // $ gcloud auth application-default login
1249
+ * // ```
1250
+ * // - Install the npm module by running:
1251
+ * // ```sh
1252
+ * // $ npm install googleapis
1253
+ * // ```
1254
+ *
1255
+ * const {google} = require('googleapis');
1256
+ * const searchconsole = google.searchconsole('v1');
1257
+ *
1258
+ * async function main() {
1259
+ * const auth = new google.auth.GoogleAuth({
1260
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1261
+ * scopes: ['https://www.googleapis.com/auth/webmasters'],
1262
+ * });
1263
+ *
1264
+ * // Acquire an auth client, and bind it to all future calls
1265
+ * const authClient = await auth.getClient();
1266
+ * google.options({auth: authClient});
1267
+ *
1268
+ * // Do the magic
1269
+ * const res = await webmasters.sitemaps.submit({
1270
+ * // The URL of the actual sitemap. For example: `http://www.example.com/sitemap.xml`.
1271
+ * feedpath: 'placeholder-value',
1272
+ * // The site's URL, including protocol. For example: `http://www.example.com/`.
1273
+ * siteUrl: 'placeholder-value',
1274
+ * });
1275
+ * console.log(res.data);
1276
+ * }
1277
+ *
1278
+ * main().catch(e => {
1279
+ * console.error(e);
1280
+ * throw e;
1281
+ * });
1282
+ *
1283
+ * ```
1015
1284
  *
1016
1285
  * @param params - Parameters for request
1017
1286
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1021,11 +1290,11 @@ export namespace searchconsole_v1 {
1021
1290
  submit(
1022
1291
  params: Params$Resource$Sitemaps$Submit,
1023
1292
  options: StreamMethodOptions
1024
- ): GaxiosPromise<Readable>;
1293
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
1025
1294
  submit(
1026
1295
  params?: Params$Resource$Sitemaps$Submit,
1027
1296
  options?: MethodOptions
1028
- ): GaxiosPromise<void>;
1297
+ ): Promise<GaxiosResponseWithHTTP2<void>>;
1029
1298
  submit(
1030
1299
  params: Params$Resource$Sitemaps$Submit,
1031
1300
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -1052,7 +1321,10 @@ export namespace searchconsole_v1 {
1052
1321
  | BodyResponseCallback<void>
1053
1322
  | BodyResponseCallback<Readable>,
1054
1323
  callback?: BodyResponseCallback<void> | BodyResponseCallback<Readable>
1055
- ): void | GaxiosPromise<void> | GaxiosPromise<Readable> {
1324
+ ):
1325
+ | void
1326
+ | Promise<GaxiosResponseWithHTTP2<void>>
1327
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1056
1328
  let params = (paramsOrCallback || {}) as Params$Resource$Sitemaps$Submit;
1057
1329
  let options = (optionsOrCallback || {}) as MethodOptions;
1058
1330
 
@@ -1145,6 +1417,47 @@ export namespace searchconsole_v1 {
1145
1417
 
1146
1418
  /**
1147
1419
  * Adds a site to the set of the user's sites in Search Console.
1420
+ * @example
1421
+ * ```js
1422
+ * // Before running the sample:
1423
+ * // - Enable the API at:
1424
+ * // https://console.developers.google.com/apis/api/searchconsole.googleapis.com
1425
+ * // - Login into gcloud by running:
1426
+ * // ```sh
1427
+ * // $ gcloud auth application-default login
1428
+ * // ```
1429
+ * // - Install the npm module by running:
1430
+ * // ```sh
1431
+ * // $ npm install googleapis
1432
+ * // ```
1433
+ *
1434
+ * const {google} = require('googleapis');
1435
+ * const searchconsole = google.searchconsole('v1');
1436
+ *
1437
+ * async function main() {
1438
+ * const auth = new google.auth.GoogleAuth({
1439
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1440
+ * scopes: ['https://www.googleapis.com/auth/webmasters'],
1441
+ * });
1442
+ *
1443
+ * // Acquire an auth client, and bind it to all future calls
1444
+ * const authClient = await auth.getClient();
1445
+ * google.options({auth: authClient});
1446
+ *
1447
+ * // Do the magic
1448
+ * const res = await webmasters.sites.add({
1449
+ * // The URL of the site to add.
1450
+ * siteUrl: 'placeholder-value',
1451
+ * });
1452
+ * console.log(res.data);
1453
+ * }
1454
+ *
1455
+ * main().catch(e => {
1456
+ * console.error(e);
1457
+ * throw e;
1458
+ * });
1459
+ *
1460
+ * ```
1148
1461
  *
1149
1462
  * @param params - Parameters for request
1150
1463
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1154,11 +1467,11 @@ export namespace searchconsole_v1 {
1154
1467
  add(
1155
1468
  params: Params$Resource$Sites$Add,
1156
1469
  options: StreamMethodOptions
1157
- ): GaxiosPromise<Readable>;
1470
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
1158
1471
  add(
1159
1472
  params?: Params$Resource$Sites$Add,
1160
1473
  options?: MethodOptions
1161
- ): GaxiosPromise<void>;
1474
+ ): Promise<GaxiosResponseWithHTTP2<void>>;
1162
1475
  add(
1163
1476
  params: Params$Resource$Sites$Add,
1164
1477
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -1185,7 +1498,10 @@ export namespace searchconsole_v1 {
1185
1498
  | BodyResponseCallback<void>
1186
1499
  | BodyResponseCallback<Readable>,
1187
1500
  callback?: BodyResponseCallback<void> | BodyResponseCallback<Readable>
1188
- ): void | GaxiosPromise<void> | GaxiosPromise<Readable> {
1501
+ ):
1502
+ | void
1503
+ | Promise<GaxiosResponseWithHTTP2<void>>
1504
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1189
1505
  let params = (paramsOrCallback || {}) as Params$Resource$Sites$Add;
1190
1506
  let options = (optionsOrCallback || {}) as MethodOptions;
1191
1507
 
@@ -1231,6 +1547,47 @@ export namespace searchconsole_v1 {
1231
1547
 
1232
1548
  /**
1233
1549
  * Removes a site from the set of the user's Search Console sites.
1550
+ * @example
1551
+ * ```js
1552
+ * // Before running the sample:
1553
+ * // - Enable the API at:
1554
+ * // https://console.developers.google.com/apis/api/searchconsole.googleapis.com
1555
+ * // - Login into gcloud by running:
1556
+ * // ```sh
1557
+ * // $ gcloud auth application-default login
1558
+ * // ```
1559
+ * // - Install the npm module by running:
1560
+ * // ```sh
1561
+ * // $ npm install googleapis
1562
+ * // ```
1563
+ *
1564
+ * const {google} = require('googleapis');
1565
+ * const searchconsole = google.searchconsole('v1');
1566
+ *
1567
+ * async function main() {
1568
+ * const auth = new google.auth.GoogleAuth({
1569
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1570
+ * scopes: ['https://www.googleapis.com/auth/webmasters'],
1571
+ * });
1572
+ *
1573
+ * // Acquire an auth client, and bind it to all future calls
1574
+ * const authClient = await auth.getClient();
1575
+ * google.options({auth: authClient});
1576
+ *
1577
+ * // Do the magic
1578
+ * const res = await webmasters.sites.delete({
1579
+ * // The URI of the property as defined in Search Console. **Examples:** `http://www.example.com/` or `sc-domain:example.com`.
1580
+ * siteUrl: 'placeholder-value',
1581
+ * });
1582
+ * console.log(res.data);
1583
+ * }
1584
+ *
1585
+ * main().catch(e => {
1586
+ * console.error(e);
1587
+ * throw e;
1588
+ * });
1589
+ *
1590
+ * ```
1234
1591
  *
1235
1592
  * @param params - Parameters for request
1236
1593
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1240,11 +1597,11 @@ export namespace searchconsole_v1 {
1240
1597
  delete(
1241
1598
  params: Params$Resource$Sites$Delete,
1242
1599
  options: StreamMethodOptions
1243
- ): GaxiosPromise<Readable>;
1600
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
1244
1601
  delete(
1245
1602
  params?: Params$Resource$Sites$Delete,
1246
1603
  options?: MethodOptions
1247
- ): GaxiosPromise<void>;
1604
+ ): Promise<GaxiosResponseWithHTTP2<void>>;
1248
1605
  delete(
1249
1606
  params: Params$Resource$Sites$Delete,
1250
1607
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -1271,7 +1628,10 @@ export namespace searchconsole_v1 {
1271
1628
  | BodyResponseCallback<void>
1272
1629
  | BodyResponseCallback<Readable>,
1273
1630
  callback?: BodyResponseCallback<void> | BodyResponseCallback<Readable>
1274
- ): void | GaxiosPromise<void> | GaxiosPromise<Readable> {
1631
+ ):
1632
+ | void
1633
+ | Promise<GaxiosResponseWithHTTP2<void>>
1634
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1275
1635
  let params = (paramsOrCallback || {}) as Params$Resource$Sites$Delete;
1276
1636
  let options = (optionsOrCallback || {}) as MethodOptions;
1277
1637
 
@@ -1317,6 +1677,56 @@ export namespace searchconsole_v1 {
1317
1677
 
1318
1678
  /**
1319
1679
  * Retrieves information about specific site.
1680
+ * @example
1681
+ * ```js
1682
+ * // Before running the sample:
1683
+ * // - Enable the API at:
1684
+ * // https://console.developers.google.com/apis/api/searchconsole.googleapis.com
1685
+ * // - Login into gcloud by running:
1686
+ * // ```sh
1687
+ * // $ gcloud auth application-default login
1688
+ * // ```
1689
+ * // - Install the npm module by running:
1690
+ * // ```sh
1691
+ * // $ npm install googleapis
1692
+ * // ```
1693
+ *
1694
+ * const {google} = require('googleapis');
1695
+ * const searchconsole = google.searchconsole('v1');
1696
+ *
1697
+ * async function main() {
1698
+ * const auth = new google.auth.GoogleAuth({
1699
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1700
+ * scopes: [
1701
+ * 'https://www.googleapis.com/auth/webmasters',
1702
+ * 'https://www.googleapis.com/auth/webmasters.readonly',
1703
+ * ],
1704
+ * });
1705
+ *
1706
+ * // Acquire an auth client, and bind it to all future calls
1707
+ * const authClient = await auth.getClient();
1708
+ * google.options({auth: authClient});
1709
+ *
1710
+ * // Do the magic
1711
+ * const res = await webmasters.sites.get({
1712
+ * // The URI of the property as defined in Search Console. **Examples:** `http://www.example.com/` or `sc-domain:example.com`.
1713
+ * siteUrl: 'placeholder-value',
1714
+ * });
1715
+ * console.log(res.data);
1716
+ *
1717
+ * // Example response
1718
+ * // {
1719
+ * // "permissionLevel": "my_permissionLevel",
1720
+ * // "siteUrl": "my_siteUrl"
1721
+ * // }
1722
+ * }
1723
+ *
1724
+ * main().catch(e => {
1725
+ * console.error(e);
1726
+ * throw e;
1727
+ * });
1728
+ *
1729
+ * ```
1320
1730
  *
1321
1731
  * @param params - Parameters for request
1322
1732
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1326,11 +1736,11 @@ export namespace searchconsole_v1 {
1326
1736
  get(
1327
1737
  params: Params$Resource$Sites$Get,
1328
1738
  options: StreamMethodOptions
1329
- ): GaxiosPromise<Readable>;
1739
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
1330
1740
  get(
1331
1741
  params?: Params$Resource$Sites$Get,
1332
1742
  options?: MethodOptions
1333
- ): GaxiosPromise<Schema$WmxSite>;
1743
+ ): Promise<GaxiosResponseWithHTTP2<Schema$WmxSite>>;
1334
1744
  get(
1335
1745
  params: Params$Resource$Sites$Get,
1336
1746
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -1359,7 +1769,10 @@ export namespace searchconsole_v1 {
1359
1769
  callback?:
1360
1770
  | BodyResponseCallback<Schema$WmxSite>
1361
1771
  | BodyResponseCallback<Readable>
1362
- ): void | GaxiosPromise<Schema$WmxSite> | GaxiosPromise<Readable> {
1772
+ ):
1773
+ | void
1774
+ | Promise<GaxiosResponseWithHTTP2<Schema$WmxSite>>
1775
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1363
1776
  let params = (paramsOrCallback || {}) as Params$Resource$Sites$Get;
1364
1777
  let options = (optionsOrCallback || {}) as MethodOptions;
1365
1778
 
@@ -1405,6 +1818,52 @@ export namespace searchconsole_v1 {
1405
1818
 
1406
1819
  /**
1407
1820
  * Lists the user's Search Console sites.
1821
+ * @example
1822
+ * ```js
1823
+ * // Before running the sample:
1824
+ * // - Enable the API at:
1825
+ * // https://console.developers.google.com/apis/api/searchconsole.googleapis.com
1826
+ * // - Login into gcloud by running:
1827
+ * // ```sh
1828
+ * // $ gcloud auth application-default login
1829
+ * // ```
1830
+ * // - Install the npm module by running:
1831
+ * // ```sh
1832
+ * // $ npm install googleapis
1833
+ * // ```
1834
+ *
1835
+ * const {google} = require('googleapis');
1836
+ * const searchconsole = google.searchconsole('v1');
1837
+ *
1838
+ * async function main() {
1839
+ * const auth = new google.auth.GoogleAuth({
1840
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1841
+ * scopes: [
1842
+ * 'https://www.googleapis.com/auth/webmasters',
1843
+ * 'https://www.googleapis.com/auth/webmasters.readonly',
1844
+ * ],
1845
+ * });
1846
+ *
1847
+ * // Acquire an auth client, and bind it to all future calls
1848
+ * const authClient = await auth.getClient();
1849
+ * google.options({auth: authClient});
1850
+ *
1851
+ * // Do the magic
1852
+ * const res = await webmasters.sites.list({});
1853
+ * console.log(res.data);
1854
+ *
1855
+ * // Example response
1856
+ * // {
1857
+ * // "siteEntry": []
1858
+ * // }
1859
+ * }
1860
+ *
1861
+ * main().catch(e => {
1862
+ * console.error(e);
1863
+ * throw e;
1864
+ * });
1865
+ *
1866
+ * ```
1408
1867
  *
1409
1868
  * @param params - Parameters for request
1410
1869
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1414,11 +1873,11 @@ export namespace searchconsole_v1 {
1414
1873
  list(
1415
1874
  params: Params$Resource$Sites$List,
1416
1875
  options: StreamMethodOptions
1417
- ): GaxiosPromise<Readable>;
1876
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
1418
1877
  list(
1419
1878
  params?: Params$Resource$Sites$List,
1420
1879
  options?: MethodOptions
1421
- ): GaxiosPromise<Schema$SitesListResponse>;
1880
+ ): Promise<GaxiosResponseWithHTTP2<Schema$SitesListResponse>>;
1422
1881
  list(
1423
1882
  params: Params$Resource$Sites$List,
1424
1883
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -1449,8 +1908,8 @@ export namespace searchconsole_v1 {
1449
1908
  | BodyResponseCallback<Readable>
1450
1909
  ):
1451
1910
  | void
1452
- | GaxiosPromise<Schema$SitesListResponse>
1453
- | GaxiosPromise<Readable> {
1911
+ | Promise<GaxiosResponseWithHTTP2<Schema$SitesListResponse>>
1912
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1454
1913
  let params = (paramsOrCallback || {}) as Params$Resource$Sites$List;
1455
1914
  let options = (optionsOrCallback || {}) as MethodOptions;
1456
1915
 
@@ -1532,6 +1991,62 @@ export namespace searchconsole_v1 {
1532
1991
 
1533
1992
  /**
1534
1993
  * Index inspection.
1994
+ * @example
1995
+ * ```js
1996
+ * // Before running the sample:
1997
+ * // - Enable the API at:
1998
+ * // https://console.developers.google.com/apis/api/searchconsole.googleapis.com
1999
+ * // - Login into gcloud by running:
2000
+ * // ```sh
2001
+ * // $ gcloud auth application-default login
2002
+ * // ```
2003
+ * // - Install the npm module by running:
2004
+ * // ```sh
2005
+ * // $ npm install googleapis
2006
+ * // ```
2007
+ *
2008
+ * const {google} = require('googleapis');
2009
+ * const searchconsole = google.searchconsole('v1');
2010
+ *
2011
+ * async function main() {
2012
+ * const auth = new google.auth.GoogleAuth({
2013
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2014
+ * scopes: [
2015
+ * 'https://www.googleapis.com/auth/webmasters',
2016
+ * 'https://www.googleapis.com/auth/webmasters.readonly',
2017
+ * ],
2018
+ * });
2019
+ *
2020
+ * // Acquire an auth client, and bind it to all future calls
2021
+ * const authClient = await auth.getClient();
2022
+ * google.options({auth: authClient});
2023
+ *
2024
+ * // Do the magic
2025
+ * const res = await searchconsole.urlInspection.index.inspect({
2026
+ * // Request body metadata
2027
+ * requestBody: {
2028
+ * // request body parameters
2029
+ * // {
2030
+ * // "inspectionUrl": "my_inspectionUrl",
2031
+ * // "languageCode": "my_languageCode",
2032
+ * // "siteUrl": "my_siteUrl"
2033
+ * // }
2034
+ * },
2035
+ * });
2036
+ * console.log(res.data);
2037
+ *
2038
+ * // Example response
2039
+ * // {
2040
+ * // "inspectionResult": {}
2041
+ * // }
2042
+ * }
2043
+ *
2044
+ * main().catch(e => {
2045
+ * console.error(e);
2046
+ * throw e;
2047
+ * });
2048
+ *
2049
+ * ```
1535
2050
  *
1536
2051
  * @param params - Parameters for request
1537
2052
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1541,11 +2056,11 @@ export namespace searchconsole_v1 {
1541
2056
  inspect(
1542
2057
  params: Params$Resource$Urlinspection$Index$Inspect,
1543
2058
  options: StreamMethodOptions
1544
- ): GaxiosPromise<Readable>;
2059
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
1545
2060
  inspect(
1546
2061
  params?: Params$Resource$Urlinspection$Index$Inspect,
1547
2062
  options?: MethodOptions
1548
- ): GaxiosPromise<Schema$InspectUrlIndexResponse>;
2063
+ ): Promise<GaxiosResponseWithHTTP2<Schema$InspectUrlIndexResponse>>;
1549
2064
  inspect(
1550
2065
  params: Params$Resource$Urlinspection$Index$Inspect,
1551
2066
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -1580,8 +2095,8 @@ export namespace searchconsole_v1 {
1580
2095
  | BodyResponseCallback<Readable>
1581
2096
  ):
1582
2097
  | void
1583
- | GaxiosPromise<Schema$InspectUrlIndexResponse>
1584
- | GaxiosPromise<Readable> {
2098
+ | Promise<GaxiosResponseWithHTTP2<Schema$InspectUrlIndexResponse>>
2099
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1585
2100
  let params = (paramsOrCallback ||
1586
2101
  {}) as Params$Resource$Urlinspection$Index$Inspect;
1587
2102
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -1654,6 +2169,62 @@ export namespace searchconsole_v1 {
1654
2169
 
1655
2170
  /**
1656
2171
  * Runs Mobile-Friendly Test for a given URL.
2172
+ * @example
2173
+ * ```js
2174
+ * // Before running the sample:
2175
+ * // - Enable the API at:
2176
+ * // https://console.developers.google.com/apis/api/searchconsole.googleapis.com
2177
+ * // - Login into gcloud by running:
2178
+ * // ```sh
2179
+ * // $ gcloud auth application-default login
2180
+ * // ```
2181
+ * // - Install the npm module by running:
2182
+ * // ```sh
2183
+ * // $ npm install googleapis
2184
+ * // ```
2185
+ *
2186
+ * const {google} = require('googleapis');
2187
+ * const searchconsole = google.searchconsole('v1');
2188
+ *
2189
+ * async function main() {
2190
+ * const auth = new google.auth.GoogleAuth({
2191
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2192
+ * scopes: [],
2193
+ * });
2194
+ *
2195
+ * // Acquire an auth client, and bind it to all future calls
2196
+ * const authClient = await auth.getClient();
2197
+ * google.options({auth: authClient});
2198
+ *
2199
+ * // Do the magic
2200
+ * const res = await searchconsole.urlTestingTools.mobileFriendlyTest.run({
2201
+ * // Request body metadata
2202
+ * requestBody: {
2203
+ * // request body parameters
2204
+ * // {
2205
+ * // "requestScreenshot": false,
2206
+ * // "url": "my_url"
2207
+ * // }
2208
+ * },
2209
+ * });
2210
+ * console.log(res.data);
2211
+ *
2212
+ * // Example response
2213
+ * // {
2214
+ * // "mobileFriendliness": "my_mobileFriendliness",
2215
+ * // "mobileFriendlyIssues": [],
2216
+ * // "resourceIssues": [],
2217
+ * // "screenshot": {},
2218
+ * // "testStatus": {}
2219
+ * // }
2220
+ * }
2221
+ *
2222
+ * main().catch(e => {
2223
+ * console.error(e);
2224
+ * throw e;
2225
+ * });
2226
+ *
2227
+ * ```
1657
2228
  *
1658
2229
  * @param params - Parameters for request
1659
2230
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1663,11 +2234,11 @@ export namespace searchconsole_v1 {
1663
2234
  run(
1664
2235
  params: Params$Resource$Urltestingtools$Mobilefriendlytest$Run,
1665
2236
  options: StreamMethodOptions
1666
- ): GaxiosPromise<Readable>;
2237
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
1667
2238
  run(
1668
2239
  params?: Params$Resource$Urltestingtools$Mobilefriendlytest$Run,
1669
2240
  options?: MethodOptions
1670
- ): GaxiosPromise<Schema$RunMobileFriendlyTestResponse>;
2241
+ ): Promise<GaxiosResponseWithHTTP2<Schema$RunMobileFriendlyTestResponse>>;
1671
2242
  run(
1672
2243
  params: Params$Resource$Urltestingtools$Mobilefriendlytest$Run,
1673
2244
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -1702,8 +2273,8 @@ export namespace searchconsole_v1 {
1702
2273
  | BodyResponseCallback<Readable>
1703
2274
  ):
1704
2275
  | void
1705
- | GaxiosPromise<Schema$RunMobileFriendlyTestResponse>
1706
- | GaxiosPromise<Readable> {
2276
+ | Promise<GaxiosResponseWithHTTP2<Schema$RunMobileFriendlyTestResponse>>
2277
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1707
2278
  let params = (paramsOrCallback ||
1708
2279
  {}) as Params$Resource$Urltestingtools$Mobilefriendlytest$Run;
1709
2280
  let options = (optionsOrCallback || {}) as MethodOptions;