Weeb Wrapper
A simple, yet useful wrapper for the weeb.sh
API.
Installing the Module
Yarn
yarn add weeb-wrapper
NPM
npm install weeb-wrapper
Usage
Disclaimer: This is just a simple wrapper, if you want more information than url
, type
, fileType
, etc... You should not be even downloading a node module for that.
On this examples WeebWrapper
will be:
const WeebWrapper = require('weeb-wrapper');
Random
const wrapper = new WeebWrapper(<Token>);
wrapper.random(<ImageType/ImageTag>, { hidden, nsfw, filetype });
Example:
const wrapper = new WeebWrapper(<Token>);
wrapper.random('hug', { hidden: false, nsfw: false, filetype: 'jpeg' });
Tags
const wrapper = new WeebWrapper(<Token>);
wrapper.tags(hidden);
Example:
const wrapper = new WeebWrapper(<Token>);
wrapper.tags(false);
Types
const wrapper = new WeebWrapper(<Token>);
wrapper.types(hidden);
Example:
const wrapper = new WeebWrapper(<Token>);
wrapper.types(true);
Upload
const wrapper = new WeebWrapper(<Token>);
wrapper.upload(<Buffer>, <ImageType/ImageTag>, { nsfw, source, tags });
Example:
const wrapper = new WeebWrapper(<Token>);
wrapper.upload('<directory>', 'hug', { nsfw: true, source: '<URL/Anime Name>', tags: 'cuddle,astolfo' });