Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

weeb-wrapper

Package Overview
Dependencies
Maintainers
2
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

weeb-wrapper

A simple yet useful wrapper for the weeb.sh API.

  • 1.3.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

Weeb Wrapper npm version Downloads

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 }); // 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 = new WeebWrapper(<Token>);
wrapper.random('hug', { hidden: false, nsfw: false, filetype: 'jpeg' });

Tags

const wrapper = new WeebWrapper(<Token>);
wrapper.tags(hidden); // Returns Promise<Array<string>>

/**
 * The first and only argument is optional.
 */

Example:

const wrapper = new WeebWrapper(<Token>);
wrapper.tags(false);

Types

const wrapper = new WeebWrapper(<Token>);
wrapper.types(hidden); // Returns Promise<Array<string>>

/**
 * The first and only argument is optional.
 */

Example:

const wrapper = new WeebWrapper(<Token>);
wrapper.types(true);

Upload

const wrapper = new WeebWrapper(<Token>);
wrapper.upload(<Buffer>, <ImageType/ImageTag>, { nsfw, source, tags }); // 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 = new WeebWrapper(<Token>);
wrapper.upload('<directory>', 'hug', { nsfw: true, source: '<URL/Anime Name>', tags: 'cuddle,astolfo' });

Keywords

FAQs

Package last updated on 15 Apr 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc