
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
mastodonclient
Advanced tools
Minimal Mastodon client for my purposes. Does the OAuth dance and allows toots to be posted, home timeline to be fetched or generic API call to be made
npm install --save mastodonclient
One time only, you need to do the OAuth dance. This is an interactive process where you'll need to enter your Mastodon hostname, visit a URL and enter the code displayed at that URL back into the command line prompt.
import * as mastonclient from 'mastodonclient'
const config = await mastonclient.auth()
console.log(config)
The config is a JS object that contains all the details required to authenticate you to make Mastodon API calls. Stash this away in a file somewhere.
If we have a config object we can instantiate the MastodonClient itself:
const mc = new mastonclient.MastodonClient(config)
This can be used to post toots:
// message, visibility, content warning
await mc.post('Who\'s there?', 'public', 'Knock knock')
fetch your timeline:
const timeline = await mc.home()
or do any other request:
const result = await mc.request({
method: 'get',
url: '/api/v1/timelines/home',
params: {
limit: 5
}
})
See the Mastodon API reference.
FAQs
Simple Mastodon client
The npm package mastodonclient receives a total of 3 weekly downloads. As such, mastodonclient popularity was classified as not popular.
We found that mastodonclient demonstrated a healthy version release cadence and project activity because the last version was released less than 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.