1.0.2 • Published 8 years ago

node-gugu v1.0.2

Weekly downloads
4
License
ISC
Repository
github
Last release
8 years ago

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);
});
1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago