Skip to main content
Version: 1.0.0

Eight-ball

/random/8ball?cute={true|false}

This route allows you to get a random 8ball answer. You can also get a cute 8ball answer by adding the cute query parameter.

Examples

Using the fetch API

fetch('https://nekonya.classydev.fr/api/v1/random/8ball')
.then((res) => res.json())
.then((data) => console.log(data)); // { answer: 'Yes' }

Using Axios

axios.get('https://nekonya.classydev.fr/api/v1/random/8ball')
.then((res) => console.log(res.data)); // { answer: 'Yes' }

Using the official client

const nekonya = require('nekonya.js');

nekonya.eightball().then((answer) => console.log(answer));

Response

The response is a JSON object with the following properties:

PropertyDescription
answerThe 8ball answer.