ASR/miniprogram/vendor/wafer2-client-sdk/index.js
Saturneric 73fc37e472 Add.
2020-09-01 00:55:41 +08:00

26 lines
633 B
JavaScript

var constants = require('./lib/constants');
var login = require('./lib/login');
var Session = require('./lib/session');
var request = require('./lib/request');
var Tunnel = require('./lib/tunnel');
var exports = module.exports = {
login: login.login,
loginWithCode: login.loginWithCode,
setLoginUrl: login.setLoginUrl,
Session,
clearSession: Session.clear,
request: request.request,
RequestError: request.RequestError,
Tunnel: Tunnel,
};
// 导出错误类型码
Object.keys(constants).forEach(function (key) {
if (key.indexOf('ERR_') === 0) {
exports[key] = constants[key];
}
});