leoapi.xyz
v1.3.0
Published
Use the Leo API with ease
Downloads
13
Maintainers
Readme
Leo API Wrapper
This wrapper utilises leoapi
How to install
npm install leoapi.xyz
or
yarn add leoapi.xyz
Support
If you want any support for this package head on over to our discord server
To use this wrapper you must type in the functions...
const API = require('leoapi.xyz')
const leo = new API()
//for image endpoints
leo.image('<endpoint>', {
'<param>': '<value>'
})
//for data endpoints
leo.data('<endpoint>', {
'<param>': '<value>'
}).then(data => console.log(data))
//for text endpoints
leo.text('<endpoint>', {
'<param>': '<value>'
}).then(data => console.log(data))
//for fun endpoints
leo.fun('<endpoint>', {
'<param>': '<value>'
}).then(data => console.log(data))
Create Code Bin With https://code.leoapi.xyz
const API = require('leoapi.xyz')
const leo = new API()
leo.code({
title: "this my code-bin",
description: "Easy Hello World",
code: `console.log("Hello World")`,
token: "get yours by going to https://leoapi.xyz/discord"
}).then(data => console.log(data))
Examples
const API = require('leoapi.xyz')
const leo = new API()
//image commands
leo.image("delete", {
image: "https://cdn.discordapp.com/avatars/538668078012039168/baeefb053a81c10dc2942a30a26f805d.png?size=256"
}).then((image) => {
<Message || Interaction>.<Send || followUp>({ files: [image]})
})
//data commands
leo.data("npm", {
package: "leoapi.xyz"
}).then((data) => {
<Message || Interaction>.<Send || followUp>({ content: [data]})
})