go-lemmy

Pure-Go read client for the Lemmy REST API (/api/v3).

CGO_ENABLED=0 zero third-party deps standard library only any Lemmy instance BSD-3-Clause
Documentation GitHub

A pure-Go (CGO=0), dependency-free read client for the Lemmy REST API (/api/v3). Point it at any Lemmy instance and read its communities and posts. An optional Login stores a JWT for authenticated reads. Standard library only; builds for all 64-bit targets.

Usage

Pure Go, standard library only. go get github.com/go-lemmy/lemmy

c := lemmy.New("https://lemmy.world")

list, err := c.Posts(context.Background(), lemmy.PostsOptions{
	Community: "technology", Sort: "Hot", Limit: 20,
})
if err != nil {
	panic(err)
}
for _, p := range list.Posts {
	fmt.Printf("%s โ€” %s (score %d)\n", p.Title, p.Community, p.Score)
}

Repositories

Everything that actually exists in the org today.

lemmy client

Pure-Go read client for the Lemmy REST API (/api/v3).

CI Go Reference

brand brand

Logos, icons and social images for go-lemmy.