Skip to content

insomnyawolf/Gonnachan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gonnachan

Go Report Card

Konachan api written in go WORK IN PROGRESS

Supported Servers

http://konachan.com/
https://yande.re/
https://gelbooru.com/
https://safebooru.org/
https://rule34.xxx/

WIP Servers

https://sankakucomplex.com

Usage

Imports

import "github.com/insomnyawolf/Gonnachan"

Code

	Req := gonnachan.GonachanPostRequest{}

PostRequest:

type PostRequest struct {
	Tags       []string
	BeforeID   int64
	AfterID    int64
	RandOrder  bool
	Rating     string
	Height     int
	Width      int
	MaxResults int
	TargetAPI  string
	serverType int
	url        string
}

Methods:

	//Results Execute and process query.
	//Returns PostResult Struct with all the data needed
	res := Req.GetResults()

	//If you wanna see what is the api query beeing made
	//you can use the method APIrequest(), it will return a string
	Req.APIrequest()

PostResult:

type PostResult struct {
	ID       int64  `json:"id"`
	Tags     string `json:"tags"`
	Author   string `json:"author"`
	Source   string `json:"source"`
	Score    int64  `json:"score"`
	Md5      string `json:"md5"`
	FileSize int64  `json:"file_size"`
	FileURL  string `json:"file_url"`
	Rating   string `json:"rating"`
	Width    int64  `json:"width"`
	Height   int64  `json:"height"`
	PostURL  string
}

About

Konachan api written in go WORK IN PROGRESS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages