Twitter library for TypeScript
yarn add @yarnaimo/twimo
# or
npm i -S @yarnaimo/twimo
import { Twimo, twget, twpost } from '@yarnaimo/twimo'
import { Status } from 'twitter-d'
const twimo = Twimo({
consumerKey: '***',
consumerSecret: '***',
})({
token: '***',
tokenSecret: '***',
})
const response = await twget<Status>(twimo, 'statuses/show', params)
const response = await twpost<ResponseType>(twimo, path, params)
- twget
- lookupTweets
- searchTweets
- getMutedIds
- twpost
- createTweet
- postThread
- retweet
Example
import { lookupTweets } from '@yarnaimo/twimo'
const response = await lookupTweets(twimo, ['123', '456'])
- plusOne
- minusOne
- originalTweet
- getMediaList
- TweetURL
- parse
- fromTweet
- UserPageURL
- parse
- fromUser