awtrix-ts 1.2.1 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -224,6 +224,14 @@ await setTimeout(2000);
224
224
  await awtrix.previousApp();
225
225
  ```
226
226
 
227
+ #### deleteApp(name: string)
228
+
229
+ Delete a custom app.
230
+
231
+ ```typescript
232
+ await clock.deleteApp('myApp');
233
+ ```
234
+
227
235
  #### Progress Bar Example
228
236
 
229
237
  Display a progress bar using a custom app:
@@ -272,7 +280,3 @@ await clock.notify({
272
280
 
273
281
  - All API calls are asynchronous and return Promises.
274
282
  - The class exposes enums for transitions, indicators, and effects for convenience.
275
-
276
- ```
277
-
278
- ```
package/dist/index.d.ts CHANGED
@@ -79,6 +79,7 @@ declare class Awtrix {
79
79
  launchApp(name: string): Promise<void>;
80
80
  nextApp(): Promise<void>;
81
81
  previousApp(): Promise<void>;
82
+ deleteApp(name: string): Promise<void>;
82
83
  get(endpoint: string): Promise<any>;
83
84
  post(endpoint: string, data?: object): Promise<void>;
84
85
  }
package/dist/index.js CHANGED
@@ -133,6 +133,9 @@ class Awtrix {
133
133
  async previousApp() {
134
134
  await this.post('previousapp');
135
135
  }
136
+ async deleteApp(name) {
137
+ await this.post(`custom?name=${name}`);
138
+ }
136
139
  async get(endpoint) {
137
140
  const response = await fetch(`${this.url}/${endpoint}`);
138
141
  const data = await response.json();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "awtrix-ts",
3
- "version": "1.2.1",
3
+ "version": "1.3.0",
4
4
  "description": "TypeScript API for Awtrix LED Matrix Display",
5
5
  "repository": {
6
6
  "type": "git",