Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Node.js client for Twitter API
npm i bmw-tac
import { TwitterClient } from 'bmw-tac';
const twitterClient = new TwitterClient({
apiKey: '<YOUR-TWITTER-API-KEY>',
apiSecret: '<YOUR-TWITTER-API-SECRET>',
accessToken: '<YOUR-TWITTER-ACCESS-TOKEN>',
accessTokenSecret: '<YOUR-TWITTER-ACCESS-TOKEN-SECRET>',
});
// Search for a user
const data = await twitterClient.accountsAndUsers.usersSearch({ q: 'twitterDev' });
// Get message event by Id
const data = await twitterClient.directMessages.eventsShow({ id: '1234' });
// Get most recent 25 retweets of a tweet
const data = await twitterClient.tweets.statusesRetweetsById({ id: '12345', count: 25 });
// Get local trends
const data = await twitterClient.trends.trendsAvailable();
See all available methods here.
twitter-api-client
comes with an inbuilt in-memory cache.
The stale data is served by the cache-first principle.
You can configure the caching behavior upon instantiation of the client:
const twitterClient = new TwitterClient({
apiKey: '<YOUR-TWITTER-API-KEY>',
apiSecret: '<YOUR-TWITTER-API-SECRET>',
accessToken: '<YOUR-TWITTER-ACCESS-TOKEN>',
accessTokenSecret: '<YOUR-TWITTER-ACCESS-TOKEN-SECRET>',
ttl: 120, // seconds. Defaults to 360
disableCache: true, // Disables the caching behavior. Defaults to 'false'
maxByteSize: 32000000, // Maximum (approximated) memory size for cache store. Defaults to 16000000.
});
FAQs
Twitter client
We found that bmw-tac demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.