-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
AnalyticsReporting v4: Difference between real usage and documentation #561
Comments
Also, the .execute(handleReportingResults) method is not defined. Thanks! |
The documentation you're looking at (with the "JavaScript" label on the tab) is for the browser-based JavaScript library. If there were an example for Node.js, then the tab would be labeled "Node.js". That page doesn't have a Node.js example. |
Sorry but I thought that the usage was the same of the browser-based. |
Is there a node example? Documentation is hard to follow for normal developers. A few simple examples would really help. Thanks, |
Please fix. I've spent hours looking for this. |
Simply putting a {resource: YourRequestObj } will do the trick:
|
can someone please link to this on the analytics samples? |
Thanks @derappelt! I literally spent hours just to know that what was missing was the "resource" part of the request. The documentation is hard to follow. |
This might help you out: jwtClient.authorize((err, tokens) => {
}); |
Adding my voice to this. I had to look at the source code in order to find this single line in v4.js of analyticsreporting: This is not well documented. |
I've had this problem and my problem is fixed. Thank you @the0ffh |
Thank you guys, I've been spending two hours on this and finally found the solution thanks to you, especially @derappelt 👍 |
fixes googleapis/synthtool#560 Source-Author: Jeffrey Rennie <rennie@google.com> Source-Date: Fri May 15 14:08:01 2020 -0700 Source-Repo: googleapis/synthtool Source-Sha: 2aa4a1ed43ab867793be8e8044f7e0210fd9dc92 Source-Link: googleapis/synthtool@2aa4a1e
fixes googleapis/synthtool#560 Source-Author: Jeffrey Rennie <rennie@google.com> Source-Date: Fri May 15 14:08:01 2020 -0700 Source-Repo: googleapis/synthtool Source-Sha: 2aa4a1ed43ab867793be8e8044f7e0210fd9dc92 Source-Link: googleapis/synthtool@2aa4a1e
fixes googleapis/synthtool#560 Source-Author: Jeffrey Rennie <rennie@google.com> Source-Date: Fri May 15 14:08:01 2020 -0700 Source-Repo: googleapis/synthtool Source-Sha: 2aa4a1ed43ab867793be8e8044f7e0210fd9dc92 Source-Link: googleapis/synthtool@2aa4a1e
fixes googleapis/synthtool#560 Source-Author: Jeffrey Rennie <rennie@google.com> Source-Date: Fri May 15 14:08:01 2020 -0700 Source-Repo: googleapis/synthtool Source-Sha: 2aa4a1ed43ab867793be8e8044f7e0210fd9dc92 Source-Link: googleapis/synthtool@2aa4a1e
fixes googleapis/synthtool#560 Source-Author: Jeffrey Rennie <rennie@google.com> Source-Date: Fri May 15 14:08:01 2020 -0700 Source-Repo: googleapis/synthtool Source-Sha: 2aa4a1ed43ab867793be8e8044f7e0210fd9dc92 Source-Link: googleapis/synthtool@2aa4a1e
Hi,
I started to use the analyticsreporting module v4 to batch the data.
I write this issue to notify you the difference between real usage and documentation.
Following the sample in your documentation to do a batchGet doesn't work.
When I do the call, I have this response message : "Error: Invalid JSON payload received. Unknown name "reportRequests": Cannot bind query parameter. 'reportRequests' is a message type. Parameters can only be bound to primitive types."
I was investigating and I discover that the object of the request has an empty json property.
I put some
debugger
on v4.js module and I discover that in the batchGet method.there is no reference related to "resource" (At line 82 of apirequest.js) property which is assign to options.json property (At line 164 of apirequest.js).
I have changed the params object of my module without edit v4.js and apirequest.js and it works.
This following snippet shows what I changed.
Does it make sense ? Is there another way to face this issue ?
Any concers let me know.
Thanks!
Have fun coding :)
The text was updated successfully, but these errors were encountered: