ASR/miniprogram/vendor/wafer2-client-sdk/index.js

26 lines
633 B
JavaScript
Raw Permalink Normal View History

2020-08-31 16:55:41 +00:00
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];
}
});