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 |