Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶ added in v0.1.8
Client is used to store common api information for http requests
func NewClient ¶ added in v0.1.6
func NewClient(args ...interface{}) (client Client)
NewClient will generate a basic api client for use. Valid optional args are: Int: set the limit for goroutines, bool: Flag artist in use for PrettyNames
func (*Client) NewDoujin ¶ added in v0.1.8
NewDoujin is used to generate a doujin instance with Image instances attached at APIImages
func (*Client) NewSearch ¶ added in v0.1.8
func (a *Client) NewSearch(s *SearchOpts) Search
NewSearch will return a Search struct from the qurey and page information
type Doujin ¶
type Doujin struct {
ID json.Number `json:"id"`
MediaID string `json:"media_id"`
NumPages int `json:"num_pages"`
Images struct {
Cover image `json:"cover"`
Thumbnail image `json:"thumbnail"`
Pages []image `json:"pages"`
} `json:"images"`
Titles struct {
English string `json:"english"`
Japanese string `json:"japanese"`
Pretty string `json:"pretty"`
} `json:"title"`
Tags []struct {
ID json.Number `json:"id"`
Type string `json:"type"`
Name string `json:"name"`
} `json:"tags"`
APIImages []Image
Client *Client
}
Doujin a quick struct for unpacking the response from the nhentai API. Used for responses from nhentai.net/api/galleries/:magicNumber
func (*Doujin) Artist ¶ added in v0.1.3
Artist will walk tags to discover the first artist tag for the doujin
func (Doujin) DownloadZip ¶
func (d Doujin) DownloadZip()
DownloadZip is used to pull the Doujin to disk as {doujin.Title.English}.cbz
type Search ¶
Search is a base struct for search results from the api
func (Search) RenderTable ¶
RenderTable will provide a pretty view of the search results
func (Search) ReturnDoujin ¶
ReturnDoujin will take an index number and return a doujin from the indexed search `Result`
type SearchOpts ¶ added in v0.1.11
SearchOpts is intended to provide a common basing for expanding the options allowed for search in the future