nhentai

package
v0.0.0-...-1120f02 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 8, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound             = errors.New("doujin not found")
	ErrCloudflareProtection = errors.New("failed to bypass cloudflare")
)

Functions

This section is empty.

Types

type API

type API struct {
	// contains filtered or unexported fields
}

func New

func New() (*API, error)

func (*API) FindHentai

func (n *API) FindHentai(id string) (*Hentai, error)

type Hentai

type Hentai struct {
	ID         int
	URL        string
	Cover      string
	MediaID    string
	Titles     *Titles
	Tags       []*Tag
	Pages      int
	Favorites  int
	UploadedAt time.Time
}

func (*Hentai) Artists

func (h *Hentai) Artists() []*Tag

func (*Hentai) Characters

func (h *Hentai) Characters() []*Tag

func (*Hentai) Genres

func (h *Hentai) Genres() []*Tag

func (*Hentai) Language

func (h *Hentai) Language() (*Tag, bool)

func (*Hentai) Parodies

func (h *Hentai) Parodies() []*Tag

type Tag

type Tag struct {
	ID   int
	Type TagType
	Name string
	URL  string
}

func (*Tag) String

func (t *Tag) String() string

type TagType

type TagType int
const (
	GenreTag TagType = iota
	ArtistTag
	GroupTag
	LanguageTag
	CharacterTag
	ParodyTag
)

type Titles

type Titles struct {
	Japanese string `json:"japanese,omitempty"`
	English  string `json:"english,omitempty"`
	Pretty   string `json:"pretty,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL