Global

Methods

processOptions(options) → {nHentaiOptions}

Applies provided options on top of defaults.

Parameters:
Name Type Description
options nHentaiOptions

Options to apply.

Returns:
nHentaiOptions -

Unified options.

Type Definitions

APIBook

Book object from API.

Properties:
Name Type Description
title object

Book title.

Properties
Name Type Description
english string

Book english title.

japanese string

Book japanese title.

pretty string

Book short title.

id number | string

Book ID.

media_id number | string

Book Media ID.

num_favorites number | string

Book favours count.

num_pages number | string

Book pages count.

scanlator string

Book scanlator.

uploaded number | string

Upload UNIX timestamp.

cover APIImage

Book cover image.

images Array.<APIImage>

Book pages' images.

tags Array.<APITag>

Book tags.

APIImage

Image object from API.

Properties:
Name Type Description
t string

Image type.

w number | string

Image width.

h number | string

Image height.

APISearch

Search object from API.

Properties:
Name Type Description
result Array.<APIBook>

Search results.

num_pages number | string

Number of search pages available.

per_page number | string

Number of books per page.

APITag

Tag object from API.

Properties:
Name Type Description
id number | string

Tag id.

type string

Tag type.

name string

Tag name.

count number | string

Tagged books count.

url string

Tag URL.

httpAgent

Agent-like object or Agent class or it's instance.

nHentaiHosts

Common nHentai API hosts object.

Properties:
Name Type Attributes Description
api string <nullable>

Main API host.

images string <nullable>

Media API host.

thumbs string <nullable>

Media thumbnails API host.

nHentaiOptions

Common nHentai options object.

Properties:
Name Type Attributes Description
hosts nHentaiHosts <nullable>

Hosts.

ssl boolean <nullable>

Prefer HTTPS over HTTP.

agent httpAgent <nullable>

HTTP(S) agent.