This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

api-generator

1.1.3 • Public • Published

API Generator

An API generation library for NodeJS.

Dependencies Build Status Downloads NPM version Maintainability Known Vulnerabilities

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);
// => { fetchGithubApiEndpoints: { GET: [Function] } }

Tests

Coming soon...

$ npm test

Note: This requires mocha, should, and underscore.

Features

  • Automatic API Generation
  • Easily extensible
  • Simplifies repeated API generation

Package Sidebar

Install

npm i api-generator

Weekly Downloads

3

Version

1.1.3

License

MIT

Unpacked Size

5.42 kB

Total Files

4

Last publish

Collaborators

  • mrodrig