glitch-javascript-sdk 0.5.1 → 0.5.2
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/cjs/index.js +43 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Events.d.ts +33 -0
- package/dist/esm/index.js +43 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +33 -0
- package/package.json +1 -1
- package/src/api/Events.ts +45 -0
- package/src/routes/EventsRoute.ts +6 -1
package/dist/cjs/index.js
CHANGED
|
@@ -17282,7 +17282,10 @@ var EventsRoutes = /** @class */ (function () {
|
|
|
17282
17282
|
enableDonations: { url: '/events/{event_id}/enableDonations', method: HTTP_METHODS.POST },
|
|
17283
17283
|
disableDonations: { url: '/events/{event_id}/disableDonations', method: HTTP_METHODS.POST },
|
|
17284
17284
|
sendInvite: { url: '/events/{event_id}/sendInvite', method: HTTP_METHODS.POST },
|
|
17285
|
-
acceptInvite: { url: '/events/{event_id}/acceptInvite', method: HTTP_METHODS.POST }
|
|
17285
|
+
acceptInvite: { url: '/events/{event_id}/acceptInvite', method: HTTP_METHODS.POST },
|
|
17286
|
+
addTwitchMulticast: { url: '/events/{event_id}/addTwitchMulticast', method: HTTP_METHODS.POST },
|
|
17287
|
+
addFacebookMulticast: { url: '/events/{event_id}/addFacebookMulticast', method: HTTP_METHODS.POST },
|
|
17288
|
+
addYoutubeMulticast: { url: '/events/{event_id}/addYoutubeMulticast', method: HTTP_METHODS.POST },
|
|
17286
17289
|
};
|
|
17287
17290
|
return EventsRoutes;
|
|
17288
17291
|
}());
|
|
@@ -17410,6 +17413,45 @@ var Events = /** @class */ (function () {
|
|
|
17410
17413
|
Events.removeRTMPSource = function (event_id, stream_id, data, params) {
|
|
17411
17414
|
return Requests.processRoute(EventsRoutes.routes.removeRTMPSource, data, { event_id: event_id, subid: stream_id }, params);
|
|
17412
17415
|
};
|
|
17416
|
+
/**
|
|
17417
|
+
* Add a Twitch Stream to the current event. The user must have authenticatd with Twitch.
|
|
17418
|
+
*
|
|
17419
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/addRTMPSource
|
|
17420
|
+
*
|
|
17421
|
+
* @param event_id The id of the event.
|
|
17422
|
+
* @param data The data to be passed when adding an RTMP source.
|
|
17423
|
+
*
|
|
17424
|
+
* @returns promise
|
|
17425
|
+
*/
|
|
17426
|
+
Events.addTwitchMulticast = function (event_id, data, params) {
|
|
17427
|
+
return Requests.processRoute(EventsRoutes.routes.addTwitchMulticast, data, { event_id: event_id }, params);
|
|
17428
|
+
};
|
|
17429
|
+
/**
|
|
17430
|
+
* Add a Facebook Stream to the current event. The user must have authenticatd with Facebook.
|
|
17431
|
+
*
|
|
17432
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/addRTMPSource
|
|
17433
|
+
*
|
|
17434
|
+
* @param event_id The id of the event.
|
|
17435
|
+
* @param data The data to be passed when adding an RTMP source.
|
|
17436
|
+
*
|
|
17437
|
+
* @returns promise
|
|
17438
|
+
*/
|
|
17439
|
+
Events.addFacebookMulticast = function (event_id, data, params) {
|
|
17440
|
+
return Requests.processRoute(EventsRoutes.routes.addFacebookMulticast, data, { event_id: event_id }, params);
|
|
17441
|
+
};
|
|
17442
|
+
/**
|
|
17443
|
+
* Add a Youtube Stream to the current event. The user must have authenticatd with Google.
|
|
17444
|
+
*
|
|
17445
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/addRTMPSource
|
|
17446
|
+
*
|
|
17447
|
+
* @param event_id The id of the event.
|
|
17448
|
+
* @param data The data to be passed when adding an RTMP source.
|
|
17449
|
+
*
|
|
17450
|
+
* @returns promise
|
|
17451
|
+
*/
|
|
17452
|
+
Events.addYoutubeMulticast = function (event_id, data, params) {
|
|
17453
|
+
return Requests.processRoute(EventsRoutes.routes.addYoutubeMulticast, data, { event_id: event_id }, params);
|
|
17454
|
+
};
|
|
17413
17455
|
/**
|
|
17414
17456
|
* A function that should be run on an interval to set the event as live when the live stream is active.
|
|
17415
17457
|
*
|