Skip to content
Derpibooru API bindings in Go
Go
Branch: master
Clone or download
Latest commit 2b10f50 Mar 23, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore Initial commit Jun 7, 2015
LICENSE MIT license Oct 31, 2015
README.md upgrade to go.mod Mar 23, 2019
api.go
api_test.go remove hard-coded id's Aug 10, 2017
doc.go update readme Oct 31, 2015
error.go Initial code commit Jun 8, 2015
filter.go fix tests Mar 23, 2019
filter_test.go remove hard-coded id's Aug 10, 2017
forums.go use contexts Aug 10, 2017
forums_test.go remove hard-coded id's Aug 10, 2017
go.mod upgrade to version 2, remove dead tools Mar 23, 2019
image.go fix tests Mar 23, 2019
image_test.go fix tests Mar 23, 2019
user.go
user_test.go fix tests Mar 23, 2019

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.