An unofficial go SDK for the Sakugabooru API
go get github.com/ctiller15/sakuga-go-sdk@latestapi := sakugaapi.NewAPI()
opts := sakugamodels.PostsListOptions{
Limit: 10,
}
apiResult, err := api.Posts.List(&opts)
if err != nil {
log.Fatal(err)
}
// Do something with the data// Get a random video with each request
api := sakugaapi.NewAPI()
opts := sakugamodels.PostListOptions{
Limit: 1,
Random: True,
Tags: []string{"fighting"}
}
apiResult, err := api.Posts.List(&opts)
if err != nil {
log.Fatal(err)
}
videoURL := apiResult[0].fileURLgit clone https://github.com/ctiller15/sakuga-go-sdk.git
cd sakuga-go-sdkgo test ./...To contribute, fork the repo and open a pull request to main
Currently supported api routes:
- Posts - List
- Tags - List
- Tags - Related
- Artists - List
- Comments - Show
- Wiki - List
- Notes - List
- Notes - Search
- Notes - History
- Users - Search
- Forum - List
- Pools - List Pools
- Pools - List Posts
- Favorites - List Users
Sakugabooru is a fantastic resource for animation. If you like their site, this SDK, (which relies entirely on their good graces), or animation in general it would be awesome if you supported their patreon.
Future Plans:
- Add intentional support for meta-tags