culture-client
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

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

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

Package Sidebar

Install

npm i culture-client

Weekly Downloads

36

Version

1.0.3

License

MIT

Unpacked Size

22.9 kB

Total Files

18

Last publish

Collaborators

  • shhh-7612