Initial Commit

This commit is contained in:
2022-12-10 09:17:16 -08:00
commit af8249097e
24 changed files with 3353 additions and 0 deletions

29
README.md Normal file
View File

@@ -0,0 +1,29 @@
# Go-Lemmy
Go bindings to the [Lemmy](https://join-lemmy.org) API
Example:
```go
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)
}
```