glitch-javascript-sdk 0.5.3 → 0.5.4

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/dist/index.d.ts CHANGED
@@ -1330,6 +1330,29 @@ declare class Events {
1330
1330
  * @returns promise
1331
1331
  */
1332
1332
  static updateRecording<T>(event_id: string, recording_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
1333
+ /**
1334
+ * Enable a widget for the current event.
1335
+ *
1336
+ * @see https://api.glitch.fun/api/documentation#/Event%20Route/updateEventRecording
1337
+ *
1338
+ * @param event_id The id of the event to update.
1339
+ * @param widget_id The id of the widget to enable.
1340
+ * @param data The data, which should contain the roles.
1341
+ *
1342
+ * @returns promise
1343
+ */
1344
+ static enableWidget<T>(event_id: string, widget_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
1345
+ /**
1346
+ * Disable a widget for the current event.
1347
+ *
1348
+ * @see https://api.glitch.fun/api/documentation#/Event%20Route/updateEventRecording
1349
+ *
1350
+ * @param event_id The id of the event to update.
1351
+ * @param widget_id The id of the widget to disable.
1352
+ *
1353
+ * @returns promise
1354
+ */
1355
+ static disableWidget<T>(event_id: string, widget_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
1333
1356
  }
1334
1357
 
1335
1358
  declare class Teams {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glitch-javascript-sdk",
3
- "version": "0.5.3",
3
+ "version": "0.5.4",
4
4
  "description": "Javascript SDK for Glitch",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
package/src/api/Events.ts CHANGED
@@ -436,6 +436,38 @@ class Events {
436
436
  }
437
437
 
438
438
 
439
+ /**
440
+ * Enable a widget for the current event.
441
+ *
442
+ * @see https://api.glitch.fun/api/documentation#/Event%20Route/updateEventRecording
443
+ *
444
+ * @param event_id The id of the event to update.
445
+ * @param widget_id The id of the widget to enable.
446
+ * @param data The data, which should contain the roles.
447
+ *
448
+ * @returns promise
449
+ */
450
+ public static enableWidget<T>(event_id: string, widget_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
451
+
452
+ return Requests.processRoute(EventsRoutes.routes.enableWidget, data, { event_id: event_id, widget_id : widget_id }, params);
453
+ }
454
+
455
+ /**
456
+ * Disable a widget for the current event.
457
+ *
458
+ * @see https://api.glitch.fun/api/documentation#/Event%20Route/updateEventRecording
459
+ *
460
+ * @param event_id The id of the event to update.
461
+ * @param widget_id The id of the widget to disable.
462
+ *
463
+ * @returns promise
464
+ */
465
+ public static disableWidget<T>(event_id: string, widget_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
466
+
467
+ return Requests.processRoute(EventsRoutes.routes.disableWidget, data, { event_id: event_id, widget_id : widget_id }, params);
468
+ }
469
+
470
+
439
471
  }
440
472
 
441
473
  export default Events;
@@ -30,8 +30,8 @@ class EventsRoutes {
30
30
  addTwitchMulticast : {url : '/events/{event_id}/addTwitchMulticast', method : HTTP_METHODS.POST},
31
31
  addFacebookMulticast : {url : '/events/{event_id}/addFacebookMulticast', method : HTTP_METHODS.POST},
32
32
  addYoutubeMulticast : {url : '/events/{event_id}/addYoutubeMulticast', method : HTTP_METHODS.POST},
33
-
34
-
33
+ enableWidget : {url : '/events/{event_id}/enableWidget/{widget_id}', method : HTTP_METHODS.POST},
34
+ disableWidget : {url : '/events/{event_id}/disableWidget/{widget_id}', method : HTTP_METHODS.DELETE},
35
35
 
36
36
  };
37
37