blocke-cli-api
Advanced tools
Comparing version 0.25.6 to 0.25.7
@@ -9,6 +9,16 @@ const commandLineArgData = require('../lib/command-line-arg-data-usage'); | ||
module.exports = { | ||
executeHandlerApi: function (coin, options, callback) { | ||
executeHandler(coin, options, callback); | ||
} | ||
} | ||
function executeHandler(coin, options, callback) { | ||
function executeHandler(handler, usage, callback) { | ||
var command = coin; | ||
shortHandCommand = command; | ||
const handler = new OptionRequestHandler(shortHandCommand, options); | ||
const usage = commandLineUsage(commandLineArgData[command].usage); | ||
handler.handleRequest().then((res) => { | ||
@@ -15,0 +25,0 @@ |
@@ -27,17 +27,3 @@ #! /usr/bin/env node | ||
const _ = require('underscore'); | ||
const blockApi = require('./blocke-api'); | ||
module.exports = { | ||
executeHandler: function (coin, options, callback) { | ||
var command = coin; | ||
shortHandCommand = command; | ||
const handler = new OptionRequestHandler(shortHandCommand, options); | ||
const usage = commandLineUsage(commandLineArgData[command].usage); | ||
return executeHandler(handler, usage, callback); | ||
} | ||
}; | ||
const validCommands = Object.keys(commandLineArgData).concat([null]); | ||
@@ -44,0 +30,0 @@ |
{ | ||
"name": "blocke-cli-api", | ||
"version": "0.25.6", | ||
"version": "0.25.7", | ||
"author": "edinaldofox <edinaldofox@gmail.com>", | ||
@@ -57,2 +57,3 @@ "description": "Command-line tool to query the blockchain for a variety of cryptos. View blocks, transactions, and accounts (where applicable).", | ||
"license": "GPL-3.0", | ||
"main": "bin/blocke-api.js", | ||
"bin": { | ||
@@ -59,0 +60,0 @@ "blocke": "bin/blocke.js" |
273163
56
5806