🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

api-generator

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

api-generator

An API generation library for NodeJS

1.1.3
latest
Source
npm
Version published
Maintainers
1
Created
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

api

FAQs

Package last updated on 11 May 2021

Did you know?

Socket

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