aakhilv

1.1.0 • Public • Published

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

Category Endpoint
fun fun/facts
fun fun/puzzles
fun fun/wyr
bio bio/terms

Package Sidebar

Install

npm i aakhilv

Weekly Downloads

1

Version

1.1.0

License

ISC

Unpacked Size

9.9 kB

Total Files

7

Last publish

Collaborators

  • aakhilv