Skip to content
This repository has been archived by the owner on Aug 13, 2022. It is now read-only.

Commit

Permalink
3.7.0
Browse files Browse the repository at this point in the history
# 3.7.0
## New Update / Fix Update
- Fixed the [parser](#4 (comment)) problem on the NPM package.
- Fixed the [length is missing](#4 (comment)).
- Fixed the [pTagPage](#4 (comment)) giving No results.
- **[ NEW! ]**
    - Added a [CLI](https://ichimakikasura.github.io/kasu.nhentaiapi.js/documentation#cli⠀prototype) `prototype`. This new feature is still not stable as I doubt it will problems like my past mistakes.
    - the [test](https://github.com/IchimakiKasura/kasu.nhentaiapi.js/blob/main/test/test.js) is now more epic, try doing `npm run bruhmocha` lol.

- To get the full **Tags**, **Artists**, **Parodies**, **Groups** list download the `tags.d.ts.full` on github and replace the `tags.d.ts` on the `lib/d.ts` and remove the `.full`. Will add an automatic download soon.
  • Loading branch information
IchimakiKasura committed Oct 30, 2021
1 parent 59f5d1a commit ee58f4f
Show file tree
Hide file tree
Showing 28 changed files with 2,239 additions and 1,042 deletions.
14 changes: 14 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"env": {
"browser": true,
"commonjs": true,
"es2021": true
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": 13
},
"rules": {

}
}
12 changes: 9 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,18 @@ node_modules
.npmignore

# minified files
/lib/main.min.js
/lib/src/fetcher.min.js
/lib/src/shorter.min.js
/lib/kasuApi.min.js
/lib/src/parser.min.js

/.nyc_output
/docs/other/*.md
/docs/other/embeded link.psd
test.js
package-lock.json

# whenever I rewrite the code to clean it
/lib/src/newParser.min.js
/lib/src/newkasuApi.min.js

minifier.js

Expand Down
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
language: node_js
dist: xenial
os:
- linux
node_js:
- "14"
script:
- npm run go
- npm run build
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,19 @@ async function json(){
ExampleApi.connection.close()
}
```
---
## For CLI `new`
run Bash

nhentai 228922
run batch

nhentaibat 228922

check the changelogs for more info

---

<div align="center">

<h3> (≧▽≦*) Other Informations (≧▽≦*)</h3>
Expand Down
593 changes: 307 additions & 286 deletions docs/changelogs.html

Large diffs are not rendered by default.

61 changes: 27 additions & 34 deletions docs/documentation.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,26 @@
<meta name="title" content="Documentation">
<meta name="description"
content='The "N-hentai-api" is a fast and easy to use api for connecting to nhentai.net and nhentai.to data.' />
<meta property="image" content="https://ichimakikasura.github.io/kasu.nhentaiapi.js/other/previewLink.jpg" />
<meta property="image" content="https://ichimakikasura.github.io/kasu.nhentaiapi.js/other/previewLink.png" />
<!-- fb -->
<meta property="og:url" content="https://ichimakikasura.github.io/kasu.nhentaiapi.js/">
<meta property="og:type" content="website">
<meta property="og:title" content="Documentation" />
<meta property="og:description"
content='The "N-hentai-api" is a fast and easy to use api for connecting to nhentai.net and nhentai.to data.' />
<meta property="og:image" content="https://ichimakikasura.github.io/kasu.nhentaiapi.js/other/previewLink.jpg" />
<meta property="og:image" content="https://ichimakikasura.github.io/kasu.nhentaiapi.js/other/previewLink.png" />
<!-- twitter -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@pkpit">
<meta name="twitter:creator" content="IchimakiKasura">
<meta name="twitter:title" content="Documentation" />
<meta name="twitter:description"
content='The "N-hentai-api" is a fast and easy to use api for connecting to nhentai.net and nhentai.to data.' />
<meta name="twitter:image" content="https://ichimakikasura.github.io/kasu.nhentaiapi.js/other/previewLink.jpg" />
<meta name="twitter:image" content="https://ichimakikasura.github.io/kasu.nhentaiapi.js/other/previewLink.png" />
</head>
<html>

<head></head>

<body>
<div id="_html" class="markdown-body">
Expand All @@ -37,7 +40,6 @@ <h1 style="font-size:70px" align="center"><a class="anchor" name="" href="#"><sp

<p>-=Documentation for the kasu.<a href="https://nhentai.net">nhentai</a>api.js=-</p>
</div>

<details>
<summary><a href="#apidocumentation">Overview</a></summary>
<div class="content">
Expand All @@ -48,9 +50,6 @@ <h1 style="font-size:70px" align="center"><a class="anchor" name="" href="#"><sp
</ul>
</div>
</details>



<details>
<summary><a href="#⠀constructor⠀" title="module">kasu.nhentaiapi.js</a></summary>
<div class="content">
Expand Down Expand Up @@ -113,13 +112,6 @@ <h1 style="font-size:70px" align="center"><a class="anchor" name="" href="#"><sp
</ul>
</div>
</details>







<details>
<summary><a href="#json-object" title="json">Json Object</a></summary>
<div class="content">
Expand All @@ -130,15 +122,10 @@ <h1 style="font-size:70px" align="center"><a class="anchor" name="" href="#"><sp
</ul>
</div>
</details>





<p><a href="#cli%E2%A0%80prototype">CLI</a></p>
<p><a href="#clicky-buttons"><code>Return bacc</code></a></p>
<hr>
<!-- #region Basics -->

<h2 id="get-started"><a class="anchor" name="get-started" href="#get-started"><span
class="octicon octicon-link"></span></a>Get started</h2>
<pre><code>npm i kasu.nhentaiapi.js</code></pre>
Expand All @@ -147,11 +134,11 @@ <h2 id="basics"><a class="anchor" name="basics" href="#basics"><span
<pre class=" language-js"><code class=" language-js"><span class="token keyword">const</span> Example <span class="token operator">=</span> <span class="token function">require</span><span class="token punctuation">(</span><span class="token string">'KasuNhentai'</span><span class="token punctuation">)</span><span class="token punctuation">;</span> <span class="token comment">// experimental, if it doesn't work use 'kasu.nhentaiapi.js'</span>
<span class="token keyword">const</span> ExampleApi <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">Example</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token comment">/**
* or const ExampleApi = new Example('start', "https://nhentai.net");
* If you don't want to add the url and connection.start() after it.
* because it automatically start the connection.
*
* Check the documentation for more info.
* or const ExampleApi = new Example('start', "https://nhentai.net");
* If you don't want to add the url and connection.start() after it.
* because it automatically start the connection.
*
* Check the documentation for more info.
*/</span>

<span class="token comment">// ----number | strings can do----</span>
Expand Down Expand Up @@ -305,12 +292,10 @@ <h3 id="⠀prandtag-tag-fn-⠀"><a class="anchor" name="⠀prandtag-tag-fn-⠀"
class="octicon octicon-link"></span></a>&nbsp; &nbsp; <code>⠀pRandTag( tag, fn )⠀</code></h3>
<h3 id="⠀prandparody-tag-fn-⠀"><a class="anchor" name="⠀prandparody-tag-fn-⠀"
href="#⠀prandparody-tag-fn-⠀"><span class="octicon octicon-link"></span></a>&nbsp; &nbsp;
<code>⠀pRandParody( tag, fn )⠀</code>
</h3>
<code>⠀pRandParody( tag, fn )⠀</code></h3>
<h3 id="⠀prandartist-tag-fn-⠀"><a class="anchor" name="⠀prandartist-tag-fn-⠀"
href="#⠀prandartist-tag-fn-⠀"><span class="octicon octicon-link"></span></a>&nbsp; &nbsp;
<code>⠀pRandArtist( tag, fn )⠀</code>
</h3>
<code>⠀pRandArtist( tag, fn )⠀</code></h3>
<h3 id="⠀prandgroup-tag-fn-⠀"><a class="anchor" name="⠀prandgroup-tag-fn-⠀" href="#⠀prandgroup-tag-fn-⠀"><span
class="octicon octicon-link"></span></a>&nbsp; &nbsp; <code>⠀pRandGroup( tag, fn )⠀</code></h3>
<ul>
Expand Down Expand Up @@ -361,8 +346,7 @@ <h3 id="⠀planguagepage-str-int-⠀"><a class="anchor" name="⠀planguagepage-s
<li><code>str</code> only accepts 4 string <strong>japanese</strong>, <strong>english</strong>,
<strong>chinese</strong> and <strong>translated</strong> (is this even a language). it also accepts
shortcuts like <strong>jp</strong>, <strong>japan</strong>, <strong>eng</strong>,
<strong>china</strong>. <code>int</code> specifies the page.
</li>
<strong>china</strong>. <code>int</code> specifies the page.</li>
<li><a
href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/return">returns</a>
a <a href="#ppage-json"><code>json object</code></a></li>
Expand Down Expand Up @@ -653,21 +637,30 @@ <h3 id="⠀languages⠀--string"><a class="anchor" name="⠀languages⠀--string
</h3>
<ul>
<li>NANI TTE- <br>

</li>
</ul>
<hr>
<h1 id="cli⠀prototype"><a class="anchor" name="cli⠀prototype" href="#cli⠀prototype"><span
class="octicon octicon-link"></span></a>CLI⠀<code>prototype</code></h1>
<p><img src="https://user-images.githubusercontent.com/80595346/139554302-1ccb08aa-3dc5-4b75-95aa-8fd65b1c130e.png"
alt="![]()">
the CLI of the module is still WIP. You may experience weird bugs or other, Use it if you want.<br>
<code>nhentai</code> for bash<br>
<code>nhentaibat</code> for batch
</p>
<hr>
<div align="center">

<h2 id="clicky-buttons">clicky buttons</h2>
<p><a href="https://ichimakikasura.github.io/kasu.nhentaiapi.js/licenses" title="MIT Licence"><img
src="https://user-images.githubusercontent.com/80595346/137737347-4585f4d6-a590-43e5-af3e-1a3b489886f6.png"
alt=""></a><br>
<a href="https://ichimakikasura.github.io/kasu.nhentaiapi.js/changelogs" title="Update History"><img
src="https://user-images.githubusercontvivo-1907ent.com/80595346/137737338-26bd22d1-370f-4521-858e-5abd34b8fade.png"
src="https://user-images.githubusercontent.com/80595346/137737338-26bd22d1-370f-4521-858e-5abd34b8fade.png"
alt=""></a>
</p>
<iframe title="kasura's nhentai API" src="https://ichimakikasura.github.io/kasu.nhentaiapi.js/embed/embed101.html" frameborder="0" width="500"
<iframe title="kasura's nhentai API"
src="https://ichimakikasura.github.io/kasu.nhentaiapi.js/embed/embed101" frameborder="0" width="500"
height="244"></iframe>
<br>
<a href="https://github.com/IchimakiKasura/kasu.nhentaiapi.js" title="Return to github"><img
Expand Down
12 changes: 6 additions & 6 deletions docs/embed/embed101.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,28 @@
<meta name="owner" content="IchimakiKasura">
<meta name="title" content="Unofficial Nhentai API">
<meta name="description" content='The "N-hentai-api" is a fast and easy to use api for connecting to nhentai.net and nhentai.to data.' />
<meta property="image" content="https://ichimakikasura.github.io/kasu.nhentaiapi.js/other/previewLink.jpg" />
<meta property="image" content="https://ichimakikasura.github.io/kasu.nhentaiapi.js/other/previewLink.png" />
<!-- fb -->
<meta property="og:url" content="https://ichimakikasura.github.io/kasu.nhentaiapi.js/">
<meta property="og:type" content="website">
<meta property="og:title" content='The "N-hentai-api" is a fast and easy to use api for connecting to nhentai.net and nhentai.to data.' />
<meta property="og:description" content="Easy Nhentai API" />
<meta property="og:image" content="https://ichimakikasura.github.io/kasu.nhentaiapi.js/other/previewLink.jpg" />
<meta property="og:title" content="Unofficial Nhentai API" />
<meta property="og:description" content='The "N-hentai-api" is a fast and easy to use api for connecting to nhentai.net and nhentai.to data.' />
<meta property="og:image" content="https://ichimakikasura.github.io/kasu.nhentaiapi.js/other/previewLink.png" />
<!-- twitter -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@pkpit">
<meta name="twitter:creator" content="IchimakiKasura">
<meta name="twitter:title" content="Unofficial Nhentai API" />
<meta name="twitter:description" content='The "N-hentai-api" is a fast and easy to use api for connecting to nhentai.net and nhentai.to data.' />
<meta name="twitter:image" content="https://ichimakikasura.github.io/kasu.nhentaiapi.js/other/previewLink.jpg" />
<meta name="twitter:image" content="https://ichimakikasura.github.io/kasu.nhentaiapi.js/other/previewLink.png" />
</head>
<body>
<div class="top" style="cursor: pointer;" onclick="loc()" title="KasuNhentai">
<img src="https://user-images.githubusercontent.com/80595346/138738093-408a1f38-6e3c-45a1-a277-67fb51b18e21.png" class="topBG" style="cursor: pointer;" onclick="loc()" title="KasuNhentai"/>

<img src="https://user-images.githubusercontent.com/80595346/138834210-b83eec44-b5bc-41d5-8dc6-77fe753acc3a.png" class="nImg" width="60%" title="nhentai"/>
</div>
<img class="thingy" src="https://img.shields.io/badge/stable%20version-3.6.0-brightgreen?style=for-the-badge" width="30%" alt="stable version" title="Current Version"/>
<img class="thingy" src="https://img.shields.io/badge/stable%20version-3.7.0-brightgreen?style=for-the-badge" width="30%" alt="stable version" title="Current Version"/>
<img class="thingy2" src="https://img.shields.io/npm/dt/kasu.nhentaiapi.js.svg?maxAge=3600&amp;style=for-the-badge" width="25%" alt="Downloads" title="Downloads"/>⠀⠀
<img class="thingy3" src="https://img.shields.io/travis/IchimakiKasura/kasu.nhentaiapi.js.svg?style=for-the-badge" width="23.2%" alt="Build Status" title="Status"/>
</body>
Expand Down
21 changes: 13 additions & 8 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,22 @@
<meta name="title" content="Unofficial Nhentai API">
<meta name="description"
content='The "N-hentai-api" is a fast and easy to use api for connecting to nhentai.net and nhentai.to data.' />
<meta property="image" content="https://ichimakikasura.github.io/kasu.nhentaiapi.js/other/previewLink.jpg" />
<meta property="image" content="https://ichimakikasura.github.io/kasu.nhentaiapi.js/other/previewLink.png" />
<!-- fb -->
<meta property="og:url" content="https://ichimakikasura.github.io/kasu.nhentaiapi.js/">
<meta property="og:type" content="website">
<meta property="og:title" content="Unofficial Nhentai API" />
<meta property="og:description"
content='The "N-hentai-api" is a fast and easy to use api for connecting to nhentai.net and nhentai.to data.' />
<meta property="og:image" content="https://ichimakikasura.github.io/kasu.nhentaiapi.js/other/previewLink.jpg" />
<meta property="og:image" content="https://ichimakikasura.github.io/kasu.nhentaiapi.js/other/previewLink.png" />
<!-- twitter -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@pkpit">
<meta name="twitter:creator" content="IchimakiKasura">
<meta name="twitter:title" content="Unofficial Nhentai API" />
<meta name="twitter:description"
content='The "N-hentai-api" is a fast and easy to use api for connecting to nhentai.net and nhentai.to data.' />
<meta name="twitter:image" content="https://ichimakikasura.github.io/kasu.nhentaiapi.js/other/previewLink.jpg" />
<meta name="twitter:image" content="https://ichimakikasura.github.io/kasu.nhentaiapi.js/other/previewLink.png" />
<style>
.nTitle {
position: relative;
Expand Down Expand Up @@ -61,9 +61,8 @@
}
</style>
</head>

<body>
<link rel="stylesheet" type="text/css"
href="chrome-extension://ckkdlimhmcjmikdlpkmbgfkaikojcbjk/themes/github-dark.css" id="_theme">
<div id="_html" class="markdown-body">
<div class="topBG"></div>
<img src="https://i.redd.it/fkg9yip5yyl21.png" height="140px" title="nhentai">
Expand All @@ -86,8 +85,7 @@ <h1 class="nTitle" style="color:black !important"><a class="anchor" name="" href
title="^3.0.0 versions are now already MINIFIED!"><br>
<img src="https://img.shields.io/badge/-Astolfo--chan%20is%20very%20happy%20that%20you%20are%20well%20cultured%20to%20use%20this-ff1100?style=for-the-badge"
alt="lol" title="unofficial api of nhentai"><br>
<a href="https://snyk.io/advisor/npm-package/kasu.nhentaiapi.js" title="bruh"><img
src="https://snyk.io/advisor/npm-package/kasu.nhentaiapi.js/badge.svg"
<img style="margin-top: 8px;" src="https://snyk.io/advisor/npm-package/kasu.nhentaiapi.js/badge.svg"
alt="kasu.nhentaiapi.js"></a>
</p>
</div>
Expand Down Expand Up @@ -147,14 +145,21 @@ <h3 id="how-to-use-n-hentai-api"><a class="anchor" name="how-to-use-n-hentai-api
<span class="token comment">// closes the connection</span>
ExampleApi<span class="token punctuation">.</span>connection<span class="token punctuation">.</span><span class="token function">close</span><span class="token punctuation">(</span><span class="token punctuation">)</span>
<span class="token punctuation">}</span></code></pre>
<h2 id="for-cli-new"><a class="anchor" name="for-cli-new" href="#for-cli-new"><span
class="octicon octicon-link"></span></a>For CLI <code>new</code></h2>
<p>for Bash</p>
<pre><code>./nhentai.sh 228922 </code></pre>
<p>for CMD</p>
<pre><code>nhentai.bat 228922</code></pre>
<p>check the changelogs for more info</p>
<hr>
<div align="center">

<h3 id="if-you-are-intrested-on-this-project-or-want-to-share-it-you-can-embed-it-to-your-website">If you
are intrested on this project or want to share it you can embed it to your website!</h3>
<pre class=" language-html"><code class=" language-html"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>iframe</span> <span class="token attr-name">title</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>kasura<span class="token punctuation">'</span>s nhentai API<span class="token punctuation">"</span></span> <span class="token attr-name">src</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>https://ichimakikasura.github.io/kasu.nhentaiapi.js/embed/embed101<span class="token punctuation">"</span></span> <span class="token attr-name">frameborder</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>0<span class="token punctuation">"</span></span> <span class="token attr-name">width</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>500<span class="token punctuation">"</span></span> <span class="token attr-name">height</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>244<span class="token punctuation">"</span></span><span class="token punctuation">&gt;</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>iframe</span><span class="token punctuation">&gt;</span></span>
</code></pre>
<iframe title="kasura's nhentai API" src="https://ichimakikasura.github.io/kasu.nhentaiapi.js/embed/embed101.html" frameborder="0" width="500"
<iframe title="kasura's nhentai API" src="https://ichimakikasura.github.io/kasu.nhentaiapi.js/embed/embed101" frameborder="0" width="500"
height="244"></iframe>

<hr>
Expand Down
Loading

0 comments on commit ee58f4f

Please sign in to comment.