@lagunehq/core
Most powerful Mastodon API client for TypeScript/JavaScript/Node.js/Browser
What is the deference between other Mastodon packages?
- [x] Compatible with both of browser and Node.js
- [x] Each API has each function, you don't need to type annoying API URLs
- [x] Static typing with TypeScript
- [x] Georgeous hovering menu provided by TSDoc
- [x] Iterable timeline
Installation
npm i @lagunehq/core --save
Using the API
Here's a simple example which creates a new status:
import Mastodon from '@lagunehq/core';
const client = new Mastodon({
url: 'https://mastodon.social',
streamingUrl: 'wss://mastodon.social',
token: 'my token', // Optional
});
client.createStatus('Toot from TypeScript').then((newStatus) => {
console.log(newStatus);
});
All of available methods/interfaces are described in the documentation
Maintainers
Neetshin |
License
AGPLv3