1.3.0 • Published 2 years ago

ujournal-lemmy-js-client v1.3.0

Weekly downloads
-
License
AGPL-3.0
Repository
github
Last release
2 years ago

GitHub tag (latest SemVer) GitHub issues License GitHub stars

lemmy-js-client

A javascript / typescript http and websocket client and type system for Lemmy.

Installation

yarn add lemmy-js-client

Usage

Websocket Client

LemmyWebsocket docs

import { Login, LemmyWebsocket } from 'lemmy-js-client';

let client: LemmyWebsocket = new LemmyWebsocket();

let form: Login {
  username_or_email: "my_email@email.tld",
  password: "my_pass",
};

this.ws.send(client.login(form));

HTTP Client

LemmyHttp docs

import { LemmyHttp } from 'lemmy-js-client';

let baseUrl = 'https://lemmy.ml';
let client: LemmyHttp = new LemmyHttp(baseUrl, headers?);
let jwt = await client.httpLogin(loginForm).jwt;
1.3.0

2 years ago

1.2.0

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago

0.17.0-rc.43

2 years ago