🚀 Socket Launch Week 🚀 Day 5: Introducing Socket Fix.Learn More
Socket
Sign inDemoInstall
Socket

cheweybot-api-wrapper

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cheweybot-api-wrapper

A simply wrapper for cheweybot-api

1.1.8
latest
npm
Version published
Maintainers
1
Created
Source

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 = require('cheweybot-api-wrapper')

cheweybotapi.login(Token); //It must be once in all your code
    cheweybotapi.image.get('cat').then((res)=>{
        console.log(res)
    }).catch((err)=>{
        console.log(err)
    })

/*[ 'space',
    'cat',
    'dog',
    'birb',
    'nature',
    'fantasy-art',
    'plane',
    'otter',
    'rabbit',
    'snake',
    'car',
    'turtle',
    'duck',
    'panda',
    'wolf',
    'fox' ]
*/

api.mc('mc.hypixel.net').then((res)=>{
    console.log(res)
}).catch((err)=>{
    console.log(err)
})

api.analytics.init(client,'236627494764150784')

or

let cheweybotapi = require('cheweybot-api-wrapper')

cheweybotapi.image.get('cat', TOKEN).then((res)=>{
        console.log(res)
    }).catch((err)=>{
        console.log(err)
    })

api.mc('mc.hypixel.net', TOKEN).then((res)=>{
    console.log(res)
}).catch((err)=>{
    console.log(err)
})

api.analytics.init(client,'236627494764150784', TOKEN)

Usage

Call this module

let cheweybotapi = require('cheweybot-api-wrapper') 

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 MC
{data:'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


analytics


Support server, Website API

Credit

Thanks to Chewey#1635 for accepting the creation of this module

Notes

Error Code

Error codesSignification
0x00001No token specified
0x00002No endpoint specified
0x00403Incorrect login
0x02403Incorrect lib
0x00404No endpoint find
0x01404No IP specified
0x02404No lib specified (discord.js or eris)
0x03404No owner ID specified

Keywords

cheweybot-api

FAQs

Package last updated on 03 Jan 2020

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