npm.io
1.5.0 • Published 7 years ago

@lagunehq/core

Licence
AGPL-3.0
Version
1.5.0
Deps
4
Size
182 kB
Vulns
24
Weekly
0
Stars
784
DeprecatedThis package is deprecated

@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

Keywords