https://github.com/toxblh/keenetic-control
https://github.com/toxblh/keenetic-control
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/toxblh/keenetic-control
- Owner: Toxblh
- Created: 2024-04-07T21:51:43.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2025-05-27T12:00:02.000Z (about 1 year ago)
- Last Synced: 2025-10-05T17:37:42.163Z (10 months ago)
- Language: TypeScript
- Size: 54.7 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Keenetic API library
[](https://www.npmjs.com/package/keenetic-control)
[](https://www.npmjs.com/package/keenetic-control)
[](https://www.npmjs.com/package/keenetic-control)
[](https://www.npmjs.com/package/keenetic-control)
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=WUAAG2HH58WE4)
[](https://www.patreon.com/toxblh)
[](https://boosty.to/toxblh)
## Installation
`npm install keenetic-control --save`
## Usage
You can try [example code](example.ts)
Once the new instance is initialized, authenticate and then you can use `keenRequest`
```js
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");
}
});
```