google-ads-api 17.0.0-beta.3 → 17.1.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 +35 -15
- package/build/src/version.js +0 -18
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -379,32 +379,34 @@ import {
|
|
|
379
379
|
} from "google-ads-api";
|
|
380
380
|
|
|
381
381
|
// Ad Group to which you want to add the keyword
|
|
382
|
-
const adGroupResourceName =
|
|
382
|
+
const adGroupResourceName = "customers/123/adGroups/456";
|
|
383
383
|
|
|
384
|
-
const keyword =
|
|
384
|
+
const keyword = "24 hour locksmith harlem";
|
|
385
385
|
|
|
386
386
|
const operations: MutateOperation<
|
|
387
|
-
resources.IAdGroupCriterion & {
|
|
387
|
+
resources.IAdGroupCriterion & {
|
|
388
|
+
exempt_policy_violation_keys?: google.ads.googleads.v16.common.IPolicyViolationKey[];
|
|
389
|
+
}
|
|
388
390
|
>[] = [
|
|
389
391
|
{
|
|
390
|
-
entity:
|
|
392
|
+
entity: "ad_group_criterion",
|
|
391
393
|
operation: "create",
|
|
392
394
|
resource: {
|
|
393
395
|
// Keyword with policy violation exemptions
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
396
|
+
ad_group: adGroupResourceName,
|
|
397
|
+
keyword: {
|
|
398
|
+
text: "24 hour locksmith harlem",
|
|
399
|
+
match_type: enums.KeywordMatchType.PHRASE,
|
|
400
|
+
},
|
|
401
|
+
status: enums.AdGroupStatus.ENABLED,
|
|
400
402
|
},
|
|
401
403
|
exempt_policy_violation_keys: [
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
404
|
+
{
|
|
405
|
+
policy_name: "LOCAL_SERVICES",
|
|
406
|
+
violating_text: keyword,
|
|
407
|
+
},
|
|
406
408
|
],
|
|
407
|
-
}
|
|
409
|
+
},
|
|
408
410
|
];
|
|
409
411
|
|
|
410
412
|
const result = await customer.mutateResources(operations);
|
|
@@ -693,3 +695,21 @@ try {
|
|
|
693
695
|
}
|
|
694
696
|
}
|
|
695
697
|
```
|
|
698
|
+
|
|
699
|
+
# Updating this library to the latest Google Ads API version
|
|
700
|
+
|
|
701
|
+
1. Update google-ads-node & publish to NPM. Check that package for instructions.
|
|
702
|
+
2. Update google-ads-node & google-gax in package.json. google-gax must be the same version as google-ads-node,
|
|
703
|
+
Otherwise you are likely to get a `TypeError: Channel credentials must be a ChannelCredentials object` error.
|
|
704
|
+
3. Update the version in this file
|
|
705
|
+
4. Update the versions in src/protos/index.ts
|
|
706
|
+
5. Run `yarn compile` to update the generated files.
|
|
707
|
+
The `tsc` command might fail -- if so, temporarily add @ts-nocheck
|
|
708
|
+
to the top of problematic files so that the compile script can continue.
|
|
709
|
+
After the compile script has run, those @ts-nocheck lines should no longer be required.
|
|
710
|
+
The compile step depends on some environment variables being set (see scripts/fields.ts), so make sure to set those.
|
|
711
|
+
6. Prettify the generated files so the the diffs are easier to read.
|
|
712
|
+
7. Check that the diffs are expected and that the generated files are correct. New Gads versions will often add new services, fields, and enums.
|
|
713
|
+
8. Test with `yarn test`
|
|
714
|
+
9. Test by linking to a real project and making some real requests.
|
|
715
|
+
10. Once confident, bump the major version & publish to NPM.
|
package/build/src/version.js
CHANGED
|
@@ -1,22 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.googleAdsVersion = void 0;
|
|
4
|
-
/*
|
|
5
|
-
How to upgrade google ads version:
|
|
6
|
-
1. Update google-ads-node & publish to NPM. Check that package for instructions.
|
|
7
|
-
2. Update google-ads-node & google-gax in package.json. google-gax must be the same version as google-ads-node,
|
|
8
|
-
Otherwise you are likely to get a `TypeError: Channel credentials must be a ChannelCredentials object` error.
|
|
9
|
-
3. Update the version in this file
|
|
10
|
-
4. Update the versions in src/protos/index.ts
|
|
11
|
-
5. Run `yarn compile` to update the generated files.
|
|
12
|
-
The `tsc` command might fail -- if so, temporarily add @ts-nocheck
|
|
13
|
-
to the top of problematic files so that the compile script can continue.
|
|
14
|
-
After the compile script has run, those @ts-nocheck lines should no longer be required.
|
|
15
|
-
The compile step depends on some environment variables being set (see scripts/fields.ts), so make sure to set those.
|
|
16
|
-
6. Prettify the generated files so the the diffs are easier to read.
|
|
17
|
-
7. Check that the diffs are expected and that the generated files are correct. New Gads versions will often add new services, fields, and enums.
|
|
18
|
-
8. Test with `yarn test`
|
|
19
|
-
9. Test by linking to a real project and making some real requests.
|
|
20
|
-
10. Once confident, bump the major version & publish to NPM.
|
|
21
|
-
*/
|
|
22
4
|
exports.googleAdsVersion = "v17";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "google-ads-api",
|
|
3
|
-
"version": "17.
|
|
3
|
+
"version": "17.1.0",
|
|
4
4
|
"description": "Google Ads API Client Library for Node.js",
|
|
5
5
|
"repository": "https://github.com/Opteo/google-ads-api",
|
|
6
6
|
"main": "build/src/index.js",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"license": "MIT",
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@isaacs/ttlcache": "^1.2.2",
|
|
21
|
-
"google-ads-node": "14.0.0
|
|
21
|
+
"google-ads-node": "14.0.0",
|
|
22
22
|
"google-auth-library": "^7.1.0",
|
|
23
23
|
"google-gax": "^4.4.1",
|
|
24
24
|
"long": "^4.0.0"
|