node-gugu

1.0.2 • Public • Published

node-gugu

咕咕机 SDK nodejs 封装。

打印内容暂时只支持文本

Install

npm install node-gugu

How to use

var gugu = require('node-gugu');
var printid;
 
// 初始化 gugu
gugu({
    ak: '{your ak}',
    memoid: '{memobirdid}',
    userid: '{useridentifying}'
}, function(data) {
    console.log('咕咕准备好啦。');
});
 
// ---------------------------------------
// 咕咕准备好后(setuserbind)可调用如下接口
// 或者在初始化回调中调用(参考 test.js)
// ---------------------------------------
 
// 打印内容
gugu.printpaper([
    'line one',
    'line two'
], function(data) {
    printid = data.printcontentid;
    console.log(data);
});
 
// 查看打印状态
gugu.getprintstatus(printid, function(data) {
    console.log(data);
});

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.2
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.2
    1
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i node-gugu

Weekly Downloads

1

Version

1.0.2

License

ISC

Last publish

Collaborators

  • dofy