import TwitterSearch from "@anthony16t/twitter-search"
Initialize the module (class) by creating a new TwitterSearch object and passing the bearer token.
const bearerToken = "your-bearer-token-from-twitter-api"
const twitterSearch = new TwitterSearch(bearerToken)
Inside a async function or if using top level await, you will have to await any function inside TwitterSearch.
All functions return false or api data, alway check to see if returned value is not false.
const jackInfo = await twitterSearch.user("jack")
if(jackInfo){
console.log(jackInfo)
}
const jackInfo = await twitterSearch.user("jack")
const tweets = await tweeterSearch.tweets('12',2)
const followersList = await tweeterSearch.followersList('12',2)
const followingsList = await tweeterSearch.followingsList('12',2)
const search = await tweeterSearch.search('$TSLA',2)
if(jackInfo){
console.log(jackInfo)
}
------- MODULE NOT FINISHED YET -------