3.0.4 • Published 3 years ago

nhentai-api-tiffceet-patch v3.0.4

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

Node.JS implementation of nhentai.net's undocumented APIs.

npm versionnode version

Node.JS module for handling nhentai.net API.

Please refer the docs of source code to see main features, such as:

  • Classes instances for every type of data from API.
  • Return URLs for binary data (images).
  • Easy proxy support by using custom Agent (like this one).

Install

Install via npm:

npm i nhentai-api

Docs

Read the docs on GitHub pages.

Example

CommonJS

const { API, } = require('nhentai-api');

ES6

import { API, } from 'nhentai-api';

Common

const api = new API();

api.getBook(177013).then(book => {
	api.getImageURL(book.cover);    // https://t.nhentai.net/galleries/987560/cover.jpg
	api.getImageURL(book.pages[1]); // https://i.nhentai.net/galleries/987560/2.jpg
});