![]() ![]() Dedicated methods that wraps API v1.1 & v2 endpoints, with typed arguments and fully typed responses.Media upload with API v1.1, including long video & subtitles support, automatic media type detection,Ĭhunked upload and support for concurrent uploads.Convenient methods for authentication - generate auth links and ask for tokens to your users.Automatic paginator for endpoints like user and tweet timelines,Īllowing payload consumption with modern asynchronous iterators until your rate-limit is hit.High-class support for stream endpoints, with easy data consumption and auto-reconnect on stream errors.That handle query string parse & format, automatic body formatting and more Helpers for numerous HTTP request methods ( GET, POST, PUT, DELETE and PATCH),.Make signed HTTP requests to Twitter with every auth type: OAuth 1.0a, OAuth2 (even brand new user context OAuth2!) and Basic HTTP Authorization.Here's everything twitter-api-v2 can do: Basics: ![]() Using descriptive typings for read/write/DMs rights, request parameters and response payload.Ī small feature comparison with other libs: Package Twitter-api-v2 is meant to provide full endpoint wrapping, from method name to response data, Provide wrappers around HTTP methods, and some of them are bloated with many dependencies. Sometimes, you just want to quickly bootstrap an application using the Twitter API.Įven though there are a lot of libraries available on the JavaScript ecosystem, they usually just uploadMedia ( './big-buck-bunny.mp4' ) Why? tweet ( 'Hello, this is a test.' ) // You can upload media easily! await twitterClient. userByUsername ( 'plhery' ) await twitterClient. readOnly // Play with the built in methods const user = await readOnl圜lient. Import from 'twitter-api-v2' // Instantiate with desired auth type (here's Bearer v2 auth) const twitterClient = new TwitterApi ( '' ) // Tell typescript it's a readonly app const readOnl圜lient = twitterClient. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |