API Generator
An API generation library for NodeJS.
Installation
$ npm install api-generator
Usage
let apiGen = require('api-generator');
let config = {
"name" : "fetchGithubApiEndpoints",
"type" : "REQUEST",
"methods" : [
{
"type" : "GET",
"url" : "https://api.github.com",
"callback": function (err, data) {
if (!err) {
console.log("Success!", data);
}
console.log("Error!", err);
}
}
]
};
let myApi = apiGen([config]);
console.log(myApi);
Tests
Coming soon...
$ npm test
Note: This requires mocha
, should
, and underscore
.
Features
- Automatic API Generation
- Easily extensible
- Simplifies repeated API generation