Cheweybot-api-wrapper
A simply wrapper for https://api.chewey-bot.ga api
Installation
npm i cheweybot-api-wrapper
How to get token
- Join discord server
- Ran command in commands channel
!role-me api-user
- DM Chewey Bot and ran
!claim-api-key
If you couldn't DM not the bot please check your privacy settings
How to use
let cheweybotapi = cheweybotapi; //It must be once in all your code cheweybotapiimage /*[ 'space', 'cat', 'dog', 'birb', 'nature', 'fantasy-art', 'plane', 'otter', 'rabbit', 'snake', 'car', 'turtle', 'duck', 'panda', 'wolf', 'fox' ]*/ api apianalytics
or
let cheweybotapi = cheweybotapiimage api apianalytics
Usage
Call this module
let cheweybotapi =
List of feature
Text between []
is not require
Main usage
cheweybotapi.login(token) : Note if using this, '[,token]' in calling function is not require
cheweybotapi.image.get(url[,token])
cheweybotapi.mc(ip[,token])
cheweybotapi.analytics.init(lib, ownerid[,token])
Other Function
cheweybotapi.analytics.stop() : Disabled analytics autoposting
cheweybotapi.analytics.start() : Enabled analytics autoposting
Response
All endpoints respond
//Image and MCdata:'your-image'
Error
Each error is specified
Exemple Error:
Noendpointfind: name: 'Noendpointfind' //Name of this error message: 'No endpoint find' // description of this error status: '0x00404' //Error code (for all error codes, it is below)
Endpoint
Image
space,cat,dog,bird,nature,fantasy-art,plane,otter,rabbit,snake,car,turtle,duck,panda,wolf,fox
MC API
Analytics
Link
Credit
Thanks to Chewey#1635 for accepting the creation of this module
Notes
Error Code
Error codes | Signification |
---|---|
0x00001 | No token specified |
0x00002 | No endpoint specified |
0x00403 | Incorrect login |
0x02403 | Incorrect lib |
0x00404 | No endpoint find |
0x01404 | No IP specified |
0x02404 | No lib specified (discord.js or eris) |
0x03404 | No owner ID specified |