Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Elara6331/go-lemmy
Automatically generated Go API bindings for Lemmy
https://github.com/Elara6331/go-lemmy
api-bindings go lemmy lemmy-api lemmy-client
Last synced: 2 months ago
JSON representation
Automatically generated Go API bindings for Lemmy
- Host: GitHub
- URL: https://github.com/Elara6331/go-lemmy
- Owner: Elara6331
- License: gpl-3.0
- Created: 2022-12-10T17:19:14.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-12-16T00:08:18.000Z (about 1 year ago)
- Last Synced: 2024-06-22T14:42:29.971Z (7 months ago)
- Topics: api-bindings, go, lemmy, lemmy-api, lemmy-client
- Language: Go
- Homepage: https://go.elara.ws/go-lemmy
- Size: 298 KB
- Stars: 34
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
- awesome-lemmy - go-lemmy - lemmy) ![GitHub commit activity](https://img.shields.io/github/commit-activity/y/Elara6331/go-lemmy) (Projects / Libraries)
README
# Go-Lemmy
[![Go Reference](https://pkg.go.dev/badge/go.arsenm.dev/go-lemmy.svg)](https://pkg.go.dev/go.elara.ws/go-lemmy)
Go bindings to the [Lemmy](https://join-lemmy.org) API, automatically generated from Lemmy's source code using the generator in [cmd/gen](cmd/gen).
### Examples
Examples can be found in the [examples](examples) directory.
### How to generate
First, clone the [lemmy-js-client](https://github.com/LemmyNet/lemmy-js-client) repo at whatever version you need:
```bash
git clone https://github.com/LemmyNet/lemmy-js-client -b 0.18.3
```Inside it, build the JSON docs file:
```bash
npm run docs -- --json docs.json
```Next, build the generator:
```bash
go build ./cmd/gen
```Remove all the existing generated code:
```bash
rm **/*.gen.go
```Execute the generator:
```bash
./gen -json-file -out-dir .
```And that's it! Your generated code should be ready for use.