Skip to content
This repository has been archived by the owner on Sep 13, 2022. It is now read-only.

Latest commit

 

History

History
48 lines (38 loc) · 1.38 KB

readme.md

File metadata and controls

48 lines (38 loc) · 1.38 KB

Sensu.js

Dependency Status license GitHub top language

Sensu.tips API library.

How to use

Install

npm install sensu.js

use

const sensu = require("sensu.js");
const sc = new sensu.Client("APIKEY");

sc.post(["balance","zny"],"z", (err, res, body) => {
    console.log(JSON.parse(body));
});
sc.post(sc.ssplit("balance zny"), "z", (err, res, body) => {
    console.log(JSON.parse(body));
});
sc.post(sc.ssplit("balance znyt"), "z", (err, res, body) => {
    if(res.statusCode !== 200) {
        console.log("Web Err!");
    }else {
        console.log(JSON.parse(body));
    }
});
{
  "status": "SUCCESS",
  "currency_name": "BitZeny",
  "balance": "0.00000000",
  "currency_code": "ZNY",
  "message": "あなたの BitZeny の残高は 0.00000000 ZNY です。"
}

TIPSENSU