@googleapis/analyticsdata 1.6.0 → 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/build/v1beta.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /// <reference types="node" />
2
- import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosPromise, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common';
2
+ import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosResponseWithHTTP2, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common';
3
3
  import { Readable } from 'stream';
4
4
  export declare namespace analyticsdata_v1beta {
5
5
  export interface Options extends GlobalOptions {
@@ -1335,98 +1335,556 @@ export declare namespace analyticsdata_v1beta {
1335
1335
  constructor(context: APIRequestContext);
1336
1336
  /**
1337
1337
  * Returns multiple pivot reports in a batch. All reports must be for the same Google Analytics property.
1338
+ * @example
1339
+ * ```js
1340
+ * // Before running the sample:
1341
+ * // - Enable the API at:
1342
+ * // https://console.developers.google.com/apis/api/analyticsdata.googleapis.com
1343
+ * // - Login into gcloud by running:
1344
+ * // ```sh
1345
+ * // $ gcloud auth application-default login
1346
+ * // ```
1347
+ * // - Install the npm module by running:
1348
+ * // ```sh
1349
+ * // $ npm install googleapis
1350
+ * // ```
1351
+ *
1352
+ * const {google} = require('googleapis');
1353
+ * const analyticsdata = google.analyticsdata('v1beta');
1354
+ *
1355
+ * async function main() {
1356
+ * const auth = new google.auth.GoogleAuth({
1357
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1358
+ * scopes: [
1359
+ * 'https://www.googleapis.com/auth/analytics',
1360
+ * 'https://www.googleapis.com/auth/analytics.readonly',
1361
+ * ],
1362
+ * });
1363
+ *
1364
+ * // Acquire an auth client, and bind it to all future calls
1365
+ * const authClient = await auth.getClient();
1366
+ * google.options({auth: authClient});
1367
+ *
1368
+ * // Do the magic
1369
+ * const res = await analyticsdata.properties.batchRunPivotReports({
1370
+ * // A Google Analytics property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). This property must be specified for the batch. The property within RunPivotReportRequest may either be unspecified or consistent with this property. Example: properties/1234
1371
+ * property: 'properties/my-propertie',
1372
+ *
1373
+ * // Request body metadata
1374
+ * requestBody: {
1375
+ * // request body parameters
1376
+ * // {
1377
+ * // "requests": []
1378
+ * // }
1379
+ * },
1380
+ * });
1381
+ * console.log(res.data);
1382
+ *
1383
+ * // Example response
1384
+ * // {
1385
+ * // "kind": "my_kind",
1386
+ * // "pivotReports": []
1387
+ * // }
1388
+ * }
1389
+ *
1390
+ * main().catch(e => {
1391
+ * console.error(e);
1392
+ * throw e;
1393
+ * });
1394
+ *
1395
+ * ```
1338
1396
  *
1339
1397
  * @param params - Parameters for request
1340
1398
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1341
1399
  * @param callback - Optional callback that handles the response.
1342
1400
  * @returns A promise if used with async/await, or void if used with a callback.
1343
1401
  */
1344
- batchRunPivotReports(params: Params$Resource$Properties$Batchrunpivotreports, options: StreamMethodOptions): GaxiosPromise<Readable>;
1345
- batchRunPivotReports(params?: Params$Resource$Properties$Batchrunpivotreports, options?: MethodOptions): GaxiosPromise<Schema$BatchRunPivotReportsResponse>;
1402
+ batchRunPivotReports(params: Params$Resource$Properties$Batchrunpivotreports, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
1403
+ batchRunPivotReports(params?: Params$Resource$Properties$Batchrunpivotreports, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$BatchRunPivotReportsResponse>>;
1346
1404
  batchRunPivotReports(params: Params$Resource$Properties$Batchrunpivotreports, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1347
1405
  batchRunPivotReports(params: Params$Resource$Properties$Batchrunpivotreports, options: MethodOptions | BodyResponseCallback<Schema$BatchRunPivotReportsResponse>, callback: BodyResponseCallback<Schema$BatchRunPivotReportsResponse>): void;
1348
1406
  batchRunPivotReports(params: Params$Resource$Properties$Batchrunpivotreports, callback: BodyResponseCallback<Schema$BatchRunPivotReportsResponse>): void;
1349
1407
  batchRunPivotReports(callback: BodyResponseCallback<Schema$BatchRunPivotReportsResponse>): void;
1350
1408
  /**
1351
1409
  * Returns multiple reports in a batch. All reports must be for the same Google Analytics property.
1410
+ * @example
1411
+ * ```js
1412
+ * // Before running the sample:
1413
+ * // - Enable the API at:
1414
+ * // https://console.developers.google.com/apis/api/analyticsdata.googleapis.com
1415
+ * // - Login into gcloud by running:
1416
+ * // ```sh
1417
+ * // $ gcloud auth application-default login
1418
+ * // ```
1419
+ * // - Install the npm module by running:
1420
+ * // ```sh
1421
+ * // $ npm install googleapis
1422
+ * // ```
1423
+ *
1424
+ * const {google} = require('googleapis');
1425
+ * const analyticsdata = google.analyticsdata('v1beta');
1426
+ *
1427
+ * async function main() {
1428
+ * const auth = new google.auth.GoogleAuth({
1429
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1430
+ * scopes: [
1431
+ * 'https://www.googleapis.com/auth/analytics',
1432
+ * 'https://www.googleapis.com/auth/analytics.readonly',
1433
+ * ],
1434
+ * });
1435
+ *
1436
+ * // Acquire an auth client, and bind it to all future calls
1437
+ * const authClient = await auth.getClient();
1438
+ * google.options({auth: authClient});
1439
+ *
1440
+ * // Do the magic
1441
+ * const res = await analyticsdata.properties.batchRunReports({
1442
+ * // A Google Analytics property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). This property must be specified for the batch. The property within RunReportRequest may either be unspecified or consistent with this property. Example: properties/1234
1443
+ * property: 'properties/my-propertie',
1444
+ *
1445
+ * // Request body metadata
1446
+ * requestBody: {
1447
+ * // request body parameters
1448
+ * // {
1449
+ * // "requests": []
1450
+ * // }
1451
+ * },
1452
+ * });
1453
+ * console.log(res.data);
1454
+ *
1455
+ * // Example response
1456
+ * // {
1457
+ * // "kind": "my_kind",
1458
+ * // "reports": []
1459
+ * // }
1460
+ * }
1461
+ *
1462
+ * main().catch(e => {
1463
+ * console.error(e);
1464
+ * throw e;
1465
+ * });
1466
+ *
1467
+ * ```
1352
1468
  *
1353
1469
  * @param params - Parameters for request
1354
1470
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1355
1471
  * @param callback - Optional callback that handles the response.
1356
1472
  * @returns A promise if used with async/await, or void if used with a callback.
1357
1473
  */
1358
- batchRunReports(params: Params$Resource$Properties$Batchrunreports, options: StreamMethodOptions): GaxiosPromise<Readable>;
1359
- batchRunReports(params?: Params$Resource$Properties$Batchrunreports, options?: MethodOptions): GaxiosPromise<Schema$BatchRunReportsResponse>;
1474
+ batchRunReports(params: Params$Resource$Properties$Batchrunreports, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
1475
+ batchRunReports(params?: Params$Resource$Properties$Batchrunreports, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$BatchRunReportsResponse>>;
1360
1476
  batchRunReports(params: Params$Resource$Properties$Batchrunreports, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1361
1477
  batchRunReports(params: Params$Resource$Properties$Batchrunreports, options: MethodOptions | BodyResponseCallback<Schema$BatchRunReportsResponse>, callback: BodyResponseCallback<Schema$BatchRunReportsResponse>): void;
1362
1478
  batchRunReports(params: Params$Resource$Properties$Batchrunreports, callback: BodyResponseCallback<Schema$BatchRunReportsResponse>): void;
1363
1479
  batchRunReports(callback: BodyResponseCallback<Schema$BatchRunReportsResponse>): void;
1364
1480
  /**
1365
1481
  * This compatibility method lists dimensions and metrics that can be added to a report request and maintain compatibility. This method fails if the request's dimensions and metrics are incompatible. In Google Analytics, reports fail if they request incompatible dimensions and/or metrics; in that case, you will need to remove dimensions and/or metrics from the incompatible report until the report is compatible. The Realtime and Core reports have different compatibility rules. This method checks compatibility for Core reports.
1482
+ * @example
1483
+ * ```js
1484
+ * // Before running the sample:
1485
+ * // - Enable the API at:
1486
+ * // https://console.developers.google.com/apis/api/analyticsdata.googleapis.com
1487
+ * // - Login into gcloud by running:
1488
+ * // ```sh
1489
+ * // $ gcloud auth application-default login
1490
+ * // ```
1491
+ * // - Install the npm module by running:
1492
+ * // ```sh
1493
+ * // $ npm install googleapis
1494
+ * // ```
1495
+ *
1496
+ * const {google} = require('googleapis');
1497
+ * const analyticsdata = google.analyticsdata('v1beta');
1498
+ *
1499
+ * async function main() {
1500
+ * const auth = new google.auth.GoogleAuth({
1501
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1502
+ * scopes: [
1503
+ * 'https://www.googleapis.com/auth/analytics',
1504
+ * 'https://www.googleapis.com/auth/analytics.readonly',
1505
+ * ],
1506
+ * });
1507
+ *
1508
+ * // Acquire an auth client, and bind it to all future calls
1509
+ * const authClient = await auth.getClient();
1510
+ * google.options({auth: authClient});
1511
+ *
1512
+ * // Do the magic
1513
+ * const res = await analyticsdata.properties.checkCompatibility({
1514
+ * // A Google Analytics property identifier whose events are tracked. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). `property` should be the same value as in your `runReport` request. Example: properties/1234
1515
+ * property: 'properties/my-propertie',
1516
+ *
1517
+ * // Request body metadata
1518
+ * requestBody: {
1519
+ * // request body parameters
1520
+ * // {
1521
+ * // "compatibilityFilter": "my_compatibilityFilter",
1522
+ * // "dimensionFilter": {},
1523
+ * // "dimensions": [],
1524
+ * // "metricFilter": {},
1525
+ * // "metrics": []
1526
+ * // }
1527
+ * },
1528
+ * });
1529
+ * console.log(res.data);
1530
+ *
1531
+ * // Example response
1532
+ * // {
1533
+ * // "dimensionCompatibilities": [],
1534
+ * // "metricCompatibilities": []
1535
+ * // }
1536
+ * }
1537
+ *
1538
+ * main().catch(e => {
1539
+ * console.error(e);
1540
+ * throw e;
1541
+ * });
1542
+ *
1543
+ * ```
1366
1544
  *
1367
1545
  * @param params - Parameters for request
1368
1546
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1369
1547
  * @param callback - Optional callback that handles the response.
1370
1548
  * @returns A promise if used with async/await, or void if used with a callback.
1371
1549
  */
1372
- checkCompatibility(params: Params$Resource$Properties$Checkcompatibility, options: StreamMethodOptions): GaxiosPromise<Readable>;
1373
- checkCompatibility(params?: Params$Resource$Properties$Checkcompatibility, options?: MethodOptions): GaxiosPromise<Schema$CheckCompatibilityResponse>;
1550
+ checkCompatibility(params: Params$Resource$Properties$Checkcompatibility, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
1551
+ checkCompatibility(params?: Params$Resource$Properties$Checkcompatibility, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$CheckCompatibilityResponse>>;
1374
1552
  checkCompatibility(params: Params$Resource$Properties$Checkcompatibility, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1375
1553
  checkCompatibility(params: Params$Resource$Properties$Checkcompatibility, options: MethodOptions | BodyResponseCallback<Schema$CheckCompatibilityResponse>, callback: BodyResponseCallback<Schema$CheckCompatibilityResponse>): void;
1376
1554
  checkCompatibility(params: Params$Resource$Properties$Checkcompatibility, callback: BodyResponseCallback<Schema$CheckCompatibilityResponse>): void;
1377
1555
  checkCompatibility(callback: BodyResponseCallback<Schema$CheckCompatibilityResponse>): void;
1378
1556
  /**
1379
1557
  * Returns metadata for dimensions and metrics available in reporting methods. Used to explore the dimensions and metrics. In this method, a Google Analytics property identifier is specified in the request, and the metadata response includes Custom dimensions and metrics as well as Universal metadata. For example if a custom metric with parameter name `levels_unlocked` is registered to a property, the Metadata response will contain `customEvent:levels_unlocked`. Universal metadata are dimensions and metrics applicable to any property such as `country` and `totalUsers`.
1558
+ * @example
1559
+ * ```js
1560
+ * // Before running the sample:
1561
+ * // - Enable the API at:
1562
+ * // https://console.developers.google.com/apis/api/analyticsdata.googleapis.com
1563
+ * // - Login into gcloud by running:
1564
+ * // ```sh
1565
+ * // $ gcloud auth application-default login
1566
+ * // ```
1567
+ * // - Install the npm module by running:
1568
+ * // ```sh
1569
+ * // $ npm install googleapis
1570
+ * // ```
1571
+ *
1572
+ * const {google} = require('googleapis');
1573
+ * const analyticsdata = google.analyticsdata('v1beta');
1574
+ *
1575
+ * async function main() {
1576
+ * const auth = new google.auth.GoogleAuth({
1577
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1578
+ * scopes: [
1579
+ * 'https://www.googleapis.com/auth/analytics',
1580
+ * 'https://www.googleapis.com/auth/analytics.readonly',
1581
+ * ],
1582
+ * });
1583
+ *
1584
+ * // Acquire an auth client, and bind it to all future calls
1585
+ * const authClient = await auth.getClient();
1586
+ * google.options({auth: authClient});
1587
+ *
1588
+ * // Do the magic
1589
+ * const res = await analyticsdata.properties.getMetadata({
1590
+ * // Required. The resource name of the metadata to retrieve. This name field is specified in the URL path and not URL parameters. Property is a numeric Google Analytics property identifier. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). Example: properties/1234/metadata Set the Property ID to 0 for dimensions and metrics common to all properties. In this special mode, this method will not return custom dimensions and metrics.
1591
+ * name: 'properties/my-propertie/metadata',
1592
+ * });
1593
+ * console.log(res.data);
1594
+ *
1595
+ * // Example response
1596
+ * // {
1597
+ * // "comparisons": [],
1598
+ * // "dimensions": [],
1599
+ * // "metrics": [],
1600
+ * // "name": "my_name"
1601
+ * // }
1602
+ * }
1603
+ *
1604
+ * main().catch(e => {
1605
+ * console.error(e);
1606
+ * throw e;
1607
+ * });
1608
+ *
1609
+ * ```
1380
1610
  *
1381
1611
  * @param params - Parameters for request
1382
1612
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1383
1613
  * @param callback - Optional callback that handles the response.
1384
1614
  * @returns A promise if used with async/await, or void if used with a callback.
1385
1615
  */
1386
- getMetadata(params: Params$Resource$Properties$Getmetadata, options: StreamMethodOptions): GaxiosPromise<Readable>;
1387
- getMetadata(params?: Params$Resource$Properties$Getmetadata, options?: MethodOptions): GaxiosPromise<Schema$Metadata>;
1616
+ getMetadata(params: Params$Resource$Properties$Getmetadata, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
1617
+ getMetadata(params?: Params$Resource$Properties$Getmetadata, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Metadata>>;
1388
1618
  getMetadata(params: Params$Resource$Properties$Getmetadata, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1389
1619
  getMetadata(params: Params$Resource$Properties$Getmetadata, options: MethodOptions | BodyResponseCallback<Schema$Metadata>, callback: BodyResponseCallback<Schema$Metadata>): void;
1390
1620
  getMetadata(params: Params$Resource$Properties$Getmetadata, callback: BodyResponseCallback<Schema$Metadata>): void;
1391
1621
  getMetadata(callback: BodyResponseCallback<Schema$Metadata>): void;
1392
1622
  /**
1393
1623
  * Returns a customized pivot report of your Google Analytics event data. Pivot reports are more advanced and expressive formats than regular reports. In a pivot report, dimensions are only visible if they are included in a pivot. Multiple pivots can be specified to further dissect your data.
1624
+ * @example
1625
+ * ```js
1626
+ * // Before running the sample:
1627
+ * // - Enable the API at:
1628
+ * // https://console.developers.google.com/apis/api/analyticsdata.googleapis.com
1629
+ * // - Login into gcloud by running:
1630
+ * // ```sh
1631
+ * // $ gcloud auth application-default login
1632
+ * // ```
1633
+ * // - Install the npm module by running:
1634
+ * // ```sh
1635
+ * // $ npm install googleapis
1636
+ * // ```
1637
+ *
1638
+ * const {google} = require('googleapis');
1639
+ * const analyticsdata = google.analyticsdata('v1beta');
1640
+ *
1641
+ * async function main() {
1642
+ * const auth = new google.auth.GoogleAuth({
1643
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1644
+ * scopes: [
1645
+ * 'https://www.googleapis.com/auth/analytics',
1646
+ * 'https://www.googleapis.com/auth/analytics.readonly',
1647
+ * ],
1648
+ * });
1649
+ *
1650
+ * // Acquire an auth client, and bind it to all future calls
1651
+ * const authClient = await auth.getClient();
1652
+ * google.options({auth: authClient});
1653
+ *
1654
+ * // Do the magic
1655
+ * const res = await analyticsdata.properties.runPivotReport({
1656
+ * // A Google Analytics property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). Within a batch request, this property should either be unspecified or consistent with the batch-level property. Example: properties/1234
1657
+ * property: 'properties/my-propertie',
1658
+ *
1659
+ * // Request body metadata
1660
+ * requestBody: {
1661
+ * // request body parameters
1662
+ * // {
1663
+ * // "cohortSpec": {},
1664
+ * // "comparisons": [],
1665
+ * // "currencyCode": "my_currencyCode",
1666
+ * // "dateRanges": [],
1667
+ * // "dimensionFilter": {},
1668
+ * // "dimensions": [],
1669
+ * // "keepEmptyRows": false,
1670
+ * // "metricFilter": {},
1671
+ * // "metrics": [],
1672
+ * // "pivots": [],
1673
+ * // "property": "my_property",
1674
+ * // "returnPropertyQuota": false
1675
+ * // }
1676
+ * },
1677
+ * });
1678
+ * console.log(res.data);
1679
+ *
1680
+ * // Example response
1681
+ * // {
1682
+ * // "aggregates": [],
1683
+ * // "dimensionHeaders": [],
1684
+ * // "kind": "my_kind",
1685
+ * // "metadata": {},
1686
+ * // "metricHeaders": [],
1687
+ * // "pivotHeaders": [],
1688
+ * // "propertyQuota": {},
1689
+ * // "rows": []
1690
+ * // }
1691
+ * }
1692
+ *
1693
+ * main().catch(e => {
1694
+ * console.error(e);
1695
+ * throw e;
1696
+ * });
1697
+ *
1698
+ * ```
1394
1699
  *
1395
1700
  * @param params - Parameters for request
1396
1701
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1397
1702
  * @param callback - Optional callback that handles the response.
1398
1703
  * @returns A promise if used with async/await, or void if used with a callback.
1399
1704
  */
1400
- runPivotReport(params: Params$Resource$Properties$Runpivotreport, options: StreamMethodOptions): GaxiosPromise<Readable>;
1401
- runPivotReport(params?: Params$Resource$Properties$Runpivotreport, options?: MethodOptions): GaxiosPromise<Schema$RunPivotReportResponse>;
1705
+ runPivotReport(params: Params$Resource$Properties$Runpivotreport, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
1706
+ runPivotReport(params?: Params$Resource$Properties$Runpivotreport, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$RunPivotReportResponse>>;
1402
1707
  runPivotReport(params: Params$Resource$Properties$Runpivotreport, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1403
1708
  runPivotReport(params: Params$Resource$Properties$Runpivotreport, options: MethodOptions | BodyResponseCallback<Schema$RunPivotReportResponse>, callback: BodyResponseCallback<Schema$RunPivotReportResponse>): void;
1404
1709
  runPivotReport(params: Params$Resource$Properties$Runpivotreport, callback: BodyResponseCallback<Schema$RunPivotReportResponse>): void;
1405
1710
  runPivotReport(callback: BodyResponseCallback<Schema$RunPivotReportResponse>): void;
1406
1711
  /**
1407
1712
  * Returns a customized report of realtime event data for your property. Events appear in realtime reports seconds after they have been sent to the Google Analytics. Realtime reports show events and usage data for the periods of time ranging from the present moment to 30 minutes ago (up to 60 minutes for Google Analytics 360 properties). For a guide to constructing realtime requests & understanding responses, see [Creating a Realtime Report](https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-basics).
1713
+ * @example
1714
+ * ```js
1715
+ * // Before running the sample:
1716
+ * // - Enable the API at:
1717
+ * // https://console.developers.google.com/apis/api/analyticsdata.googleapis.com
1718
+ * // - Login into gcloud by running:
1719
+ * // ```sh
1720
+ * // $ gcloud auth application-default login
1721
+ * // ```
1722
+ * // - Install the npm module by running:
1723
+ * // ```sh
1724
+ * // $ npm install googleapis
1725
+ * // ```
1726
+ *
1727
+ * const {google} = require('googleapis');
1728
+ * const analyticsdata = google.analyticsdata('v1beta');
1729
+ *
1730
+ * async function main() {
1731
+ * const auth = new google.auth.GoogleAuth({
1732
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1733
+ * scopes: [
1734
+ * 'https://www.googleapis.com/auth/analytics',
1735
+ * 'https://www.googleapis.com/auth/analytics.readonly',
1736
+ * ],
1737
+ * });
1738
+ *
1739
+ * // Acquire an auth client, and bind it to all future calls
1740
+ * const authClient = await auth.getClient();
1741
+ * google.options({auth: authClient});
1742
+ *
1743
+ * // Do the magic
1744
+ * const res = await analyticsdata.properties.runRealtimeReport({
1745
+ * // A Google Analytics property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). Example: properties/1234
1746
+ * property: 'properties/my-propertie',
1747
+ *
1748
+ * // Request body metadata
1749
+ * requestBody: {
1750
+ * // request body parameters
1751
+ * // {
1752
+ * // "dimensionFilter": {},
1753
+ * // "dimensions": [],
1754
+ * // "limit": "my_limit",
1755
+ * // "metricAggregations": [],
1756
+ * // "metricFilter": {},
1757
+ * // "metrics": [],
1758
+ * // "minuteRanges": [],
1759
+ * // "orderBys": [],
1760
+ * // "returnPropertyQuota": false
1761
+ * // }
1762
+ * },
1763
+ * });
1764
+ * console.log(res.data);
1765
+ *
1766
+ * // Example response
1767
+ * // {
1768
+ * // "dimensionHeaders": [],
1769
+ * // "kind": "my_kind",
1770
+ * // "maximums": [],
1771
+ * // "metricHeaders": [],
1772
+ * // "minimums": [],
1773
+ * // "propertyQuota": {},
1774
+ * // "rowCount": 0,
1775
+ * // "rows": [],
1776
+ * // "totals": []
1777
+ * // }
1778
+ * }
1779
+ *
1780
+ * main().catch(e => {
1781
+ * console.error(e);
1782
+ * throw e;
1783
+ * });
1784
+ *
1785
+ * ```
1408
1786
  *
1409
1787
  * @param params - Parameters for request
1410
1788
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1411
1789
  * @param callback - Optional callback that handles the response.
1412
1790
  * @returns A promise if used with async/await, or void if used with a callback.
1413
1791
  */
1414
- runRealtimeReport(params: Params$Resource$Properties$Runrealtimereport, options: StreamMethodOptions): GaxiosPromise<Readable>;
1415
- runRealtimeReport(params?: Params$Resource$Properties$Runrealtimereport, options?: MethodOptions): GaxiosPromise<Schema$RunRealtimeReportResponse>;
1792
+ runRealtimeReport(params: Params$Resource$Properties$Runrealtimereport, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
1793
+ runRealtimeReport(params?: Params$Resource$Properties$Runrealtimereport, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$RunRealtimeReportResponse>>;
1416
1794
  runRealtimeReport(params: Params$Resource$Properties$Runrealtimereport, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1417
1795
  runRealtimeReport(params: Params$Resource$Properties$Runrealtimereport, options: MethodOptions | BodyResponseCallback<Schema$RunRealtimeReportResponse>, callback: BodyResponseCallback<Schema$RunRealtimeReportResponse>): void;
1418
1796
  runRealtimeReport(params: Params$Resource$Properties$Runrealtimereport, callback: BodyResponseCallback<Schema$RunRealtimeReportResponse>): void;
1419
1797
  runRealtimeReport(callback: BodyResponseCallback<Schema$RunRealtimeReportResponse>): void;
1420
1798
  /**
1421
1799
  * Returns a customized report of your Google Analytics event data. Reports contain statistics derived from data collected by the Google Analytics tracking code. The data returned from the API is as a table with columns for the requested dimensions and metrics. Metrics are individual measurements of user activity on your property, such as active users or event count. Dimensions break down metrics across some common criteria, such as country or event name. For a guide to constructing requests & understanding responses, see [Creating a Report](https://developers.google.com/analytics/devguides/reporting/data/v1/basics).
1800
+ * @example
1801
+ * ```js
1802
+ * // Before running the sample:
1803
+ * // - Enable the API at:
1804
+ * // https://console.developers.google.com/apis/api/analyticsdata.googleapis.com
1805
+ * // - Login into gcloud by running:
1806
+ * // ```sh
1807
+ * // $ gcloud auth application-default login
1808
+ * // ```
1809
+ * // - Install the npm module by running:
1810
+ * // ```sh
1811
+ * // $ npm install googleapis
1812
+ * // ```
1813
+ *
1814
+ * const {google} = require('googleapis');
1815
+ * const analyticsdata = google.analyticsdata('v1beta');
1816
+ *
1817
+ * async function main() {
1818
+ * const auth = new google.auth.GoogleAuth({
1819
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1820
+ * scopes: [
1821
+ * 'https://www.googleapis.com/auth/analytics',
1822
+ * 'https://www.googleapis.com/auth/analytics.readonly',
1823
+ * ],
1824
+ * });
1825
+ *
1826
+ * // Acquire an auth client, and bind it to all future calls
1827
+ * const authClient = await auth.getClient();
1828
+ * google.options({auth: authClient});
1829
+ *
1830
+ * // Do the magic
1831
+ * const res = await analyticsdata.properties.runReport({
1832
+ * // A Google Analytics property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). Within a batch request, this property should either be unspecified or consistent with the batch-level property. Example: properties/1234
1833
+ * property: 'properties/my-propertie',
1834
+ *
1835
+ * // Request body metadata
1836
+ * requestBody: {
1837
+ * // request body parameters
1838
+ * // {
1839
+ * // "cohortSpec": {},
1840
+ * // "comparisons": [],
1841
+ * // "currencyCode": "my_currencyCode",
1842
+ * // "dateRanges": [],
1843
+ * // "dimensionFilter": {},
1844
+ * // "dimensions": [],
1845
+ * // "keepEmptyRows": false,
1846
+ * // "limit": "my_limit",
1847
+ * // "metricAggregations": [],
1848
+ * // "metricFilter": {},
1849
+ * // "metrics": [],
1850
+ * // "offset": "my_offset",
1851
+ * // "orderBys": [],
1852
+ * // "property": "my_property",
1853
+ * // "returnPropertyQuota": false
1854
+ * // }
1855
+ * },
1856
+ * });
1857
+ * console.log(res.data);
1858
+ *
1859
+ * // Example response
1860
+ * // {
1861
+ * // "dimensionHeaders": [],
1862
+ * // "kind": "my_kind",
1863
+ * // "maximums": [],
1864
+ * // "metadata": {},
1865
+ * // "metricHeaders": [],
1866
+ * // "minimums": [],
1867
+ * // "propertyQuota": {},
1868
+ * // "rowCount": 0,
1869
+ * // "rows": [],
1870
+ * // "totals": []
1871
+ * // }
1872
+ * }
1873
+ *
1874
+ * main().catch(e => {
1875
+ * console.error(e);
1876
+ * throw e;
1877
+ * });
1878
+ *
1879
+ * ```
1422
1880
  *
1423
1881
  * @param params - Parameters for request
1424
1882
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1425
1883
  * @param callback - Optional callback that handles the response.
1426
1884
  * @returns A promise if used with async/await, or void if used with a callback.
1427
1885
  */
1428
- runReport(params: Params$Resource$Properties$Runreport, options: StreamMethodOptions): GaxiosPromise<Readable>;
1429
- runReport(params?: Params$Resource$Properties$Runreport, options?: MethodOptions): GaxiosPromise<Schema$RunReportResponse>;
1886
+ runReport(params: Params$Resource$Properties$Runreport, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
1887
+ runReport(params?: Params$Resource$Properties$Runreport, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$RunReportResponse>>;
1430
1888
  runReport(params: Params$Resource$Properties$Runreport, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1431
1889
  runReport(params: Params$Resource$Properties$Runreport, options: MethodOptions | BodyResponseCallback<Schema$RunReportResponse>, callback: BodyResponseCallback<Schema$RunReportResponse>): void;
1432
1890
  runReport(params: Params$Resource$Properties$Runreport, callback: BodyResponseCallback<Schema$RunReportResponse>): void;
@@ -1503,56 +1961,298 @@ export declare namespace analyticsdata_v1beta {
1503
1961
  constructor(context: APIRequestContext);
1504
1962
  /**
1505
1963
  * Creates an audience export for later retrieval. This method quickly returns the audience export's resource name and initiates a long running asynchronous request to form an audience export. To export the users in an audience export, first create the audience export through this method and then send the audience resource name to the `QueryAudienceExport` method. See [Creating an Audience Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) for an introduction to Audience Exports with examples. An audience export is a snapshot of the users currently in the audience at the time of audience export creation. Creating audience exports for one audience on different days will return different results as users enter and exit the audience. Audiences in Google Analytics 4 allow you to segment your users in the ways that are important to your business. To learn more, see https://support.google.com/analytics/answer/9267572. Audience exports contain the users in each audience. Audience Export APIs have some methods at alpha and other methods at beta stability. The intention is to advance methods to beta stability after some feedback and adoption. To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.
1964
+ * @example
1965
+ * ```js
1966
+ * // Before running the sample:
1967
+ * // - Enable the API at:
1968
+ * // https://console.developers.google.com/apis/api/analyticsdata.googleapis.com
1969
+ * // - Login into gcloud by running:
1970
+ * // ```sh
1971
+ * // $ gcloud auth application-default login
1972
+ * // ```
1973
+ * // - Install the npm module by running:
1974
+ * // ```sh
1975
+ * // $ npm install googleapis
1976
+ * // ```
1977
+ *
1978
+ * const {google} = require('googleapis');
1979
+ * const analyticsdata = google.analyticsdata('v1beta');
1980
+ *
1981
+ * async function main() {
1982
+ * const auth = new google.auth.GoogleAuth({
1983
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1984
+ * scopes: [
1985
+ * 'https://www.googleapis.com/auth/analytics',
1986
+ * 'https://www.googleapis.com/auth/analytics.readonly',
1987
+ * ],
1988
+ * });
1989
+ *
1990
+ * // Acquire an auth client, and bind it to all future calls
1991
+ * const authClient = await auth.getClient();
1992
+ * google.options({auth: authClient});
1993
+ *
1994
+ * // Do the magic
1995
+ * const res = await analyticsdata.properties.audienceExports.create({
1996
+ * // Required. The parent resource where this audience export will be created. Format: `properties/{property\}`
1997
+ * parent: 'properties/my-propertie',
1998
+ *
1999
+ * // Request body metadata
2000
+ * requestBody: {
2001
+ * // request body parameters
2002
+ * // {
2003
+ * // "audience": "my_audience",
2004
+ * // "audienceDisplayName": "my_audienceDisplayName",
2005
+ * // "beginCreatingTime": "my_beginCreatingTime",
2006
+ * // "creationQuotaTokensCharged": 0,
2007
+ * // "dimensions": [],
2008
+ * // "errorMessage": "my_errorMessage",
2009
+ * // "name": "my_name",
2010
+ * // "percentageCompleted": {},
2011
+ * // "rowCount": 0,
2012
+ * // "state": "my_state"
2013
+ * // }
2014
+ * },
2015
+ * });
2016
+ * console.log(res.data);
2017
+ *
2018
+ * // Example response
2019
+ * // {
2020
+ * // "done": false,
2021
+ * // "error": {},
2022
+ * // "metadata": {},
2023
+ * // "name": "my_name",
2024
+ * // "response": {}
2025
+ * // }
2026
+ * }
2027
+ *
2028
+ * main().catch(e => {
2029
+ * console.error(e);
2030
+ * throw e;
2031
+ * });
2032
+ *
2033
+ * ```
1506
2034
  *
1507
2035
  * @param params - Parameters for request
1508
2036
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1509
2037
  * @param callback - Optional callback that handles the response.
1510
2038
  * @returns A promise if used with async/await, or void if used with a callback.
1511
2039
  */
1512
- create(params: Params$Resource$Properties$Audienceexports$Create, options: StreamMethodOptions): GaxiosPromise<Readable>;
1513
- create(params?: Params$Resource$Properties$Audienceexports$Create, options?: MethodOptions): GaxiosPromise<Schema$Operation>;
2040
+ create(params: Params$Resource$Properties$Audienceexports$Create, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
2041
+ create(params?: Params$Resource$Properties$Audienceexports$Create, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
1514
2042
  create(params: Params$Resource$Properties$Audienceexports$Create, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1515
2043
  create(params: Params$Resource$Properties$Audienceexports$Create, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
1516
2044
  create(params: Params$Resource$Properties$Audienceexports$Create, callback: BodyResponseCallback<Schema$Operation>): void;
1517
2045
  create(callback: BodyResponseCallback<Schema$Operation>): void;
1518
2046
  /**
1519
2047
  * Gets configuration metadata about a specific audience export. This method can be used to understand an audience export after it has been created. See [Creating an Audience Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) for an introduction to Audience Exports with examples. Audience Export APIs have some methods at alpha and other methods at beta stability. The intention is to advance methods to beta stability after some feedback and adoption. To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.
2048
+ * @example
2049
+ * ```js
2050
+ * // Before running the sample:
2051
+ * // - Enable the API at:
2052
+ * // https://console.developers.google.com/apis/api/analyticsdata.googleapis.com
2053
+ * // - Login into gcloud by running:
2054
+ * // ```sh
2055
+ * // $ gcloud auth application-default login
2056
+ * // ```
2057
+ * // - Install the npm module by running:
2058
+ * // ```sh
2059
+ * // $ npm install googleapis
2060
+ * // ```
2061
+ *
2062
+ * const {google} = require('googleapis');
2063
+ * const analyticsdata = google.analyticsdata('v1beta');
2064
+ *
2065
+ * async function main() {
2066
+ * const auth = new google.auth.GoogleAuth({
2067
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2068
+ * scopes: [
2069
+ * 'https://www.googleapis.com/auth/analytics',
2070
+ * 'https://www.googleapis.com/auth/analytics.readonly',
2071
+ * ],
2072
+ * });
2073
+ *
2074
+ * // Acquire an auth client, and bind it to all future calls
2075
+ * const authClient = await auth.getClient();
2076
+ * google.options({auth: authClient});
2077
+ *
2078
+ * // Do the magic
2079
+ * const res = await analyticsdata.properties.audienceExports.get({
2080
+ * // Required. The audience export resource name. Format: `properties/{property\}/audienceExports/{audience_export\}`
2081
+ * name: 'properties/my-propertie/audienceExports/my-audienceExport',
2082
+ * });
2083
+ * console.log(res.data);
2084
+ *
2085
+ * // Example response
2086
+ * // {
2087
+ * // "audience": "my_audience",
2088
+ * // "audienceDisplayName": "my_audienceDisplayName",
2089
+ * // "beginCreatingTime": "my_beginCreatingTime",
2090
+ * // "creationQuotaTokensCharged": 0,
2091
+ * // "dimensions": [],
2092
+ * // "errorMessage": "my_errorMessage",
2093
+ * // "name": "my_name",
2094
+ * // "percentageCompleted": {},
2095
+ * // "rowCount": 0,
2096
+ * // "state": "my_state"
2097
+ * // }
2098
+ * }
2099
+ *
2100
+ * main().catch(e => {
2101
+ * console.error(e);
2102
+ * throw e;
2103
+ * });
2104
+ *
2105
+ * ```
1520
2106
  *
1521
2107
  * @param params - Parameters for request
1522
2108
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1523
2109
  * @param callback - Optional callback that handles the response.
1524
2110
  * @returns A promise if used with async/await, or void if used with a callback.
1525
2111
  */
1526
- get(params: Params$Resource$Properties$Audienceexports$Get, options: StreamMethodOptions): GaxiosPromise<Readable>;
1527
- get(params?: Params$Resource$Properties$Audienceexports$Get, options?: MethodOptions): GaxiosPromise<Schema$AudienceExport>;
2112
+ get(params: Params$Resource$Properties$Audienceexports$Get, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
2113
+ get(params?: Params$Resource$Properties$Audienceexports$Get, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$AudienceExport>>;
1528
2114
  get(params: Params$Resource$Properties$Audienceexports$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1529
2115
  get(params: Params$Resource$Properties$Audienceexports$Get, options: MethodOptions | BodyResponseCallback<Schema$AudienceExport>, callback: BodyResponseCallback<Schema$AudienceExport>): void;
1530
2116
  get(params: Params$Resource$Properties$Audienceexports$Get, callback: BodyResponseCallback<Schema$AudienceExport>): void;
1531
2117
  get(callback: BodyResponseCallback<Schema$AudienceExport>): void;
1532
2118
  /**
1533
2119
  * Lists all audience exports for a property. This method can be used for you to find and reuse existing audience exports rather than creating unnecessary new audience exports. The same audience can have multiple audience exports that represent the export of users that were in an audience on different days. See [Creating an Audience Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) for an introduction to Audience Exports with examples. Audience Export APIs have some methods at alpha and other methods at beta stability. The intention is to advance methods to beta stability after some feedback and adoption. To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.
2120
+ * @example
2121
+ * ```js
2122
+ * // Before running the sample:
2123
+ * // - Enable the API at:
2124
+ * // https://console.developers.google.com/apis/api/analyticsdata.googleapis.com
2125
+ * // - Login into gcloud by running:
2126
+ * // ```sh
2127
+ * // $ gcloud auth application-default login
2128
+ * // ```
2129
+ * // - Install the npm module by running:
2130
+ * // ```sh
2131
+ * // $ npm install googleapis
2132
+ * // ```
2133
+ *
2134
+ * const {google} = require('googleapis');
2135
+ * const analyticsdata = google.analyticsdata('v1beta');
2136
+ *
2137
+ * async function main() {
2138
+ * const auth = new google.auth.GoogleAuth({
2139
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2140
+ * scopes: [
2141
+ * 'https://www.googleapis.com/auth/analytics',
2142
+ * 'https://www.googleapis.com/auth/analytics.readonly',
2143
+ * ],
2144
+ * });
2145
+ *
2146
+ * // Acquire an auth client, and bind it to all future calls
2147
+ * const authClient = await auth.getClient();
2148
+ * google.options({auth: authClient});
2149
+ *
2150
+ * // Do the magic
2151
+ * const res = await analyticsdata.properties.audienceExports.list({
2152
+ * // Optional. The maximum number of audience exports to return. The service may return fewer than this value. If unspecified, at most 200 audience exports will be returned. The maximum value is 1000 (higher values will be coerced to the maximum).
2153
+ * pageSize: 'placeholder-value',
2154
+ * // Optional. A page token, received from a previous `ListAudienceExports` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListAudienceExports` must match the call that provided the page token.
2155
+ * pageToken: 'placeholder-value',
2156
+ * // Required. All audience exports for this property will be listed in the response. Format: `properties/{property\}`
2157
+ * parent: 'properties/my-propertie',
2158
+ * });
2159
+ * console.log(res.data);
2160
+ *
2161
+ * // Example response
2162
+ * // {
2163
+ * // "audienceExports": [],
2164
+ * // "nextPageToken": "my_nextPageToken"
2165
+ * // }
2166
+ * }
2167
+ *
2168
+ * main().catch(e => {
2169
+ * console.error(e);
2170
+ * throw e;
2171
+ * });
2172
+ *
2173
+ * ```
1534
2174
  *
1535
2175
  * @param params - Parameters for request
1536
2176
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1537
2177
  * @param callback - Optional callback that handles the response.
1538
2178
  * @returns A promise if used with async/await, or void if used with a callback.
1539
2179
  */
1540
- list(params: Params$Resource$Properties$Audienceexports$List, options: StreamMethodOptions): GaxiosPromise<Readable>;
1541
- list(params?: Params$Resource$Properties$Audienceexports$List, options?: MethodOptions): GaxiosPromise<Schema$ListAudienceExportsResponse>;
2180
+ list(params: Params$Resource$Properties$Audienceexports$List, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
2181
+ list(params?: Params$Resource$Properties$Audienceexports$List, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ListAudienceExportsResponse>>;
1542
2182
  list(params: Params$Resource$Properties$Audienceexports$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1543
2183
  list(params: Params$Resource$Properties$Audienceexports$List, options: MethodOptions | BodyResponseCallback<Schema$ListAudienceExportsResponse>, callback: BodyResponseCallback<Schema$ListAudienceExportsResponse>): void;
1544
2184
  list(params: Params$Resource$Properties$Audienceexports$List, callback: BodyResponseCallback<Schema$ListAudienceExportsResponse>): void;
1545
2185
  list(callback: BodyResponseCallback<Schema$ListAudienceExportsResponse>): void;
1546
2186
  /**
1547
2187
  * Retrieves an audience export of users. After creating an audience, the users are not immediately available for exporting. First, a request to `CreateAudienceExport` is necessary to create an audience export of users, and then second, this method is used to retrieve the users in the audience export. See [Creating an Audience Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) for an introduction to Audience Exports with examples. Audiences in Google Analytics 4 allow you to segment your users in the ways that are important to your business. To learn more, see https://support.google.com/analytics/answer/9267572. Audience Export APIs have some methods at alpha and other methods at beta stability. The intention is to advance methods to beta stability after some feedback and adoption. To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.
2188
+ * @example
2189
+ * ```js
2190
+ * // Before running the sample:
2191
+ * // - Enable the API at:
2192
+ * // https://console.developers.google.com/apis/api/analyticsdata.googleapis.com
2193
+ * // - Login into gcloud by running:
2194
+ * // ```sh
2195
+ * // $ gcloud auth application-default login
2196
+ * // ```
2197
+ * // - Install the npm module by running:
2198
+ * // ```sh
2199
+ * // $ npm install googleapis
2200
+ * // ```
2201
+ *
2202
+ * const {google} = require('googleapis');
2203
+ * const analyticsdata = google.analyticsdata('v1beta');
2204
+ *
2205
+ * async function main() {
2206
+ * const auth = new google.auth.GoogleAuth({
2207
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2208
+ * scopes: [
2209
+ * 'https://www.googleapis.com/auth/analytics',
2210
+ * 'https://www.googleapis.com/auth/analytics.readonly',
2211
+ * ],
2212
+ * });
2213
+ *
2214
+ * // Acquire an auth client, and bind it to all future calls
2215
+ * const authClient = await auth.getClient();
2216
+ * google.options({auth: authClient});
2217
+ *
2218
+ * // Do the magic
2219
+ * const res = await analyticsdata.properties.audienceExports.query({
2220
+ * // Required. The name of the audience export to retrieve users from. Format: `properties/{property\}/audienceExports/{audience_export\}`
2221
+ * name: 'properties/my-propertie/audienceExports/my-audienceExport',
2222
+ *
2223
+ * // Request body metadata
2224
+ * requestBody: {
2225
+ * // request body parameters
2226
+ * // {
2227
+ * // "limit": "my_limit",
2228
+ * // "offset": "my_offset"
2229
+ * // }
2230
+ * },
2231
+ * });
2232
+ * console.log(res.data);
2233
+ *
2234
+ * // Example response
2235
+ * // {
2236
+ * // "audienceExport": {},
2237
+ * // "audienceRows": [],
2238
+ * // "rowCount": 0
2239
+ * // }
2240
+ * }
2241
+ *
2242
+ * main().catch(e => {
2243
+ * console.error(e);
2244
+ * throw e;
2245
+ * });
2246
+ *
2247
+ * ```
1548
2248
  *
1549
2249
  * @param params - Parameters for request
1550
2250
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1551
2251
  * @param callback - Optional callback that handles the response.
1552
2252
  * @returns A promise if used with async/await, or void if used with a callback.
1553
2253
  */
1554
- query(params: Params$Resource$Properties$Audienceexports$Query, options: StreamMethodOptions): GaxiosPromise<Readable>;
1555
- query(params?: Params$Resource$Properties$Audienceexports$Query, options?: MethodOptions): GaxiosPromise<Schema$QueryAudienceExportResponse>;
2254
+ query(params: Params$Resource$Properties$Audienceexports$Query, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
2255
+ query(params?: Params$Resource$Properties$Audienceexports$Query, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$QueryAudienceExportResponse>>;
1556
2256
  query(params: Params$Resource$Properties$Audienceexports$Query, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1557
2257
  query(params: Params$Resource$Properties$Audienceexports$Query, options: MethodOptions | BodyResponseCallback<Schema$QueryAudienceExportResponse>, callback: BodyResponseCallback<Schema$QueryAudienceExportResponse>): void;
1558
2258
  query(params: Params$Resource$Properties$Audienceexports$Query, callback: BodyResponseCallback<Schema$QueryAudienceExportResponse>): void;