Wondering what’s next for npm?Check out our public roadmap! »

    api-generator

    1.1.2 • 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

    Install

    npm i api-generator

    DownloadsWeekly Downloads

    3

    Version

    1.1.2

    License

    MIT

    Unpacked Size

    5.42 kB

    Total Files

    4

    Last publish

    Collaborators

    • avatar