amethyste-api

1.1.6 • Public • Published

NPM version NPM downloads

npm installnfo

Description

Module officiel pour l'api du bot Améthyste

Utilisation

Documentation officielle : https://docs.api.amethyste.moe/

Installation

npm i amethyste-api

Endpoint

  • url = Image url
  • pixelize (entre 1 et 50, default: 8)
  • posterize (entre 1 et 100, defaut : 5 )
  • blur (entre 1 et 30, defaut : 5)
Nom Params
circle url
rejected url
approved url
glitch url
distort url
sepia url
contrast url
greyscale url
invert url
pixelize url, pixelize
blur url, blur
posterize url, posterize
beautiful url
afusion => avatar-fusion url
wanted url
3000years url
rip url
utatoo url
wasted url
frame url
moustache url
scary url

Utilisation

Connexion :

const ameClient = require("amethyste-api")
const ameApi = new ameClient("token")

Endpoint Generate :

ameApi.generate("endpoint", {
    "url" : "image url"
}).then(image => {
    console.log(image)
}).catch(err => {
    throw err;
});

Returns

<Buffer ... >

Endpoint Generate Exemple:

ameApi.generate("glitch", {
    "url" : "https://cdn.discordapp.com/avatars/450352584302002186/c0ff7e943ab89560503b8e99591ff888.png?size=2048"
}).then(image => {
    console.log(image)
}).catch(err => {
    throw err;
})

Returns

<Buffer ... >

Endpoint Image Exemple:

ameApi.image("wallpaper", {
    "nsfw" : "false"
}).then(image => {
    console.log(image)
}).catch(err => {
    throw err;
});

Returns

{
  "status": 200,
  "url": "https://cdn.amethyste.moe/wallpaper/14ebdfb3f9a9e4025b54ab759f1ad9e60bd0.jpg"
}

Package Sidebar

Install

npm i amethyste-api

Weekly Downloads

1,017

Version

1.1.6

License

MIT

Unpacked Size

6.61 kB

Total Files

5

Last publish

Collaborators

  • jorisvideo
  • meatreed