Skip to content

Commit

Permalink
wifi scanning added
Browse files Browse the repository at this point in the history
  • Loading branch information
foomoon committed Feb 8, 2024
1 parent 3873f64 commit 71ee959
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 2 deletions.
12 changes: 11 additions & 1 deletion dist/lib/light.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ export declare class Light {
*
* @returns response from device
*/
getSummary(): Promise<any>;
getSummary(): Promise<object>;
/**
* Get the current movie
*
Expand All @@ -304,6 +304,16 @@ export declare class Light {
* @returns
*/
setNetworkStatus(status: object): Promise<object>;
/**
*
* @returns
*/
scanWifi(): Promise<object>;
/**
*
* @returns
*/
getWifiResults(): Promise<object>;
}
/**
* Represents an authentication token used to login to an xled instance
Expand Down
20 changes: 20 additions & 0 deletions dist/lib/light.js
Original file line number Diff line number Diff line change
Expand Up @@ -724,6 +724,26 @@ export class Light {
return res;
});
}
/**
*
* @returns
*/
scanWifi() {
return __awaiter(this, void 0, void 0, function* () {
let res = yield this.sendGetRequest("/network/scan", {});
return res;
});
}
/**
*
* @returns
*/
getWifiResults() {
return __awaiter(this, void 0, void 0, function* () {
let res = yield this.sendGetRequest("/network/scan_results", {});
return res;
});
}
}
/**
* Represents an authentication token used to login to an xled instance
Expand Down
20 changes: 19 additions & 1 deletion src/lib/light.ts
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ export class Light {
*
* @returns response from device
*/
async getSummary() {
async getSummary(): Promise<object> {
let res = await this.sendGetRequest("/summary", {});
return res;
}
Expand Down Expand Up @@ -690,6 +690,24 @@ export class Light {
let res = await this.sendPostRequest("/network/status", status);
return res;
}

/**
*
* @returns
*/
async scanWifi(): Promise<object> {
let res = await this.sendGetRequest("/network/scan", {});
return res;
}

/**
*
* @returns
*/
async getWifiResults(): Promise<object> {
let res = await this.sendGetRequest("/network/scan_results", {});
return res;
}
}

/**
Expand Down

0 comments on commit 71ee959

Please sign in to comment.