- Go 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .github | ||
| examples | ||
| .gitignore | ||
| gen.go | ||
| go.mod | ||
| go.sum | ||
| LICENSE | ||
| oas_cfg_gen.go | ||
| oas_client_gen.go | ||
| oas_json_gen.go | ||
| oas_operations_gen.go | ||
| oas_parameters_gen.go | ||
| oas_request_encoders_gen.go | ||
| oas_response_decoders_gen.go | ||
| oas_schemas_gen.go | ||
| oas_security_gen.go | ||
| oas_validators_gen.go | ||
| ogen.yml | ||
| README.md | ||
| securitysource.go | ||
Go-Lemmy
Go bindings to the Lemmy API, automatically generated from Lemmy's openapi spec using the generator in cmd/gen.
v4 Note
The latest version of this library uses the Lemmy v4 API. That API version hasn't been fully released yet so most Lemmy instances are still using the v3 API. If you want to continue using the v3 API for compatibility with older Lemmy instances, import go.elara.ws/go-lemmy/v3. Otherwise, import go.elara.ws/go-lemmy/v4. Note that these versions purely track the current Lemmy API version, so breaking changes can occur if the OpenAPI spec changes in such a way to cause them.
Examples
Examples can be found in the examples directory.
How to generate
First, clone the lemmy-js-client repo at whatever version you need. For example:
git clone https://github.com/LemmyNet/lemmy-js-client -b 0.18.3
Inside it, build the openapi spec:
pnpm tsoa
Next, leave that directory and run:
go generate .
And that's it! Your generated code should be ready for use.