cmd/gen | ||
types | ||
.gitignore | ||
go.mod | ||
go.sum | ||
lemmy.go | ||
LICENSE | ||
README.md | ||
routes.gen.go | ||
websocket.go |
Go-Lemmy
Go bindings to the Lemmy API
Example:
ctx := context.Background()
c, err := lemmy.New("https://lemmygrad.ml")
if err != nil {
panic(err)
}
err = c.ClientLogin(ctx, types.Login{
UsernameOrEmail: "user@example.com",
Password: `TestPwd`,
})
if err != nil {
panic(err)
}
_, err = c.SaveUserSettings(ctx, types.SaveUserSettings{
BotAccount: types.NewOptional(true),
})
if err != nil {
panic(err)
}