-
-
Notifications
You must be signed in to change notification settings - Fork 4.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
Tweepy API verify_credentials() unclearly returns a V1 API User #1588
Comments
It should be clear from the documentation that
It should also be clear from the Models Reference, which models are for which API version. However, you are correct that the documentation for
The v1.1 API
Both |
Hi, was trying to lightly suggest a few possible ideas to increase clarity. I don't think you need to change your package structure, but I do think it would be very helpful to add some more color in the documentation? Things that appear obvious to people who have been using this package and grown with it aren't going to be obvious to someone setting up a fresh integration. Either way, thanks for your work! |
Hi,
Overall your SDK is really straightforward, but I found myself running into documentation issues and wanted to share.
TL;DR
tweepy.API returns a V1 API, whereas tweepy.Client returns an incomplete V2 API, which is not immediately clear in the documentation
If you run API.verify_credentials, you do in fact get a "User" object as described in the docstrings, however, this model that you receive is not the obvious User import at tweepy.user.py (a V2 implementation) -- it's actually this one (a V1 implementation). This is an issue for fields such as username, which was FKA screen_name
I don't think it would continue to be an issue if either
a) it was well documented
b) the models didn't share the same name
c) v1 vs v2 endpoints didn't share the same subpackage.
Thanks :)
The text was updated successfully, but these errors were encountered: