A javascript / typescript http client and type system for Lemmy.
pnpm install lemmy-js-client
import { LemmyHttp, Login } from 'lemmy-js-client';
let baseUrl = 'https://lemmy.ml';
let client: LemmyHttp = new LemmyHttp(baseUrl, headers?);
let loginForm: Login = {
username_or_email: "my_name",
password: "my_pass",
};
let jwt = await client.login(loginForm).jwt;
Use pnpm add
to develop and test changes locally:
pnpm add path/to/lemmy-js-client