Core Features of twitter-api-v2
masterThe library provides several key capabilities for interacting with the Twitter API:
API Support & Auth
- Support for v1.1 and v2 APIs.
- Authentication support for OAuth 1.0a, OAuth2 (including user-context OAuth2), and Basic HTTP Authorization.
Request & Data Handling
- Typed Wrappers: Dedicated methods for endpoints with typed arguments and fully typed responses (including tweets, users, and media entities).
- Pagination: Automatic paginators for timelines (user/tweet) that support modern asynchronous iterators.
- Streaming: High-class support for stream endpoints with easy data consumption and auto-reconnect.
- HTTP Helpers: Helpers for
GET,POST,PUT,DELETE, andPATCHthat handle query string formatting and automatic body formatting.
Media & Errors
- Media Uploads: API v1.1 helpers supporting long video, subtitles, automatic type detection, chunked uploads, and concurrent uploads.
- Error Handling: Typed errors with meaningful messages and error enumerations for both v1.1 and v2.