Giter VIP home page Giter VIP logo

nhentai-api's Introduction

Update nhentai api wrapper.

original https://www.npmjs.com/package/nhentai-api add bypass CORS and many proxy server for blocked country.

APIs

Warning: this module returns only URLs for requests.

search(query, page, sort)

Returns Search URL by query.

Parameter Required Default value Description
query + Search query, see more at https://nhentai.net/info
page - 1 Page of search
sort - null Sort type: popular (1) or date (2)

searchLike(book_id, page, sort)

Returns Search URL for related to book's ID.

Parameter Required Default value Description
book_id + book_id for search related
page - 1 Page of search
sort - null Sort type: popular (1) or date (2)

searchTagged(tag_id, page, sort)

Returns Search URL for tag's ID.

Parameter Required Default value Description
tag_id + Tag's ID
page - 1 Page of search
sort - null Sort type: popular (1) or date (2)

bookDetails(book_id)

Returns URL for getting Book.

Parameter Required Default value Description
book_id + Book's ID

getPage(media_id, page)

Returns page's image URL for Book's media_id.

Parameter Required Default value Description
media_id + Book's media_id
page - 1 Book's page

getThumb(media_id, page)

Returns page's thumbnail image URL for Book's media_id.

Parameter Required Default value Description
media_id + Book's media_id
page - 1 Book's page

getCover(media_id)

Returns Book's cover image URL.

Parameter Required Default value Description
media_id + Book's media_id

parseBook(data)

Returns Book.

Parameter Required Default value Description
data + Data for parse.

parseSearch(data)

Returns Search.

Parameter Required Default value Description
data + Data for parse.

Types

Book

Example:

nhentaiBook {
	book: {…}
	cover:(...)
	id:(...)
	media_id:(...)
	num_favorites:(...)
	num_pages:(...)
	pages:(...)
	scanlator:(...)
	tags:(...)
	thumbnail:(...)
	title:(...)
	upload_date:(...)
}

book

Stores parsed JSON for the book.

cover

Stores details for book's cover.

id

Stores book's id.

media_id

Stores book's gallery id. Used for gallery's methods.

num_favorites

Stores amount of book's "likes".

num_pages

Stores amount of pages in the book.

pages

Stores Array of book's pages details.

scanlator

Stores name of scanlator.

tags

Stores Array of tags. Each of tag is JSON like:

{
	id: …,
	type: …,
	name: …,
	url: …,
	count: …
}

thumbnail

Stores details for book's cover thumbnail.

title

Stores object with titles (english, japanese, pretty).

upload_date

Stores book's upload Date.

Search

Example:

nhentaiSearch {
	search: {…}
	num_pages:(...)
	per_page:(...)
	results:(...)
}

search

Stores parsed JSON for the search.

num_pages

Stores amount of pages found.

per_page

Stores amount of books per page.

results

Stores Array of Books.

Files Structure:

./nhentai/
	API.js
	
	Book.js
	Search.js
	
	Errror.js
	APIError.js
	TypeError.js

nhentai-api's People

Contributors

py7hon avatar renovate-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

kadantte

nhentai-api's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

This repository currently has no open or pending branches.

Detected dependencies

npm
package.json

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.