google-api-typings-generator
google-api-typings-generator copied to clipboard
Allow to use resource/body object directly
Instead of this:
await gapi.client.analyticsreporting.reports.batchGet({
resource: {
reportRequests: [/*...*/],
},
});
we want to use this:
await gapi.client.analyticsreporting.reports.batchGet({
reportRequests: [/*...*/],
});
First, we need to investigate if this is consistent across different APIs.
For example, body
approach worked for Sheets API, but not for Analytics Reporting API.
Not sure why directly specifying reportRequests
for Analytics Reporting API doesn't work for you, because it works perfectly fine for me.
You're right, direct approach also works fine for me. It's just that our current types definition does not support this direct approach. So, this issue was created so that type definitions will be changed to allow this (totally valid and working) direct approach.