Skip to content
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

Consider moving the nested resources #33

Open
henribru opened this issue Dec 22, 2022 · 0 comments
Open

Consider moving the nested resources #33

henribru opened this issue Dec 22, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@henribru
Copy link
Owner

Currently nested resources are defined as nested classes. This is kinda convenient because it means you only need to import the base resource, e.g. you can do from googleapiclient._apis.analytics.v3.resources import AnalyticsResource and then you can get the nested management resource as AnalyticsResource.ManagementResource. It also mirrors how you get that nested resource in your code, i.e. management_resource = analytics_resource.management(). The main issue with this is that it ends up polluting the autocomplete on the resources. For an example, notice how both management and ManagementResource show up here:

image

The question is if it could it be worth restructuring this in some way to avoid this issue

@henribru henribru added the enhancement New feature or request label May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant