culture-client
v1.0.3
Published
An NPM package that fetches images from Danbooru, E621.net, Konachan, Reddit, Rule34, and Yande.re
Downloads
54
Maintainers
Readme
Table of Contents
Overview
culture-client is a tool for getting a random post from danbooru, e621, konachan, rule34 or yande.re in a simple json format, or their raw json format.
Features
- Pull a random post from danbooru.donmai.us
- Pull a random post from e621.net
- Pull a random post from konachan.com
- Pull a random post from rule34.xxx
- Pull a random post from yande.re
Installation
# For installing the latest stable version
npm install culture-client@latest
# or
npm install culture-client
# For installing the latest in-developement version
npm install culture-client@dev
Usage
baseHandler
This is an advanced feature and not reccomended for normal production use
const { baseHandler } = require('culture-client');
//With JSON url
new baseHandler().get('https://jsonplaceholder.typicode.com/posts').then(data => console.log(data));
//With XML url
new baseHandler().get('https://www.w3schools.com/xml/note.xml', { XML: true }).then(data => console.log(data));
danbooru
const { danbooru } = require('culture-client');
new danbooru().post.then(post => console.log(post));
e621
const { e621 } = require('culture-client');
//Make sure to change the userAgent to match your details or e621.net may IP ban you from using their API.
new e621({ userAgent: 'MyProject/1.0 (by username on e621)' }).post.then(post => console.log(post));
konachan
const { konachan } = require('culture-client');
new konachan().post.then(post => console.log(post));
rule34
const { rule34 } = require('culture-client');
new rule34().post.then(post => console.log(post));
yandere
const { yandere } = require('culture-client');
new yandere().post.then(post => console.log(post));
License
culture-client is licensed under the MIT license. MIT