https://github.com/h2owater425/node-hitomi
Hitomi.la api for Node.js
https://github.com/h2owater425/node-hitomi
api hitomi library typescript typescript-library
Last synced: 3 months ago
JSON representation
Hitomi.la api for Node.js
- Host: GitHub
- URL: https://github.com/h2owater425/node-hitomi
- Owner: H2Owater425
- License: mit
- Created: 2021-05-24T01:50:50.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-12-23T08:34:35.000Z (6 months ago)
- Last Synced: 2025-02-23T20:19:25.786Z (4 months ago)
- Topics: api, hitomi, library, typescript, typescript-library
- Language: TypeScript
- Homepage: https://npm.im/node-hitomi
- Size: 387 KB
- Stars: 18
- Watchers: 1
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![]()
Hitomi.la api for Node.js
Would you call me a gentleman?[](https://npmjs.org/package/node-hitomi)
[](https://npmjs.org/package/node-hitomi)
[](https://github.com/H2Owater425/node-hitomi/blob/main/LICENSE)
## Installation
> **NOTICE**: Please always use the latest version of the package.
Since Hitomi changes its method to get image url often, legacy version may not work.Using npm:
```bash
$ npm install node-hitomi
```Using yarn:
```bash
$ yarn add node-hitomi
```## Features
- Get gellary ids by title, tags, and popularity
- Get gallary data by id
- Parse, query and get tags
- Get hitomi-related urisWithout any dependencies!
## Usage/Examples
setup:
```javascript
// CommonJS
const hitomi = require('node-hitomi').default;// ES Module
import hitomi from 'node-hitomi';
```printing title and id of gallery id `x`:
```javascript
hitomi.getGallery(x)
.then(function (gallery) {
console.log(gallery['title']['display'], gallery['id']);return;
});
```printing supported tags of `female` starts with letter `y`:
```javascript
hitomi.getTags('female', {
startsWith: 'y'
})
.then(function (tags) {
console.log(tags);return;
});
```printing number of gallery with language `korean` without female tag `netorare`:
```javascript
hitomi.getGalleryIds({
tags: hitomi.getParsedTags('language:korean -female:netorare')
})
.then(function (ids) {
console.log(ids['length']);return;
});
```## Contribution
Contribution, issues and feature requests are welcome!
Feel free to check [issues page](https://github.com/H2Owater425/node-hitomi/issues).