Skip to content

Making API queries to Simply-API is made simpler by this JS wrapper.

License

Notifications You must be signed in to change notification settings

Abadima/simply-api.js

Repository files navigation

Simply-API

CodeFactor NodeJS Support Server

Download Download Package

npm install simply-api.js@legacy

(or)

yarn add simply-api.js@legacy

(or)

pnpm add simply-api.js

Download Endpoints

Endpoint Description
chatbot(msg, {options}) Chat with Chat Bot
tictactoe(uid, ai, board) AI Game of Tic-Tac-Toe
toxicity(text) Detect Toxic messages

Download Example Usages

Chatbot

const {chatbot} = require("simply-api");

let data = await chatbot("Test Run by Simply-API.js", {uid: 69});
console.log(data) // returns JSON result

Tic-Tac-Toe

const {tictactoe} = require("simply-api");
const uid = 123, ai = "o";
const board = [
	" ", " ", " ",
	" ", "x", " ",
	" ", " ", " "
];

let data = await tictactoe(uid, ai, board);
console.log(data) // returns JSON result

Toxicity

const {toxicity} = require("simply-api");
const text = " *Insert offensive text here* ";

let data = await toxicity(text);
console.log(data) // returns JSON result

Alternative Methods

const text = " *Insert offensive text here* ";
var simplyapi = require("simply-api");
const uid = 123, ai = "o";
const board = [
	" ", " ", " ",
	" ", "x", " ",
	" ", " ", " "
];

simplyapi.chatbot("Hello!").then(data => {
	console.log(data) // returns JSON result
}); // Chat Bot AI

simplyapi.tictactoe(uid, ai, board).then(data => {
	console.log() // Returns Array Result
});

simplyapi.toxicity(text).then(data => {
	console.log(data) // returns JSON result
}); // Toxicity Detection

About

Making API queries to Simply-API is made simpler by this JS wrapper.

Topics

Resources

License

Stars

Watchers

Forks