Go bindings to the Lemmy API, automatically generated from Lemmy's source code using the generator in cmd/gen.
Examples can be found in the examples directory.
First, update the lemmy-js-client submodule :
git submodule update --initFor generating from another version, simply check out another version in the submodule folder.
Inside it, build the JSON docs file:
pnpm install
pnpm run docs --json ../docs.jsonBack in the root folder, remove all the existing generated code:
find . -type f -name '*.gen.go' -print -deleteExecute the generator:
go run cmd/gen/main.go -json-file docs.json -out-dir .And that's it! Your generated code should be ready for use.