1.1.0 • Published 2 years ago

aakhilv v1.1.0

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

api.aakhilv.me

npm bundle size Snyk Vulnerabilities for npm package npm NPM npm

The official api wrapper for aakhilv's free-to-use API services.

https://api.aakhilv.me

Installation

npm install aakhilv

Importing

let aakhilv = require("aakhilv");

Usage

Requests are made in the format of:

aakhilv.get(string endpoint, num parameter);

Where string endpoint is a string value of any one of the available endpoints listed down below, and num parameter is an optional integer value defaulting to 1 if not specified.

// Without 'num' parameter
aakhilv.get("fun/facts").then(data => {
  console.log(data);
});

// With 'num' parameter
aakhilv.get("fun/facts", 3).then(data => {
  console.log(data);
});

/* For asynchronous functions */

// Without 'num' parameter
let data = await aakhilv.get("fun/facts");
console.log(data);

// With 'num' parameter
let data = await aakhilv.get("fun/facts", 3);
console.log(data);

Endpoints

CategoryEndpoint
funfun/facts
funfun/puzzles
funfun/wyr
biobio/terms