google-ads-api 8.0.0 → 9.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
  </p>
8
8
  <p align="center">
9
9
  <a href="https://developers.google.com/google-ads/api/docs/release-notes">
10
- <img src="https://img.shields.io/badge/google%20ads-v8-009688.svg?style=flat-square">
10
+ <img src="https://img.shields.io/badge/google%20ads-v9.1.0-009688.svg?style=flat-square">
11
11
  </a>
12
12
  <a href="https://www.npmjs.com/package/google-ads-api">
13
13
  <img src="https://img.shields.io/npm/v/google-ads-api.svg?style=flat-square">
@@ -33,7 +33,7 @@
33
33
  - Typescript definitions for all resources, enums, errors and services
34
34
  - Provides all API functionality
35
35
 
36
- > The Google Ads API is the new replacement to the AdWords API. Google will deprecate the AdWords API sometime in 2020.
36
+ > The Google Ads API is the new replacement to the AdWords API. Google will deprecate the AdWords API on the 27th of April, 2022.
37
37
 
38
38
  # Hiring
39
39
 
@@ -45,18 +45,6 @@ We're currently hiring full-stack engineers at [Opteo](https://opteo.com)! If yo
45
45
  npm install google-ads-api
46
46
  ```
47
47
 
48
- # Documentation
49
-
50
- **Note:** Our documentation site is currently outdated (an older version of this library and the Google Ads API) but is still up. We're working on updating these docs soon.
51
-
52
- ---
53
-
54
- ### ➡️ [opteo.com/dev/google-ads-api](https://opteo.com/dev/google-ads-api)
55
-
56
- ---
57
-
58
- For now we recommend following the usage examples below.
59
-
60
48
  # Usage
61
49
 
62
50
  - Setup
@@ -114,7 +102,7 @@ const customer = client.Customer({
114
102
 
115
103
  ## List accessible customers
116
104
 
117
- This is a special client method for listing the accessible customers for a given refresh token, and is equivalent to [CustomerService.listAccessibleCustomers](https://developers.google.com/google-ads/api/reference/rpc/v8/CustomerService#listaccessiblecustomers). It returns the resource names of available customer accounts.
105
+ This is a special client method for listing the accessible customers for a given refresh token, and is equivalent to [CustomerService.listAccessibleCustomers](https://developers.google.com/google-ads/api/reference/rpc/v9/CustomerService#listaccessiblecustomers). It returns the resource names of available customer accounts.
118
106
 
119
107
  ```ts
120
108
  const client = new GoogleAdsApi({
@@ -307,6 +295,8 @@ const adGroupAd = new resources.AdGroupAd({
307
295
  const { results } = await cus.adGroupAds.create([adGroupAd]);
308
296
  ```
309
297
 
298
+ ---
299
+
310
300
  ## Create a Campaign & Budget atomically
311
301
 
312
302
  ```ts
@@ -361,6 +351,8 @@ const operations: MutateOperation<
361
351
  const result = await customer.mutateResources(operations);
362
352
  ```
363
353
 
354
+ ---
355
+
364
356
  ## Summary Row
365
357
 
366
358
  If a summary row is requested in the `report` method, it will be included as the **first** row of the results.
@@ -394,7 +386,7 @@ const summaryRow = accumulator.slice(-1)[0];
394
386
 
395
387
  ## Total Results Count
396
388
 
397
- The `reportCount` method acts like `report` but returns the total number of rows that the query would have returned (ignoring the limit). This replaces the `return_total_results_count` report option. No hooks are called in this function to avoid cacheing conflicts.
389
+ The `reportCount` method acts like `report` but returns the total number of rows that the query would have returned (ignoring the limit). This replaces the `return_total_results_count` report option. Hooks are **not** called in this function to avoid cacheing conflicts.
398
390
 
399
391
  ```ts
400
392
  const totalRows = await customer.reportCount({
@@ -570,11 +562,13 @@ const customer = client.Customer({
570
562
  });
571
563
  ```
572
564
 
565
+ ---
566
+
573
567
  ## Error handling
574
568
 
575
- All errors, apart from GRPC specific cases (such as a connection problem or timeout, [see more here](https://github.com/grpc/grpc/blob/master/doc/statuscodes.md)), are instances of a [GoogleAdsFailure](https://developers.google.com/google-ads/api/reference/rpc/v8/GoogleAdsFailure).
569
+ All errors, apart from GRPC specific cases (such as a connection problem or timeout, [see more here](https://github.com/grpc/grpc/blob/master/doc/statuscodes.md)), are instances of a [GoogleAdsFailure](https://developers.google.com/google-ads/api/reference/rpc/v9/GoogleAdsFailure).
576
570
 
577
- You can find a list of all error types for a specific version in [the official documentation](https://developers.google.com/google-ads/api/reference/rpc/v8/AccessInvitationErrorEnum.AccessInvitationError), as well as more information about [handling errors here](https://developers.google.com/google-ads/api/docs/best-practices/error-types).
571
+ You can find a list of all error types for a specific version in [the official documentation](https://developers.google.com/google-ads/api/reference/rpc/v9/AccessInvitationErrorEnum.AccessInvitationError), as well as more information about [handling errors here](https://developers.google.com/google-ads/api/docs/best-practices/error-types).
578
572
 
579
573
  ```ts
580
574
  import { errors } from "google-ads-api";