zenzo-sdk-nodejs
Advanced tools
Comparing version 1.0.0 to 1.1.0
20
index.js
@@ -32,2 +32,22 @@ const req = require('requestify') | ||
exports.account = async function () { | ||
if (authKey === "") throw 'Authentication is required prior to making API requests' | ||
try { | ||
var result = await req.request(basePublicUrl + 'account', { | ||
method: 'POST', | ||
body: { | ||
api_key: authKey | ||
} | ||
}) | ||
result = JSON.parse(result.body) | ||
return result | ||
} catch (err) { | ||
if (err.body) { | ||
throw 'ZENZO SDK Error caught: (' + err.body + ')' | ||
} else { | ||
throw 'ZENZO SDK Error caught: (' + err + ')' | ||
} | ||
} | ||
} | ||
exports.forgetransfer = async function (reqItem, reqReceiver) { | ||
@@ -34,0 +54,0 @@ if (authKey === "") throw 'Authentication is required prior to making API requests' |
{ | ||
"name": "zenzo-sdk-nodejs", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "The ZENZO SDK for Node.js", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
12914
12
222