keenetic-control
v1.0.1
Published
Library to easy access Keentic Router API
Downloads
15
Readme
Keenetic API library
Installation
npm install keenetic-control --save
Usage
You can try example code
Once the new instance is initialized, authenticate and then you can use keenRequest
import { KeeneticAPI } from "keenetic-control";
const config = {
ip: "192.168.1.1",
login: "admin",
pass: "pa$$word",
};
const keenetic = new KeeneticAPI(config.ip, config.login, config.pass);
keenetic.keenAuth().then((authenticated) => {
if (authenticated) {
keenetic
.keenRequest("rci/show/interface/WifiMaster0")
.then((response) => response.text())
.then((text) => console.log(text))
.catch((err) => console.error(err));
} else {
console.error("Authentication failed");
}
});