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

Support for Twitter API v2 #1472

Closed
70 tasks done
Harmon758 opened this issue Dec 18, 2020 · 41 comments
Closed
70 tasks done

Support for Twitter API v2 #1472

Harmon758 opened this issue Dec 18, 2020 · 41 comments
Labels
API This is regarding Twitter's API Feature This is regarding a new feature Task This is a task related to the library
Milestone

Comments

@Harmon758
Copy link
Member

Harmon758 commented Dec 18, 2020

Now that the new Twitter API has been launched, support for it needs to be added in Tweepy.
This is planned to be part of v4.0.

v3.10 will be released first, as the last version to support Python 2.7 (and probably Python 3.5).
My goal is to get v3.10 out before the end of the year and then work on dropping support for Python 2.

v3.10 has been released now, and support for Python 2.7 and 3.5 has been dropped.
Afterwards, This will be the next priority, along with support for asyncio.

Initial support for Twitter API v2 has been added with Tweepy v4.0.
Support for additional endpoints and features have been added with Tweepy v4.1, v4.2, v4.3, v4.4, v4.5, and v4.6.

Support for new endpoints and features will be tracked in new individual issues.

Endpoints to support

Tweets

Filtered stream
Hide replies
Likes (lookup + manage)
Manage Tweets
Retweets
Search Tweets (full-archive + recent)
Timelines
Tweet counts
Tweet lookup
Volume streams

Users

Blocks (lookup + manage)
Follows (lookup + manage)
Mutes (lookup + manage)
User lookup

Spaces

Search Spaces
Spaces lookup (buyers, Tweets)

Lists (lookup + manage)

List Tweets lookup
List follows
List lookup
List members
Manage Lists
Pinned Lists

Compliance

Batch Compliance

Addendum

