You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The V1 requests include the raw JSON response, which I like to save as backup data. Would it be possible to have it included in the V2 responses as well? E.g., search_all_tweets?
The text was updated successfully, but these errors were encountered:
Note, setting return_type to dict for Client or AsyncClient will have their methods return the raw JSON as a dictionary.
I'm assuming that this is a feature request to include the raw JSON data in Response though, as that would allow Tweepy models to be used, while still having the raw JSON data available to save as backup data.
I'm considering changing Response based on this and other use cases, like #1984.
It would almost certainly be a breaking change though, so it would have to wait until a v5 release.
For now, as a workaround, with #1997, which resulted from a conversation about this in the Tweepy Discord server, you can use a requests.Response or dictreturn_type to access the JSON, headers, etc. before passing the JSON as a dictionary to Client._construct_response or AsyncClient._construct_response. Note, you'll also need to pass the data_type for any objects in data if you want them to be Tweepy models.
The V1 requests include the raw JSON response, which I like to save as backup data. Would it be possible to have it included in the V2 responses as well? E.g.,
search_all_tweets
?The text was updated successfully, but these errors were encountered: