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.
WeebWrapper
will be:
On this examples const WeebWrapper = ;
Random
const wrapper = <Token>;wrapper; // Returns Promise<Object> /** * You can get the ImageTypes and ImageTags using the wrapper.types(); and wrapper.tags(); * Everything on the object of the second argument is optional. */
Example:
const wrapper = <Token>;wrapper;
Tags
const wrapper = <Token>;wrappertagshidden; // Returns Promise<Array<string>> /** * The first and only argument is optional. */
Example:
const wrapper = <Token>;wrappertagsfalse;
Types
const wrapper = <Token>;wrapper; // Returns Promise<Array<string>> /** * The first and only argument is optional. */
Example:
const wrapper = <Token>;wrapper;
Upload
const wrapper = <Token>;wrapper; // Returns Promise<Object> /** * The third argument is optional. * The first argument is a File Buffer, for example using https://nodejs.org/api/fs.html#fs_fs_readfile_path_options_callback */
Example:
const wrapper = <Token>;wrapper;