https://github.com/xe/derpigo
Derpibooru API bindings in Go
https://github.com/xe/derpigo
Last synced: about 1 year ago
JSON representation
Derpibooru API bindings in Go
- Host: GitHub
- URL: https://github.com/xe/derpigo
- Owner: Xe
- License: mit
- Created: 2015-06-07T23:29:42.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2019-03-23T04:42:29.000Z (over 7 years ago)
- Last Synced: 2025-06-07T22:43:23.613Z (about 1 year ago)
- Language: Go
- Size: 37.1 KB
- Stars: 10
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# derpigo
[API Docs](https://godoc.org/within.website/derpigo) [License](https://github.com/Xe/derpigo/blob/master/LICENSE)
## Installation
```console
$ go get -u github.com/Xe/derpigo
```
## Usage Example
```go
package main
import (
"context"
"os"
"within.website/derpigo"
)
func main() {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
c := derpigo.New(derpigo.WithAPIKey(os.Getenv("DERPI_API_KEY")))
const imgID = 1330414 // https://derpibooru.org/1330414
img, interactions, err := c.GetImage(ctx, imgID)
if err != nil {
log.Fatal(err)
}
log.Printf("%#v", img)
log.Printf("#%v", interactions)
}
```