tags-and-stocks
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

tags-and-stocks

node-version-url top-lang-image snyk-image npm-v-image last-commit-image

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(/* TwitterClient settings */) // for all users
const t = new TagsAndStocks(/* TwitterClient settings */, 'username') // for one user
const t = new TagsAndStocks(/* TwitterClient settings */, ['a', 'b']) // multiple users

t.getTweets()

Get tweets with the specified filters.

await t.getTweets() // get all tweets
await t.getTweets({}, 'some query') // get all tweets with query
await t.getTweets({ include_entities: false }) // get all tweets with extra settings

t.getTweetsByTags()

Get tweets including tags.

await t.getTweetsByTags('single_tag') // get tweets by one tag
await t.getTweetsByTags(['one_tag', 'second_tag']) // get tweets by multiple tags

t.getTweetsByStocks()

Get tweets including stocks ("cashtags")

await t.getTweetsByStocks('BTC') // get tweets by stock
await t.getTweetsByStocks(['BTC', 'ETH']) // get tweets by stocks

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(
  {
    /* TwitterClient settings go here */
  },
  'username' // the user's handle
)

await t.getTweets()

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.4
    1
    • latest

Version History

Package Sidebar

Install

npm i tags-and-stocks

Weekly Downloads

1

Version

0.0.4

License

MIT

Unpacked Size

7.43 kB

Total Files

6

Last publish

Collaborators

  • dropthebeatbro