UNPKG

node-firewalla

Version:

Package to talk your firewalla box & API

14 lines (13 loc) 517 B
import { FWGroupApi } from "../api/index.js"; import { FWGetMessage, FWCmdMessage } from "../models/index.js"; import { FWGroupService } from "./FWGroupService.js"; export class HostService extends FWGroupService { async getAll() { let msg = new FWGetMessage("hosts"); return FWGroupApi.sendMessageToBox(this.fwGroup, msg); } async wakeHost(mac) { let msg = new FWCmdMessage("wol:wake", {}, mac); return FWGroupApi.sendMessageToBox(this.fwGroup, msg); } }