Help us shape the future of Go! Take the 2026 Go Developer Survey

nhentai

package module
v0.0.0-...-3a63d0c Latest Latest
Warning

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

Go to latest
Published: May 13, 2020 License: GPL-3.0 Imports: 8 Imported by: 0

README

Go nhentai API library

GoDoc

A library for pulling doujinshi from nhentai using the JSON api, written in go

Documentation

Overview

Package nhentai - A library for pulling doujinshi from nhentai using the JSON api. Provides the ability to search based on keyword, tag or id, with id providing full infomation about the doujinshi.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Doujinshi

type Doujinshi struct {
	ID         string
	Title      string
	TotalPages int
	Pages      []Page
	Tags       []string
	URL        string
	MediaID    string
}

Doujinshi - Information and content from a given id

func Get

func Get(id int) (*Doujinshi, error)

Get - get a doujinshi by nHentai id

type Page

type Page struct {
	Ext string
	Num int
}

Page - A single page of a doujinshi

type SearchResponse

type SearchResponse struct {
	MaxPage int
	Results []SearchResult
}

SearchResponse - The reponse from a nhentai search query

func Search(query string, page int) (*SearchResponse, error)

Search - Search for a term on nHentai and return results

func Tag

func Tag(query string, page int) (*SearchResponse, error)

Tag - Search for a tag on nHentai and return results

type SearchResult

type SearchResult struct {
	ID       string
	Title    string
	ThumbURL string
	URL      string
}

SearchResult - A single result from a search

Jump to

Keyboard shortcuts

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