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 Twitter API v2 #1535

Merged
merged 27 commits into from
Apr 27, 2021
Merged

Support Twitter API v2 #1535

merged 27 commits into from
Apr 27, 2021

Conversation

Harmon758
Copy link
Member

@Harmon758 Harmon758 commented Feb 23, 2021

This pull request adds support for Twitter API v2, resolving parts of #1472, with a Client class and its methods:

New API v2 models have been added:

  • Media
  • Place
  • Poll
  • ReferencedTweet
  • Tweet
  • User

replacing API v1.1 models (which can still be accessed through tweepy.models) in the package namespace.

A Paginator has also been added for use with Client methods.

This PR also includes documentation and tests for Client, as well as documentation for Paginator and the new models.

Currently, this is in a very preliminary rough draft state, and many parts of this initial implementation might change before this pull request is complete. I wanted to get this branch and draft pull request out as soon as possible, as there have been requests to do so (e.g. by @sparack and others) and so that anyone can test Twitter API v2 and provide feedback on Tweepy's interface for it.

Note, there is still planned functionality missing in this initial implementation, such as error and rate limit handling, a pagination interface, and methods for the newest manage follows endpoints.
Documentation and tests also have not been added yet.
I'm also still considering how to expose tweepy.user.User, so as not to conflict with the API v1.1 User object/model.

@Harmon758 Harmon758 added Feature This is regarding a new feature API This is regarding Twitter's API labels Feb 23, 2021
@Harmon758 Harmon758 added this to the 4.0 milestone Feb 23, 2021
@Harmon758 Harmon758 self-assigned this Feb 23, 2021
@Harmon758 Harmon758 changed the title Support for Twitter API v2 Support Twitter API v2 Feb 23, 2021
@Harmon758 Harmon758 mentioned this pull request Feb 23, 2021
70 tasks
@edsu edsu mentioned this pull request Feb 27, 2021
@sarim-zafar

This comment has been minimized.

@Harmon758 Harmon758 mentioned this pull request Mar 19, 2021
@azharmunir43

This comment has been minimized.

@Harmon758

This comment has been minimized.

@Harmon758 Harmon758 added Documentation This is regarding the library's documentation Tests This is regarding the library's tests labels Apr 13, 2021
@Harmon758 Harmon758 marked this pull request as ready for review April 13, 2021 04:28
@Harmon758
Copy link
Member Author

This branch/pull request should be complete now.
I plan on adding methods for the new Follows and Blocks endpoints (see #1472) after this has been merged.
Streaming will probably be a separate PR.

Any feedback and/or review from @sparack or anyone else would be appreciated.

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 Documentation This is regarding the library's documentation Feature This is regarding a new feature Tests This is regarding the library's tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants