Skip to content

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

License

Notifications You must be signed in to change notification settings

L3v3L/lemmy-js-client

This branch is 336 commits behind LemmyNet/lemmy-js-client:main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

0c1483f · Jul 12, 2023
May 15, 2023
Jul 19, 2021
Jul 12, 2023
May 11, 2023
Aug 23, 2021
Dec 19, 2022
May 10, 2023
Aug 19, 2020
Jun 21, 2023
Jun 6, 2023
Jan 20, 2021
Jul 12, 2023
Jun 6, 2023
Jun 5, 2023
May 10, 2023

Repository files navigation

GitHub tag (latest SemVer) GitHub issues License GitHub stars

lemmy-js-client

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

Installation

yarn add lemmy-js-client

Usage

HTTP Client

LemmyHttp docs

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;

Development

You can use yalc to develop and test changes locally:

yarn global add yalc

# Go to lemmy-js-client dir
yalc publish --push

# Go to your client dir
yalc add lemmy-js-client

# To do updates, go back to the lemmy-js-client dir
# This also updates it, in every dir you've added it.
yalc publish --push

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 98.7%
  • Other 1.3%