Skip to content
Derpibooru API bindings in Go
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
LICENSE
README.md
api.go
api_test.go
doc.go
error.go
filter.go
filter_test.go
forums.go
forums_test.go
go.mod
image.go
image_test.go
user.go
user_test.go

README.md

derpigo

API Docs License

Installation

$ go get -u github.com/Xe/derpigo

Usage Example

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)
}
You can’t perform that action at this time.