# @lagunehq/core

> Mastodon API client for browser and Node.js

Latest version **1.5.0** (published 2019-02-18) · AGPL-3.0 license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @lagunehq/core
pnpm add @lagunehq/core
yarn add @lagunehq/core
bun add @lagunehq/core
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.5.0 |
| Published | 2019-02-18 |
| First published | 2018-04-13 |
| Weekly downloads | 0 |
| License | AGPL-3.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 181.8 KB |
| Known vulnerabilities | 0 (+24 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 784 |
| Author | neetshin |
| Maintainers | neetshin |
| Keywords | mastodon |

## Links

- npm: https://www.npmjs.com/package/@lagunehq/core
- Repository: https://github.com/lagunehq/core
- Homepage: https://github.com/lagunehq/core#readme
- Issues: https://github.com/lagunehq/core/issues
- npm.io page: https://npm.io/package/@lagunehq/core

## Dependencies (4)

- [axios](https://npm.io/package/axios.md) ^0.18.0
- [websocket](https://npm.io/package/websocket.md) ^1.0.28
- [eventemitter3](https://npm.io/package/eventemitter3.md) ^3.1.0
- [http-link-header](https://npm.io/package/http-link-header.md) ^1.0.0

## Recent versions

- 1.5.0 (latest) — 2019-02-18
- 1.3.8-rc1 (beta) — 2018-10-29
- 1.4.0 — 2019-01-21
- 1.3.10 — 2018-11-17
- 1.3.9 — 2018-11-13
- 1.3.8 — 2018-11-07
- 1.3.7 — 2018-10-24
- 1.3.7-rc6 — 2018-10-24
- 1.3.7-rc5 — 2018-10-24
- 1.3.7-rc4 — 2018-10-23
- 1.3.7-rc3 — 2018-10-23
- 1.3.7-rc2 — 2018-10-23
- 1.3.7-rc1 — 2018-10-23
- 1.3.6 — 2018-09-09
- 1.3.5 — 2018-09-09
- … 16 more at https://npm.io/package/@lagunehq/core/versions

## README

# @lagunehq/core
[![npm](https://img.shields.io/npm/v/@lagunehq/core.svg)](https://www.npmjs.com/package/@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
```

<a href='https://www.patreon.com/neetshin'><img src='https://c5.patreon.com/external/logo/become_a_patron_button.png' alt='Become a patron' width='140px' /></a>

## Using the API
Here's a simple example which creates a new status:
```ts
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](https://lagunehq.gitbook.io/core/_client_mastodon_/_client_mastodon_.mastodon)

## Maintainers

<table>
  <tbody>
    <tr>
      <td align="center">
        <a href="https://github.com/neet">
          <img width="120" height="120" src="https://github.com/neet.png?size=120">
          </br>
          Neetshin
        </a>
      </td>
    </tr>
  <tbody>
</table>

## License
AGPLv3

---
_Source: https://npm.io/package/@lagunehq/core · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
