Socket
Socket
Sign inDemoInstall

api-generator

Package Overview
Dependencies
49
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    api-generator

An API generation library for NodeJS


Version published
Weekly downloads
14
increased by366.67%
Maintainers
1
Install size
5.16 MB
Created
Weekly downloads
 

Readme

Source

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

Keywords

FAQs

Last updated on 11 May 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc