Socket
Socket
Sign inDemoInstall

tags-and-stocks

Package Overview
Dependencies
6
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    tags-and-stocks

Get tweets filtered by #tags and $stocks


Version published
Weekly downloads
5
Maintainers
1
Install size
823 kB
Created
Weekly downloads
 

Readme

Source

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()

Keywords

FAQs

Last updated on 05 Jan 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc