-
-
Notifications
You must be signed in to change notification settings - Fork 45
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
Aiogoogle doesn't support the beta Drive Labels API #107
Comments
Update I think it’s causing an error because Google uses a different root URL for the Drive Labels API ( Check it out, Aiogoogle actually fetches the discovery document for the Labels API:
Response:
But in the error msg above, it's trying to hit an endpoint with the standard root URL: Hopefully this can help touch on a potential fix? |
Hey, thanks for raising the issue. The simplest solution would be to manually download the API schema/discovery document and feed it to your Aiogoogle instance e.g. from aiogoogle import GoogleAPI, Aiogoogle
def get_api():
drivelabels_discovery_doc = await http.get("https://drivelabels.googleapis.com/$discovery/rest?version=v2") # any http lib will do
return GoogleAPI(drivelabels_discovery_doc) I'll also be happy to accept a PR that resolves #94. This is how the URL should be formatted for V2: https://github.com/googleapis/google-api-python-client/blob/main/googleapiclient/discovery.py#L90
Also, maybe if user doesn't pass a kwarg and V1 fetch fails to find results, maybe we can retry in V2 automatically and if that also fails, then raise an error? |
This also relates to this #65 |
PR #108 fixes this issue, so I'm closing it out; thanks so much for the help and suggestions @omarryhan 🙏🏿 |
Thank you! For the PR and for contributing this feature!! :) |
Hello, thanks for the great tool 🙂
I've run into an issue when trying to create an API client for the Google Drive Labels API
Request
Response
I see it's in the giant JSON Google Discovery API list (grep for
drivelabels:v2
)I did notice the endpoint I'm trying to use (
create
) in the Drive Labels API is marked as beta,and in the JSON doc I linked above, the base URL is
https://drivelabels.googleapis.com/
instead ofhttps://www.googleapis.com/API/VERSION
I was wondering what the technical cause is for the error above?
Also, I saw a feature request for adding the option to provide custom discovery urls which looks promising (#94), would that be a work around for this issue?
Thanks!
The text was updated successfully, but these errors were encountered: