Skip to content

Commit

Permalink
Updating component code to use PD Proxy for requests. (#11842)
Browse files Browse the repository at this point in the history
* Updating component code to use PD Proxy for requests.

* Version bump.
  • Loading branch information
malexanderlim authored May 7, 2024
1 parent ce5586d commit 294cd74
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "google_ads-add-contact-to-list-by-email",
name: "Add Contact to Customer List by Email",
description: "Adds a contact to a specific customer list in Google Ads. Lists typically update in 6 to 12 hours after operation. [See the documentation](https://developers.google.com/google-ads/api/docs/remarketing/audience-segments/customer-match/get-started)",
version: "0.0.1",
version: "0.0.2",
type: "action",
props: {
googleAds,
Expand Down
12 changes: 7 additions & 5 deletions components/google_ads/google_ads.app.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,23 @@ export default {
},
methods: {
_baseUrl() {
return "https://googleads.googleapis.com";
return "https://eolid4dq1k0t9hi.m.pipedream.net";
},
_headers() {
return {
"Authorization": `Bearer ${this.$auth.oauth_access_token}`,
"developer-token": `${this.$auth.developer_token}`,
};
},
_makeRequest({
$ = this, path, ...opts
$ = this, ...opts
}) {
return axios($, {
url: this._baseUrl() + path,
const googleAdsRequest = {
headers: this._headers(),
...opts,
};
return axios($, {
url: this._baseUrl(),
data: googleAdsRequest,
});
},
addContactToCustomerList({
Expand Down
2 changes: 1 addition & 1 deletion components/google_ads/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/google_ads",
"version": "0.1.0",
"version": "0.1.1",
"description": "Pipedream Google Ads Components",
"main": "google_ads.app.mjs",
"keywords": [
Expand Down

0 comments on commit 294cd74

Please sign in to comment.