google_customsearch1 and google_customsearch1-cli are currently broken due to some expectation for API keys despite using OAuth
EatonWu opened this issue · 0 comments
For the customsearch1-cli issue, I've narrowed it down to the fact that in google-apis-rs/gen/customsearch1/src/api.rs, Engine::new() always calls _doit with the dry_run variable set to true.
Within the _doit function, there is a conditional that only returns Ok with the query result if dry_run is false.
I noticed that that this function returning Ok results in unreachable code, so the CLI will simply never return Ok, and never return a result.
Within customsearch1/lib.rs itself, I was under the impression that the only authorisation required was an OAuth access token, obtainable via the Google Cloud Console (https://console.cloud.google.com) and downloaded as a JSON, setting scopes, and then sending the request via an HTTPS Authorisation Request Header:
However, calling CseListCall's doit() function results in a delegate api_key() call, and consequently a MissingAPIKey Error.
Am I doing this wrong?
Thanks for the help.