https://github.com/jozsefsallai/gophersauce
API wrapper for SauceNAO written in Go
https://github.com/jozsefsallai/gophersauce
api-client golang saucenao saucenao-api
Last synced: about 1 month ago
JSON representation
API wrapper for SauceNAO written in Go
- Host: GitHub
- URL: https://github.com/jozsefsallai/gophersauce
- Owner: jozsefsallai
- License: mit
- Created: 2020-03-18T19:19:13.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-03-22T11:19:03.000Z (about 5 years ago)
- Last Synced: 2025-04-08T08:48:39.998Z (2 months ago)
- Topics: api-client, golang, saucenao, saucenao-api
- Language: Go
- Homepage:
- Size: 7.81 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# gophersauce
gophersauce is an API wrapper for SauceNAO written in Go.
```
go get github.com/jozsefsallai/gophersauce
```## Basic Example
```go
package mainimport (
"fmt"
"log"
"os""github.com/jozsefsallai/gophersauce"
)func main() {
client, err := gophersauce.NewClient(nil)
if err != nil {
log.Fatal(err)
}response, err := client.FromURL("https://i.imgur.com/v6EiHyj.png")
if err != nil {
log.Fatal(err)
}if response.Count() == 0 {
fmt.Println("There are no results :(")
os.Exit(0)
}first := response.First()
if first.IsPixiv() {
fmt.Println("This result is from Pixiv!")
fmt.Println("Here's the ID of the image on Pixiv:", first.Data.PixivID)
} else {
fmt.Println("Probably not from Pixiv!")
fmt.Println("Here are the external URLs:", first.Data.ExternalURLs)
}
}
```## Currently Supported Providers:
* Pixiv
* IMDb
* Bcy
* AniDB
* Pawoo
* Seiga
* Sankaku
* Danbooru## Documentation and Reference
https://pkg.go.dev/github.com/jozsefsallai/gophersauce
## Todo
* Add more providers
* Unit tests## License
MIT.