randomyuiz

1.0.5 • Public • Published

randomyuiz

RandomYuiz API wrapper for Node.js

Installing

Version

# npm 
npm i randomyuiz
yarn add randomyuiz

Example Usage

.animeImage(type)
  • type = "anime", "chika", "hayasaka", "kaguyashinomiya", "megumin", "oyasumi", "rem", "zerotwo"
async function start() {
    const { randomyuiz } = require("randomyuiz");
    let data = new randomyuiz;
    let img = await data.animeImage("anime"); //You can change "anime" with following options above
 
    console.log(img) //return an image
}
start()
.filterImage(type, imageURL)
  • type = "sepia", "grayscale", "invert"
  • imageURL(url) = (REQUIRED)
async function startRendering() {
    const { randomyuiz } = require("randomyuiz");
    let data = new randomyuiz;
    let img = await data.filterImage('sepia', 'https://cdn.ram.moe/Bk6IgCMel.jpg'); //if imageURL empty, it will return default image as example
 
    console.log(img) //return an image
}
startRendering()

Discord.js Example

async function startRendering() {
    const { randomyuiz } = require("randomyuiz");
    let data = new randomyuiz;
    let images = await data.filterImage('sepia', msg.author.avatarURL({size: 2048, format: 'png'}));
 
    msg.channel.send({ files: [{ attachment: images, name: 'sepia.png' }] }); //result
}
startRendering()

Readme

Keywords

Package Sidebar

Install

npm i randomyuiz

Weekly Downloads

1

Version

1.0.5

License

ISC

Unpacked Size

4.68 kB

Total Files

6

Last publish

Collaborators

  • izuu4302