UNPKG

@sharkfincode/easyapis

Version:

Easily use APIs from Easy APIs.

37 lines (31 loc) 1.39 kB
<!--<img src='./docs/images/Words.png'><br/> <img src='https://travis-ci.org/PlayBy/Socketry.svg?branch=master'> <img src='https://ci.appveyor.com/api/projects/status/lkhnwcrii036fphh?svg=true'> --> # [Easy APIs](https://easyapis.soue.ca/) ## About This package allows for easy access to the all of the APIs available on [Easy APIs](https://easyapis.soue.tk/). # - ## Use [Easy APIs](https://easyapis.soue.ca/) wants you to be able to use APIs very easily, so there are multiple ways of using one API.<br/> ```js 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 ```js 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 });