Support for Labs (https://developer.twitter.com/en/products/labs)
COVID-19 stream (#1790)
Additional Resources

https://developer.twitter.com/en/docs/twitter-api/early-access
https://developer.twitter.com/en/docs/twitter-api/migrate
https://developer.twitter.com/en/products/twitter-api/early-access/guide
https://blog.twitter.com/developer/en_us/topics/tools/2020/introducing_new_twitter_api.html
https://twittercommunity.com/t/announcing-early-access-to-the-next-generation-of-the-twitter-api/139612

https://twittercommunity.com/t/blocks-and-likes-endpoints-are-now-complete-on-the-twitter-api-v2/154434

https://blog.twitter.com/developer/en_us/topics/tools/2021/shape-the-future-of-twitter-spaces

https://twittercommunity.com/t/announcing-oauth-2-0-beta/159189

Old Postscript

I'd like to apologize for the delay in responding to @andypiper and others about this in #1345, #1396, and #1423, as well as on Discord. I've (I think understandably) fallen behind a bit this year in my plans for Tweepy and in keeping up with issues and Discord messages, but I'm working on catching back up.

@Harmon758 Harmon758 added Feature This is regarding a new feature Task This is a task related to the library API This is regarding Twitter's API labels Dec 18, 2020
@Harmon758 Harmon758 added this to the 4.0 milestone Dec 18, 2020
@Harmon758 Harmon758 pinned this issue Dec 18, 2020
@Harmon758
Copy link
Member Author

I've created an initial implementation in an api-v2 branch and PR #1535.

@azharmunir43
Copy link

hey @Harmon758 thanks for this, can we get some idea about when is it going to be released? Thanks

@Harmon758
Copy link
Member Author

Most of the endpoints should now be part of the api-v2 branch / PR #1535.
Once that PR is ready, I'll take it out of its draft state and leave it open for a few weeks for people to test and review.
Afterwards, it'll be merged into the master branch.
As for v4.0 itself, there's other features (https://github.com/tweepy/tweepy/milestone/11) that I want to include in it before it's released.

@Harmon758
Copy link
Member Author

The api-v2 branch / pull request #1535 should be complete now.
Any feedback or review would be appreciated.

@laurarosenberg

This comment has been minimized.

@Harmon758

This comment has been minimized.

@Harmon758
Copy link
Member Author

The api-v2 branch / pull request #1535 has been merged into the master branch.

@Harmon758
Copy link
Member Author

Client.like and Client.unlike have been added with 5beaa24.

@Harmon758
Copy link
Member Author

Client.block and Client.unblock have been added with 18e0b1a.

@Bowrna

This comment has been minimized.

@Harmon758

This comment has been minimized.

@Harmon758
Copy link
Member Author

Client.get_liking_users, Client.get_liked_tweets, and Client.get_blocked have been added with a32e6ce.

@Harmon758
Copy link
Member Author

Client.get_all_tweets_count and Client.get_recent_tweets_count have been added with 49156cb.

@Harmon758
Copy link
Member Author

Client.unmute and Client.mute have been added with b20b236.

@Harmon758
Copy link
Member Author

Client.unretweet, Client.get_retweeters, and Client.retweet have been added with b4985e0.

@Harmon758
Copy link
Member Author

Client.delete_list, Client.remove_list_member, Client.unfollow_list, Client.unpin_list, Client.update_list Client.create_list, Client.add_list_member, Client.follow_list, and Client.pin_list have been added with b1342bf.

@Harmon758
Copy link
Member Author

v4.2.0 (#1694) has now been released with support for managing lists and the state parameter change for Spaces search 🎉

@Harmon758
Copy link
Member Author

Client.delete_tweet and Client.create_tweet have been added with 7884e3a.

@Harmon758
Copy link
Member Author

v4.3.0 (#1701) has been released with support for the Twitter API v2 manage Tweets endpoints launched today 🎉

@goyal-aman

This comment has been minimized.

@Harmon758

This comment has been minimized.

@Harmon758
Copy link
Member Author

A List model, Client.get_list_tweets, Client.get_list_followers, Client.get_followed_lists, Client.get_list, Client.get_owned_lists, Client.get_list_members, Client.get_list_memberships, and Client.get_pinned_lists have been added with 0aa2366.

@Harmon758
Copy link
Member Author

Client.get_space_buyers has been added with 8bf58ca.

@Harmon758
Copy link
Member Author

Space.ended_at and Space.topic_ids have been added with c89a233.

@Harmon758
Copy link
Member Author

Harmon758 commented Nov 17, 2021

v4.4.0 (#1705) has been released with support for the new List lookup and Space endpoints, as well as the new Space object fields 🎉

@Harmon758
Copy link
Member Author

Oauth2Handler has been added with 2b83507, and Client.get_me has been added with c49cbdf and 62b5b58.

@Harmon758
Copy link
Member Author

v4.5.0 (#1786) has been released with support for OAuth 2.0 Authorization Code Flow with PKCE and the new authenticated user lookup endpoint 🎉

@Harmon758
Copy link
Member Author

Support for the new max_results and pagination_token parameters for Client.get_retweeters and Client.get_liking_users has been added with 3479e56 and bdd6b55, respectively.

@Harmon758
Copy link
Member Author

Support for the new sort_order parameter for Client.search_all_tweets and Client.search_recent_tweets has been added with bd202e5 and 8b47170, respectively.

@Harmon758
Copy link
Member Author

Client.get_space_tweets has been added with c8d5d9a.

@Harmon758
Copy link
Member Author

Support for streaming, with StreamingClient, StreamResponse, and StreamRule, has been added with 86244c1.

@Harmon758
Copy link
Member Author

Space.subscriber_count has been added with 1ffc8cd.

@Harmon758
Copy link
Member Author

v4.6.0 (#1824) has been released with support for streaming, the new Retweets lookup and Likes lookup endpoint parameters, the new sort_order parameter for search endpoints, and the new Tweets shared in a Space endpoint and RSVP count field for Spaces 🎉

With this release, Tweepy now fully supports all of Twitter API v2, almost exactly a year after the initial implementation for Twitter API v2 support was pushed. New individual issues will be created for any future new Twitter API v2 endpoints and features.

(The COVID-19 stream is the only remaining active portion of Labs and support for it is being tracked in #1790.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API This is regarding Twitter's API Feature This is regarding a new feature Task This is a task related to the library
Projects
None yet
Development

No branches or pull requests

5 participants