You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Rachala Ovin 9f0c0ef798
Update README.md
2 months ago
.github/workflows Create npm-publish.yml 2 months ago
src Refactored to fit context. 2 months ago
tests Refactored to fit context. 2 months ago
.eslintrc.yml initial 2 months ago
.gitignore Removed GPR 2 months ago
.npmignore initial 2 months ago
README.md Update README.md 2 months ago
package-lock.json 4.0.3 2 months ago
package.json 4.0.3 2 months ago
tsconfig.json initial 2 months ago

README.md

Kongou

A simple typescript nhentai wrapper.

Usage

Current Docs are for v4.0.3

npm i kongou@latest
import Kongou from 'kongou'

new Kongou().<method>

Use default if you are using es5 syntax.

const Kongou = require('kongou').default

new Kongou().<method>

You can access interfaces by importing the interface file!

Responses from Kongou = dist/interfaces/parser.ts
Responses from Server = dist/interfaces/server.ts

import Kongou from 'Kongou'
import {} from 'Kongou/dist/Interfaces/'

Constructor

Kongou has support for proxy sites that use the same api.

Support is half baked!
Please do tell me if you find an API that has the same URL format.

new Kongou(defaultSite: string, staticSite: { thumbnails: string, images: string })

Functions

<Kongou>().getBook(id: string | number): Promise<Response>

  • id = nhentai Gallery Id.
    • eg: 363636
new Kongou().getBook(363636)

Returns data identical to Response interface.


<Kongou>().getByQuery(object: queryParam | string): Promise<QueryResponse>

Param can be either a string (which will be used as queryParam.keywords) or a queryParam type.

import { queryParam } from "Kongou/dist/Interfaces/parser"

const param: queryParam = { keywords: 'Ichigo Cake to Mont Blanc', lang: 'english', page: 1, sort: 'popular' }

new Kongou().getByQuery(params)
new Kongou().getByQuery('Ichigo Cake to Mont Blanc')

Returns data identical to QueryResponse interface.


<Kongou>().getHomePage(filters: { language: string }): Promise<HomePageResponse>

As the name implies returns the "latest" and "popular now" like results.
For now filter only supports language.

new Kongou().getHomePage({ langauge: 'english' })

Returns data identical to HomePageResponse interface.


<Kongou>().getRandomBook(): Response

Returns a random title using the /random endpoint!

new Kongou().getRandomBook()

Returns data identical to Response interface.


Contribute?

Before making a pull or such, please do lint the files with the config given and comment on what something does.

I'm sure there are lots of grammartical errors with both docs and other comments, if you do come across one please do let me know!

Contributors

You guys made me a javascript addict, made me obssesed with Kongou.
Anyways, you guys made me eager to open up VSC and stonk my JS skill everyday!

Thank you! <3