@lagunehq/core

Mastodon API client for browser and Node.js

Stats

StarsIssuesVersionUpdatedCreatedSize
@lagunehq/core
5641.5.03 years ago3 years agoMinified + gzip package size for @lagunehq/core in KB

Readme

@lagunehq/core

npm

Most powerful Mastodon API client for TypeScript/JavaScript/Node.js/Browser

What is the deference between other Mastodon packages?

  • Compatible with both of browser and Node.js
  • Each API has each function, you don't need to type annoying API URLs
  • Static typing with TypeScript
  • Georgeous hovering menu provided by TSDoc
  • Iterable timeline

Installation

npm i @lagunehq/core --save

Become a patron

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

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.