UNPKG

router-toolkit

Version:

A npm module for managing routers and access points

82 lines (81 loc) 1.97 kB
import Router from '../Common/Router'; export default class ZTEv9 extends Router { time: number; constructor(host: string, port: number, username: string, password: string); /** * Get the authorization cookie. * * @returns The cookie in a string format. */ private login; /** * Get the Router's SSIDs information. * * @returns An object conaining the JSON data. * * @example * ```ts * [ * { * enabled: true, * ssid: 'ZTE_2.4G_NKaehT', * authMode: 'PSKAuthentication', * encryption: 'TKIPandAESEncryption', * hidden: false, * passkey: 'HsojahudA', * maxUser: 32 * }, * ] * ``` */ getSSIDs(): Promise<{ enabled: boolean; ssid: any; authMode: any; encryption: any; hidden: boolean; passkey: string; maxUser: number; }[]>; /** * Get the Router's WLANs information. * * @returns An object conaining the JSON data. * * @example * ```ts * [ * { * frequency: '2.4GHz', * protocol: 'b,g,n', * channel: 1, * beaconInterval: 100, * txPower: 100, * band: 'Auto', * enabled: true * } * ] * ``` */ getWlans(): Promise<any>; getHosts(): Promise<{ time: string; hostname: any; ip: any; mac: any; vendor: string; signal: number; rxMbps: number; txMbps: number; protocol: any; }[]>; /** * Change SSID and Passkey of an Wi-Fi. * * @param num - The SSID number from 1 to 7 * @param ssid - The name you want for you SSID * @param ssid - The password you want for you SSID * @returns True if successful and false if error */ changeSSID(num: number, ssid: string, password: string): Promise<boolean>; }