omarryhan/aiogoogle

[FEATURE] Add option to provide custom discovery url

Ced-Sharp opened this issue · 1 comments

I had to use an API which is not part of googleapis.com which means the discovery part would always fail.

when using aiogoogle.discover('content', 'v1') it would default to google's shopping content api, which is not what I was targeting.

Since the sole purpose of .discover() is to download the discovery doc from a guessed url, I believe adding an optional parameter discoveryDocumentUrl (like the original google api) would benefit those cases like mine where a custom discovery url is need.

Right now, what I had to do was bypass .discover() and instantiate GoogleAPI manually, which I don't believe to be the best approach considering the api.