No Description

Elara Musayelyan 5a7463d006 Add some comments and separate stuff into different files 1 week ago
cmd 0d50afac8e Handle lack of parameters 1 week ago
examples 329bf27ffd Remove websocket example because the websocket has been removed from lemmy 3 months ago
types 5a7463d006 Add some comments and separate stuff into different files 1 week ago
.gitignore 058b3879ae Update for 0.18.0 3 months ago
LICENSE c19befd1f5 Add GPLv3 license 9 months ago
README.md 44dbe8c934 Rewrite generator and update for Lemmy 0.18.3 1 week ago
go.mod 44dbe8c934 Rewrite generator and update for Lemmy 0.18.3 1 week ago
go.sum 44dbe8c934 Rewrite generator and update for Lemmy 0.18.3 1 week ago
lemmy.go 5a7463d006 Add some comments and separate stuff into different files 1 week ago
routes.gen.go 44dbe8c934 Rewrite generator and update for Lemmy 0.18.3 1 week ago

README.md

Go-Lemmy

Go Reference

Go bindings to the Lemmy API, automatically generated from Lemmy's source code using the generator in cmd/gen.

Examples:

How to generate

First, clone the lemmy-js-client repo at whatever version you need:

git clone https://github.com/LemmyNet/lemmy-js-client -b 0.18.3

Inside it, build the JSON docs file:

npm run docs -- --json docs.json

Next, build the generator:

go build ./cmd/gen

Remove all the existing generated code:

rm **/*.gen.go

Execute the generator:

./gen -json-file <path_to_docs.json> -out-dir .

And that's it! Your generated code should be ready for use.