# simply-api.js

> API Wrapper for simplyapi.js.org

Latest version **2.1.0** (published 2023-07-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install simply-api.js
pnpm add simply-api.js
yarn add simply-api.js
bun add simply-api.js
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.0 |
| Published | 2023-07-15 |
| First published | 2022-08-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=16.17.0 |
| Dependencies | 0 |
| Unpacked size | 9.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Abadima |
| Maintainers | abadima |
| Keywords | ai, api, chatbot, grammar, nsfw, simple, spelling, tictactoe, tic tac toe, toxicity, wrapper |

## Links

- npm: https://www.npmjs.com/package/simply-api.js
- Repository: https://github.com/Abadima/simply-api
- Homepage: https://simplyapi.js.org
- Issues: https://github.com/Abadima/simply-api/issues
- npm.io page: https://npm.io/package/simply-api.js

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 2.1.0 (latest) — 2023-07-15
- 1.3.0 (legacy) — 2023-07-15
- 2.0.0-dev-5 (dev) — 2023-01-17
- 2.0.2 — 2023-03-06
- 2.0.1 — 2023-03-06
- 2.0.0 — 2023-01-18
- 1.2.0 — 2023-01-18
- 2.0.0-dev-4 — 2023-01-17
- 2.0.0-dev-3 — 2022-09-04
- 1.1.1 — 2022-09-04
- 1.0.0 — 2022-08-21

## README

<h1 style="font-size:2.5rem; text-align: center;">Simply-API</h1>

<div class="badges" style="text-align: center;">

[![CodeFactor](https://www.codefactor.io/repository/github/abadima/simply-api.js/badge?style=for-the-badge)](https://www.codefactor.io/repository/github/abadima/simply-api.js)
[![NodeJS](https://img.shields.io/badge/Node.js-%20>=16-green.svg?style=for-the-badge&logo=Node.js)](https://nodejs.org/en/download/)
[![Support Server](https://img.shields.io/discord/867999056172052551.svg?label=Support&logo=Discord&colorB=7289da&style=for-the-badge)](https://discord.gg/3JzDV9T5Fn)
</div>

## <img alt="Download" width="28px" src="https://cdn.onlinewebfonts.com/svg/img_250767.png" /> Download Package

```shell
npm install simply-api.js@latest
```

(or)

```shell
yarn add simply-api.js@latest
```

(or)

```shell
pnpm add simply-api.js@latest
```

## <img alt="Download" width="22px" src="https://icon-library.com/images/book-icon/book-icon-28.jpg" /> Endpoints

| Endpoint                           | Description                                                 |
|------------------------------------|-------------------------------------------------------------|
| chatbot(msg, {options})            | Chat with [Chat Bot](https://simplyapi.js.org/docs/chatbot) |
| tictactoe(uid, ai, board)          | AI Game of Tic-Tac-Toe                                      |
| toxicity(text)                     | Detect Toxic messages                                       |
| get(string, boolean)               | [Custom Get Request](https://simplyapi.js.org/docs)         |
| post(string, requestBody, boolean) | [Custom Post Request](https://simplyapi.js.org/docs)        |

## <img alt="Download" width="22px" src="http://cdn.onlinewebfonts.com/svg/img_28937.png" /> Example Usages

### Chatbot

```ts
import {chatbot} from "simply-api.js";

let data = await chatbot("Test Run by Simply-API.js", {uid: 69});
console.log(data) // returns JSON result
```

### Tic-Tac-Toe

```ts
import {tictactoe} from "simply-api.js";

const uid = 123, ai = "o";
const board = [
    " ", " ", " ",
    " ", "x", " ",
    " ", " ", " "
];

let data = await tictactoe(uid, ai, board);
console.log(data) // returns JSON result
```

### Toxicity

```ts
import {toxicity} from "simply-api.js";

const text = " *Insert offensive text here * ";

let data = await toxicity(text);
console.log(data) // returns JSON result
```

### Custom Requests

```ts
import {get, post} from "simply-api.js";

const uid = 123, ai = "o";
const array = [
    " ", " ", " ",
    " ", "x", " ",
    " ", " ", " "
];

const board = JSON.stringify({"board": array});

let getData = await get("/api/grammar?text=get gud").catch(e => error);
let postData = await post("/api/tictactoe?uid=123&ai=o", board).catch(e => error);
console.log(getData, postData)
```

### Alternative Methods

```ts
const URL = "https://i.pinimg.com/originals/ce/a7/21/cea7210bf2974d4085d09b53f782ea74.jpg";
const text = " *Insert offensive text here * ";
import simplyapi from "simply-api.js";

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
```

---
_Source: https://npm.io/package/simply-api.js · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
