Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Results are returned as objects instead of raw values #59

Closed
1 of 4 tasks
mateuszjanusz opened this issue Jun 18, 2019 · 1 comment · Fixed by Opteo/google-ads-node#19
Closed
1 of 4 tasks

Results are returned as objects instead of raw values #59

mateuszjanusz opened this issue Jun 18, 2019 · 1 comment · Fixed by Opteo/google-ads-node#19
Labels
bug ⚠️ Something isn't working in the library

Comments

@mateuszjanusz
Copy link
Contributor

I'm submitting a ...

  • bug report
  • feature request
  • question about the decisions made in the repository
  • question about how to use this project

Summary

I noticed that the library wraps some results into objects with key value, instead of returning just raw values.

For instance, when I queried final urls for an ad group ad, I received this array of objects:
[ { value: 'https://www.geoteam.be/nl/steden/aalst' } ]
According to the API documentation, I should receive array of strings that looks like this:
['https://www.geoteam.be/nl/steden/aalst' ].

Other information

Another example of the issue:

[ { ad_group:
     { resource_name: 'customers/xxx/adGroups/xxx',
       cpc_bid_micros: 1000000,
       targeting_setting:
        { target_restrictions:
           [ { targetingDimension: 3, bidOnly: { value: true } },
             { targetingDimension: 4, bidOnly: { value: false } },
             { targetingDimension: 5, bidOnly: { value: true } },
             { targetingDimension: 6, bidOnly: { value: true } },
             { targetingDimension: 7, bidOnly: { value: false } },
             { targetingDimension: 8, bidOnly: { value: true } },
             { targetingDimension: 9, bidOnly: { value: true } } ] } } } ]
}

Here the library should return booleans for bidOnly.

@kritzware kritzware added the bug ⚠️ Something isn't working in the library label Jun 18, 2019
@avermeil
Copy link
Member

This is indeed a bug. Fixing it will be an important breaking change, so we'll release a fix for it along with v2 of the google ads API.

avermeil added a commit to Opteo/google-ads-node that referenced this issue Jun 25, 2019
kritzware pushed a commit to Opteo/google-ads-node that referenced this issue Jul 8, 2019
* first attempt at fixing Opteo/google-ads-api#59 (not working yet)

* rewrite of parseNestedEntitiesNoPath and cleanup

* removed stray comments

* clarify test comments

* fix linting error

* chore: tiny stylistic changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug ⚠️ Something isn't working in the library
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants