@googleapis/searchconsole 0.5.1 → 1.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
@@ -630,69 +630,6 @@ 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
- * // `$ gcloud auth application-default login`
640
- * // - Install the npm module by running:
641
- * // `$ npm install googleapis`
642
- *
643
- * const {google} = require('googleapis');
644
- * const searchconsole = google.searchconsole('v1');
645
- *
646
- * async function main() {
647
- * const auth = new google.auth.GoogleAuth({
648
- * // Scopes can be specified either as an array or as a single, space-delimited string.
649
- * scopes: [
650
- * 'https://www.googleapis.com/auth/webmasters',
651
- * 'https://www.googleapis.com/auth/webmasters.readonly',
652
- * ],
653
- * });
654
- *
655
- * // Acquire an auth client, and bind it to all future calls
656
- * const authClient = await auth.getClient();
657
- * google.options({auth: authClient});
658
- *
659
- * // Do the magic
660
- * const res = await webmasters.searchanalytics.query({
661
- * // The site's URL, including protocol. For example: `http://www.example.com/`.
662
- * siteUrl: 'placeholder-value',
663
- *
664
- * // Request body metadata
665
- * requestBody: {
666
- * // request body parameters
667
- * // {
668
- * // "aggregationType": "my_aggregationType",
669
- * // "dataState": "my_dataState",
670
- * // "dimensionFilterGroups": [],
671
- * // "dimensions": [],
672
- * // "endDate": "my_endDate",
673
- * // "rowLimit": 0,
674
- * // "searchType": "my_searchType",
675
- * // "startDate": "my_startDate",
676
- * // "startRow": 0,
677
- * // "type": "my_type"
678
- * // }
679
- * },
680
- * });
681
- * console.log(res.data);
682
- *
683
- * // Example response
684
- * // {
685
- * // "responseAggregationType": "my_responseAggregationType",
686
- * // "rows": []
687
- * // }
688
- * }
689
- *
690
- * main().catch(e => {
691
- * console.error(e);
692
- * throw e;
693
- * });
694
- *
695
- * ```
696
633
  *
697
634
  * @param params - Parameters for request
698
635
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -809,45 +746,6 @@ export namespace searchconsole_v1 {
809
746
 
810
747
  /**
811
748
  * 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.
812
- * @example
813
- * ```js
814
- * // Before running the sample:
815
- * // - Enable the API at:
816
- * // https://console.developers.google.com/apis/api/searchconsole.googleapis.com
817
- * // - Login into gcloud by running:
818
- * // `$ gcloud auth application-default login`
819
- * // - Install the npm module by running:
820
- * // `$ npm install googleapis`
821
- *
822
- * const {google} = require('googleapis');
823
- * const searchconsole = google.searchconsole('v1');
824
- *
825
- * async function main() {
826
- * const auth = new google.auth.GoogleAuth({
827
- * // Scopes can be specified either as an array or as a single, space-delimited string.
828
- * scopes: ['https://www.googleapis.com/auth/webmasters'],
829
- * });
830
- *
831
- * // Acquire an auth client, and bind it to all future calls
832
- * const authClient = await auth.getClient();
833
- * google.options({auth: authClient});
834
- *
835
- * // Do the magic
836
- * const res = await webmasters.sitemaps.delete({
837
- * // The URL of the actual sitemap. For example: `http://www.example.com/sitemap.xml`.
838
- * feedpath: 'placeholder-value',
839
- * // The site's URL, including protocol. For example: `http://www.example.com/`.
840
- * siteUrl: 'placeholder-value',
841
- * });
842
- * console.log(res.data);
843
- * }
844
- *
845
- * main().catch(e => {
846
- * console.error(e);
847
- * throw e;
848
- * });
849
- *
850
- * ```
851
749
  *
852
750
  * @param params - Parameters for request
853
751
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -932,61 +830,6 @@ export namespace searchconsole_v1 {
932
830
 
933
831
  /**
934
832
  * Retrieves information about a specific sitemap.
935
- * @example
936
- * ```js
937
- * // Before running the sample:
938
- * // - Enable the API at:
939
- * // https://console.developers.google.com/apis/api/searchconsole.googleapis.com
940
- * // - Login into gcloud by running:
941
- * // `$ gcloud auth application-default login`
942
- * // - Install the npm module by running:
943
- * // `$ npm install googleapis`
944
- *
945
- * const {google} = require('googleapis');
946
- * const searchconsole = google.searchconsole('v1');
947
- *
948
- * async function main() {
949
- * const auth = new google.auth.GoogleAuth({
950
- * // Scopes can be specified either as an array or as a single, space-delimited string.
951
- * scopes: [
952
- * 'https://www.googleapis.com/auth/webmasters',
953
- * 'https://www.googleapis.com/auth/webmasters.readonly',
954
- * ],
955
- * });
956
- *
957
- * // Acquire an auth client, and bind it to all future calls
958
- * const authClient = await auth.getClient();
959
- * google.options({auth: authClient});
960
- *
961
- * // Do the magic
962
- * const res = await webmasters.sitemaps.get({
963
- * // The URL of the actual sitemap. For example: `http://www.example.com/sitemap.xml`.
964
- * feedpath: 'placeholder-value',
965
- * // The site's URL, including protocol. For example: `http://www.example.com/`.
966
- * siteUrl: 'placeholder-value',
967
- * });
968
- * console.log(res.data);
969
- *
970
- * // Example response
971
- * // {
972
- * // "contents": [],
973
- * // "errors": "my_errors",
974
- * // "isPending": false,
975
- * // "isSitemapsIndex": false,
976
- * // "lastDownloaded": "my_lastDownloaded",
977
- * // "lastSubmitted": "my_lastSubmitted",
978
- * // "path": "my_path",
979
- * // "type": "my_type",
980
- * // "warnings": "my_warnings"
981
- * // }
982
- * }
983
- *
984
- * main().catch(e => {
985
- * console.error(e);
986
- * throw e;
987
- * });
988
- *
989
- * ```
990
833
  *
991
834
  * @param params - Parameters for request
992
835
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1073,53 +916,6 @@ export namespace searchconsole_v1 {
1073
916
 
1074
917
  /**
1075
918
  * 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).
1076
- * @example
1077
- * ```js
1078
- * // Before running the sample:
1079
- * // - Enable the API at:
1080
- * // https://console.developers.google.com/apis/api/searchconsole.googleapis.com
1081
- * // - Login into gcloud by running:
1082
- * // `$ gcloud auth application-default login`
1083
- * // - Install the npm module by running:
1084
- * // `$ npm install googleapis`
1085
- *
1086
- * const {google} = require('googleapis');
1087
- * const searchconsole = google.searchconsole('v1');
1088
- *
1089
- * async function main() {
1090
- * const auth = new google.auth.GoogleAuth({
1091
- * // Scopes can be specified either as an array or as a single, space-delimited string.
1092
- * scopes: [
1093
- * 'https://www.googleapis.com/auth/webmasters',
1094
- * 'https://www.googleapis.com/auth/webmasters.readonly',
1095
- * ],
1096
- * });
1097
- *
1098
- * // Acquire an auth client, and bind it to all future calls
1099
- * const authClient = await auth.getClient();
1100
- * google.options({auth: authClient});
1101
- *
1102
- * // Do the magic
1103
- * const res = await webmasters.sitemaps.list({
1104
- * // A URL of a site's sitemap index. For example: `http://www.example.com/sitemapindex.xml`.
1105
- * sitemapIndex: 'placeholder-value',
1106
- * // The site's URL, including protocol. For example: `http://www.example.com/`.
1107
- * siteUrl: 'placeholder-value',
1108
- * });
1109
- * console.log(res.data);
1110
- *
1111
- * // Example response
1112
- * // {
1113
- * // "sitemap": []
1114
- * // }
1115
- * }
1116
- *
1117
- * main().catch(e => {
1118
- * console.error(e);
1119
- * throw e;
1120
- * });
1121
- *
1122
- * ```
1123
919
  *
1124
920
  * @param params - Parameters for request
1125
921
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1212,45 +1008,6 @@ export namespace searchconsole_v1 {
1212
1008
 
1213
1009
  /**
1214
1010
  * Submits a sitemap for a site.
1215
- * @example
1216
- * ```js
1217
- * // Before running the sample:
1218
- * // - Enable the API at:
1219
- * // https://console.developers.google.com/apis/api/searchconsole.googleapis.com
1220
- * // - Login into gcloud by running:
1221
- * // `$ gcloud auth application-default login`
1222
- * // - Install the npm module by running:
1223
- * // `$ npm install googleapis`
1224
- *
1225
- * const {google} = require('googleapis');
1226
- * const searchconsole = google.searchconsole('v1');
1227
- *
1228
- * async function main() {
1229
- * const auth = new google.auth.GoogleAuth({
1230
- * // Scopes can be specified either as an array or as a single, space-delimited string.
1231
- * scopes: ['https://www.googleapis.com/auth/webmasters'],
1232
- * });
1233
- *
1234
- * // Acquire an auth client, and bind it to all future calls
1235
- * const authClient = await auth.getClient();
1236
- * google.options({auth: authClient});
1237
- *
1238
- * // Do the magic
1239
- * const res = await webmasters.sitemaps.submit({
1240
- * // The URL of the actual sitemap. For example: `http://www.example.com/sitemap.xml`.
1241
- * feedpath: 'placeholder-value',
1242
- * // The site's URL, including protocol. For example: `http://www.example.com/`.
1243
- * siteUrl: 'placeholder-value',
1244
- * });
1245
- * console.log(res.data);
1246
- * }
1247
- *
1248
- * main().catch(e => {
1249
- * console.error(e);
1250
- * throw e;
1251
- * });
1252
- *
1253
- * ```
1254
1011
  *
1255
1012
  * @param params - Parameters for request
1256
1013
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1383,43 +1140,6 @@ export namespace searchconsole_v1 {
1383
1140
 
1384
1141
  /**
1385
1142
  * Adds a site to the set of the user's sites in Search Console.
1386
- * @example
1387
- * ```js
1388
- * // Before running the sample:
1389
- * // - Enable the API at:
1390
- * // https://console.developers.google.com/apis/api/searchconsole.googleapis.com
1391
- * // - Login into gcloud by running:
1392
- * // `$ gcloud auth application-default login`
1393
- * // - Install the npm module by running:
1394
- * // `$ npm install googleapis`
1395
- *
1396
- * const {google} = require('googleapis');
1397
- * const searchconsole = google.searchconsole('v1');
1398
- *
1399
- * async function main() {
1400
- * const auth = new google.auth.GoogleAuth({
1401
- * // Scopes can be specified either as an array or as a single, space-delimited string.
1402
- * scopes: ['https://www.googleapis.com/auth/webmasters'],
1403
- * });
1404
- *
1405
- * // Acquire an auth client, and bind it to all future calls
1406
- * const authClient = await auth.getClient();
1407
- * google.options({auth: authClient});
1408
- *
1409
- * // Do the magic
1410
- * const res = await webmasters.sites.add({
1411
- * // The URL of the site to add.
1412
- * siteUrl: 'placeholder-value',
1413
- * });
1414
- * console.log(res.data);
1415
- * }
1416
- *
1417
- * main().catch(e => {
1418
- * console.error(e);
1419
- * throw e;
1420
- * });
1421
- *
1422
- * ```
1423
1143
  *
1424
1144
  * @param params - Parameters for request
1425
1145
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1505,43 +1225,6 @@ export namespace searchconsole_v1 {
1505
1225
 
1506
1226
  /**
1507
1227
  * Removes a site from the set of the user's Search Console sites.
1508
- * @example
1509
- * ```js
1510
- * // Before running the sample:
1511
- * // - Enable the API at:
1512
- * // https://console.developers.google.com/apis/api/searchconsole.googleapis.com
1513
- * // - Login into gcloud by running:
1514
- * // `$ gcloud auth application-default login`
1515
- * // - Install the npm module by running:
1516
- * // `$ npm install googleapis`
1517
- *
1518
- * const {google} = require('googleapis');
1519
- * const searchconsole = google.searchconsole('v1');
1520
- *
1521
- * async function main() {
1522
- * const auth = new google.auth.GoogleAuth({
1523
- * // Scopes can be specified either as an array or as a single, space-delimited string.
1524
- * scopes: ['https://www.googleapis.com/auth/webmasters'],
1525
- * });
1526
- *
1527
- * // Acquire an auth client, and bind it to all future calls
1528
- * const authClient = await auth.getClient();
1529
- * google.options({auth: authClient});
1530
- *
1531
- * // Do the magic
1532
- * const res = await webmasters.sites.delete({
1533
- * // The URI of the property as defined in Search Console. **Examples:** `http://www.example.com/` or `sc-domain:example.com`.
1534
- * siteUrl: 'placeholder-value',
1535
- * });
1536
- * console.log(res.data);
1537
- * }
1538
- *
1539
- * main().catch(e => {
1540
- * console.error(e);
1541
- * throw e;
1542
- * });
1543
- *
1544
- * ```
1545
1228
  *
1546
1229
  * @param params - Parameters for request
1547
1230
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1627,52 +1310,6 @@ export namespace searchconsole_v1 {
1627
1310
 
1628
1311
  /**
1629
1312
  * Retrieves information about specific site.
1630
- * @example
1631
- * ```js
1632
- * // Before running the sample:
1633
- * // - Enable the API at:
1634
- * // https://console.developers.google.com/apis/api/searchconsole.googleapis.com
1635
- * // - Login into gcloud by running:
1636
- * // `$ gcloud auth application-default login`
1637
- * // - Install the npm module by running:
1638
- * // `$ npm install googleapis`
1639
- *
1640
- * const {google} = require('googleapis');
1641
- * const searchconsole = google.searchconsole('v1');
1642
- *
1643
- * async function main() {
1644
- * const auth = new google.auth.GoogleAuth({
1645
- * // Scopes can be specified either as an array or as a single, space-delimited string.
1646
- * scopes: [
1647
- * 'https://www.googleapis.com/auth/webmasters',
1648
- * 'https://www.googleapis.com/auth/webmasters.readonly',
1649
- * ],
1650
- * });
1651
- *
1652
- * // Acquire an auth client, and bind it to all future calls
1653
- * const authClient = await auth.getClient();
1654
- * google.options({auth: authClient});
1655
- *
1656
- * // Do the magic
1657
- * const res = await webmasters.sites.get({
1658
- * // The URI of the property as defined in Search Console. **Examples:** `http://www.example.com/` or `sc-domain:example.com`.
1659
- * siteUrl: 'placeholder-value',
1660
- * });
1661
- * console.log(res.data);
1662
- *
1663
- * // Example response
1664
- * // {
1665
- * // "permissionLevel": "my_permissionLevel",
1666
- * // "siteUrl": "my_siteUrl"
1667
- * // }
1668
- * }
1669
- *
1670
- * main().catch(e => {
1671
- * console.error(e);
1672
- * throw e;
1673
- * });
1674
- *
1675
- * ```
1676
1313
  *
1677
1314
  * @param params - Parameters for request
1678
1315
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1760,48 +1397,6 @@ export namespace searchconsole_v1 {
1760
1397
 
1761
1398
  /**
1762
1399
  * Lists the user's Search Console sites.
1763
- * @example
1764
- * ```js
1765
- * // Before running the sample:
1766
- * // - Enable the API at:
1767
- * // https://console.developers.google.com/apis/api/searchconsole.googleapis.com
1768
- * // - Login into gcloud by running:
1769
- * // `$ gcloud auth application-default login`
1770
- * // - Install the npm module by running:
1771
- * // `$ npm install googleapis`
1772
- *
1773
- * const {google} = require('googleapis');
1774
- * const searchconsole = google.searchconsole('v1');
1775
- *
1776
- * async function main() {
1777
- * const auth = new google.auth.GoogleAuth({
1778
- * // Scopes can be specified either as an array or as a single, space-delimited string.
1779
- * scopes: [
1780
- * 'https://www.googleapis.com/auth/webmasters',
1781
- * 'https://www.googleapis.com/auth/webmasters.readonly',
1782
- * ],
1783
- * });
1784
- *
1785
- * // Acquire an auth client, and bind it to all future calls
1786
- * const authClient = await auth.getClient();
1787
- * google.options({auth: authClient});
1788
- *
1789
- * // Do the magic
1790
- * const res = await webmasters.sites.list({});
1791
- * console.log(res.data);
1792
- *
1793
- * // Example response
1794
- * // {
1795
- * // "siteEntry": []
1796
- * // }
1797
- * }
1798
- *
1799
- * main().catch(e => {
1800
- * console.error(e);
1801
- * throw e;
1802
- * });
1803
- *
1804
- * ```
1805
1400
  *
1806
1401
  * @param params - Parameters for request
1807
1402
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1928,58 +1523,6 @@ export namespace searchconsole_v1 {
1928
1523
 
1929
1524
  /**
1930
1525
  * Index inspection.
1931
- * @example
1932
- * ```js
1933
- * // Before running the sample:
1934
- * // - Enable the API at:
1935
- * // https://console.developers.google.com/apis/api/searchconsole.googleapis.com
1936
- * // - Login into gcloud by running:
1937
- * // `$ gcloud auth application-default login`
1938
- * // - Install the npm module by running:
1939
- * // `$ npm install googleapis`
1940
- *
1941
- * const {google} = require('googleapis');
1942
- * const searchconsole = google.searchconsole('v1');
1943
- *
1944
- * async function main() {
1945
- * const auth = new google.auth.GoogleAuth({
1946
- * // Scopes can be specified either as an array or as a single, space-delimited string.
1947
- * scopes: [
1948
- * 'https://www.googleapis.com/auth/webmasters',
1949
- * 'https://www.googleapis.com/auth/webmasters.readonly',
1950
- * ],
1951
- * });
1952
- *
1953
- * // Acquire an auth client, and bind it to all future calls
1954
- * const authClient = await auth.getClient();
1955
- * google.options({auth: authClient});
1956
- *
1957
- * // Do the magic
1958
- * const res = await searchconsole.urlInspection.index.inspect({
1959
- * // Request body metadata
1960
- * requestBody: {
1961
- * // request body parameters
1962
- * // {
1963
- * // "inspectionUrl": "my_inspectionUrl",
1964
- * // "languageCode": "my_languageCode",
1965
- * // "siteUrl": "my_siteUrl"
1966
- * // }
1967
- * },
1968
- * });
1969
- * console.log(res.data);
1970
- *
1971
- * // Example response
1972
- * // {
1973
- * // "inspectionResult": {}
1974
- * // }
1975
- * }
1976
- *
1977
- * main().catch(e => {
1978
- * console.error(e);
1979
- * throw e;
1980
- * });
1981
- *
1982
- * ```
1983
1526
  *
1984
1527
  * @param params - Parameters for request
1985
1528
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2101,58 +1644,6 @@ export namespace searchconsole_v1 {
2101
1644
 
2102
1645
  /**
2103
1646
  * Runs Mobile-Friendly Test for a given URL.
2104
- * @example
2105
- * ```js
2106
- * // Before running the sample:
2107
- * // - Enable the API at:
2108
- * // https://console.developers.google.com/apis/api/searchconsole.googleapis.com
2109
- * // - Login into gcloud by running:
2110
- * // `$ gcloud auth application-default login`
2111
- * // - Install the npm module by running:
2112
- * // `$ npm install googleapis`
2113
- *
2114
- * const {google} = require('googleapis');
2115
- * const searchconsole = google.searchconsole('v1');
2116
- *
2117
- * async function main() {
2118
- * const auth = new google.auth.GoogleAuth({
2119
- * // Scopes can be specified either as an array or as a single, space-delimited string.
2120
- * scopes: [],
2121
- * });
2122
- *
2123
- * // Acquire an auth client, and bind it to all future calls
2124
- * const authClient = await auth.getClient();
2125
- * google.options({auth: authClient});
2126
- *
2127
- * // Do the magic
2128
- * const res = await searchconsole.urlTestingTools.mobileFriendlyTest.run({
2129
- * // Request body metadata
2130
- * requestBody: {
2131
- * // request body parameters
2132
- * // {
2133
- * // "requestScreenshot": false,
2134
- * // "url": "my_url"
2135
- * // }
2136
- * },
2137
- * });
2138
- * console.log(res.data);
2139
- *
2140
- * // Example response
2141
- * // {
2142
- * // "mobileFriendliness": "my_mobileFriendliness",
2143
- * // "mobileFriendlyIssues": [],
2144
- * // "resourceIssues": [],
2145
- * // "screenshot": {},
2146
- * // "testStatus": {}
2147
- * // }
2148
- * }
2149
- *
2150
- * main().catch(e => {
2151
- * console.error(e);
2152
- * throw e;
2153
- * });
2154
- *
2155
- * ```
2156
1647
  *
2157
1648
  * @param params - Parameters for request
2158
1649
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.