Skip to content

Commit

Permalink
replace all of v12 to v13
Browse files Browse the repository at this point in the history
  • Loading branch information
htdangkhoa committed May 23, 2023
1 parent 9543c63 commit f218a52
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<p align="center">
<a href="https://developers.google.com/google-ads/api/docs/release-notes">
<img src="https://img.shields.io/badge/google%20ads-v12-009688.svg?style=flat-square">
<img src="https://img.shields.io/badge/google%20ads-v13-009688.svg?style=flat-square">
</a>
<a href="https://www.npmjs.com/package/@htdangkhoa/google-ads">
<img src="https://img.shields.io/npm/v/@htdangkhoa/google-ads.svg?style=flat-square">
Expand Down Expand Up @@ -232,7 +232,7 @@ const response = await service.search({ query });
yarn generate <GOOGLE_API_VERSION>
# example
yarn generate v12
yarn generate v13
```

3. Run tests to make sure everything worked (you may need to update the version numbers here)
Expand Down
4 changes: 2 additions & 2 deletions example/ad-group-ad.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { google } from 'googleapis';

import { GoogleAds } from '../src/lib';
import { AdTextAsset } from '../src/generated/google/ads/googleads/v12/common/ad_asset';
import { AdGroupAdStatusEnum_AdGroupAdStatus } from '../src/generated/google/ads/googleads/v12/enums/ad_group_ad_status';
import { AdTextAsset } from '../src/generated/google/ads/googleads/v13/common/ad_asset';
import { AdGroupAdStatusEnum_AdGroupAdStatus } from '../src/generated/google/ads/googleads/v13/enums/ad_group_ad_status';

const authClient = new google.auth.JWT({
keyFile: process.env.GOOGLE_APPLICATION_CREDENTIALS,
Expand Down
4 changes: 2 additions & 2 deletions example/ad-group.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { google } from 'googleapis';

import { GoogleAds } from '../src/lib';
import { AdGroupStatusEnum_AdGroupStatus } from '../src/generated/google/ads/googleads/v12/enums/ad_group_status';
import { AdGroupTypeEnum_AdGroupType } from '../src/generated/google/ads/googleads/v12/enums/ad_group_type';
import { AdGroupStatusEnum_AdGroupStatus } from '../src/generated/google/ads/googleads/v13/enums/ad_group_status';
import { AdGroupTypeEnum_AdGroupType } from '../src/generated/google/ads/googleads/v13/enums/ad_group_type';

const authClient = new google.auth.JWT({
keyFile: process.env.GOOGLE_APPLICATION_CREDENTIALS,
Expand Down
4 changes: 2 additions & 2 deletions example/asset.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { google } from 'googleapis';

import { GoogleAds } from '../src/lib';
import { Asset } from '../src/generated/google/ads/googleads/v12/resources/asset';
import { MutateOperation } from '../src/generated/google/ads/googleads/v12/services/google_ads_service';
import { Asset } from '../src/generated/google/ads/googleads/v13/resources/asset';
import { MutateOperation } from '../src/generated/google/ads/googleads/v13/services/google_ads_service';

const authClient = new google.auth.JWT({
keyFile: process.env.GOOGLE_APPLICATION_CREDENTIALS,
Expand Down
2 changes: 1 addition & 1 deletion scripts/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
version=$1

if [ -z "$version" ]; then
echo "Version is required! Usage: generate.sh v12"
echo "Version is required! Usage: generate.sh v13"
exit 1
fi

Expand Down
2 changes: 1 addition & 1 deletion src/lib/constants.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export const VERSION = 'v12' as const;
export const VERSION = 'v13' as const;

export const FAILURE_KEY = `google.ads.googleads.${VERSION}.errors.googleadsfailure-bin`;

0 comments on commit f218a52

Please sign in to comment.