tags-and-stocks
Get tweets filtered by #tags and $stocks.
Install
pnpm i tags-and-stocks
API
import { TagsAndStocks } from 'tags-and-stocks'
new TagsAndStocks(settings, user)
Create new interface of tags-and-stocks
:
const t = new TagsAndStocks()
const t = new TagsAndStocks(, 'username')
const t = new TagsAndStocks(, ['a', 'b'])
Get tweets with the specified filters.
await t.getTweets()
await t.getTweets({}, 'some query')
await t.getTweets({ include_entities: false })
Get tweets including tags.
await t.getTweetsByTags('single_tag')
await t.getTweetsByTags(['one_tag', 'second_tag'])
Get tweets including stocks ("cashtags")
await t.getTweetsByStocks('BTC')
await t.getTweetsByStocks(['BTC', 'ETH'])
Usage
Settings are inherited from Settings for twitter-api-client's TwitterClient
.
import * as dotenv from '@tinyhttp/dotenv'
import { TagsAndStocks } from 'tags-and-stocks'
dotenv.config()
const t = new TagsAndStocks(
{
},
'username'
)
await t.getTweets()