-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
API: separate querysets from API V2 and V3 #11586
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually like this implementation a lot, since it makes API v3 the same across our sites, which feels like a huge simplification 💯
Agreed! 👍🏼 |
readthedocs/builds/querysets.py
Outdated
def api_v2(self, *args, **kwargs): | ||
return self.api(*args, **kwargs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be good to have a comment on these methods that explains the differences between .api
and .api_v2
. Even reading the current context from the issues, it's still hard to have everything in mind.
This allows us to override just the v2 querysets on .com, since we want to share the same logic as .org for v3.
ref readthedocs/ext-theme#154