@sharkfincode/easyapis

2.0.3 • Public • Published

Easy APIs

About

This package allows for easy access to the all of the APIs available on Easy APIs.

-

Use

Easy APIs wants you to be able to use APIs very easily, so there are multiple ways of using one API.

const easyapis = require('easyapis'); // Require the package

const api = new easyapis.cowsay(); // Create a new connection to Cowsay
Object.assign(api, {
    text: 'Hello, World!',
    type: 'dragon',
    eyes: '$',
    mouth: '-'
});

api.request().then(res => { // Request the data
    if (res.statusCode === 200) console.log(res.body); // Log the results
    console.log(res.help); // Logs the link to the docs page about the API in use
});

Or

const easyapis = require('easyapis'); // Require the package

const api = new easyapis.cowsay('Hello, World!', 'dragon', '$', '-'); // Create a new connection to Cowsay

api.request().then(res => { // Request the data
    if (res.statusCode === 200) console.log(res.body); // Log the results
    console.log(res.help); // Logs the link to the docs page about the API in use
});

Readme

Keywords

Package Sidebar

Install

npm i @sharkfincode/easyapis

Weekly Downloads

2

Version

2.0.3

License

ISC

Unpacked Size

3.33 kB

Total Files

4

Last publish

Collaborators

  • sharkfincode