UNPKG

huawei-wingle-4g

Version:

This is a module NodeJS allowing to drive Huawei Wingle 4G. This module can :

46 lines 1.57 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.HuaweiWingle4G = void 0; const Home_1 = require("./page/home/Home"); const Sms_1 = require("./page/sms/Sms"); const Statistics_1 = require("./page/statistics/Statistics"); const Ussd_1 = require("./page/ussd/Ussd"); const Connection_1 = __importDefault(require("./connection/Connection")); const Login_1 = __importDefault(require("./connection/Login")); class HuaweiWingle4G { constructor(username, password, host = HuaweiWingle4G.getDefaultHost()) { const connection = new Connection_1.default(`http://${host}`); const login = new Login_1.default(username, password, connection); this.home = new Home_1.Home(login); this.sms = new Sms_1.Sms(login); this.statistics = new Statistics_1.Statistics(login); this.ussd = new Ussd_1.Ussd(login); } activeLog(activeLog) { this.home.activeLog(activeLog); this.sms.activeLog(activeLog); this.statistics.activeLog(activeLog); this.ussd.activeLog(activeLog); } getHome() { return this.home; } getSms() { return this.sms; } getStatistics() { return this.statistics; } getUssd() { return this.ussd; } static getDefaultHost() { return '192.168.8.1'; } } exports.HuaweiWingle4G = HuaweiWingle4G; ; //# sourceMappingURL=index.js.map