types | ||
.gitignore | ||
admin.go | ||
comment.go | ||
community.go | ||
go.mod | ||
go.sum | ||
lemmy.go | ||
person.go | ||
post.go | ||
privateMessage.go | ||
README.md | ||
site.go |
Go-Lemmy
Go bindings to the Lemmy API
Example:
ctx := context.Background()
c, err := lemmy.New("https://lemmy.ml")
if err != nil {
panic(err)
}
err = c.Login(ctx, types.Login{
UsernameOrEmail: "email@example.com",
Password: `TestPwd`,
})
if err != nil {
panic(err)
}
_, err = c.SaveUserSettings(ctx, types.SaveUserSettings{
BotAccount: types.NewOptional(true),
})
if err != nil {
panic(err)
}