glitch-javascript-sdk 0.5.0 → 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.
@@ -94,6 +94,39 @@ declare class Events {
94
94
  * @returns promise
95
95
  */
96
96
  static removeRTMPSource<T>(event_id: string, stream_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
97
+ /**
98
+ * Add a Twitch Stream to the current event. The user must have authenticatd with Twitch.
99
+ *
100
+ * @see https://api.glitch.fun/api/documentation#/Event%20Route/addRTMPSource
101
+ *
102
+ * @param event_id The id of the event.
103
+ * @param data The data to be passed when adding an RTMP source.
104
+ *
105
+ * @returns promise
106
+ */
107
+ static addTwitchMulticast<T>(event_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
108
+ /**
109
+ * Add a Facebook Stream to the current event. The user must have authenticatd with Facebook.
110
+ *
111
+ * @see https://api.glitch.fun/api/documentation#/Event%20Route/addRTMPSource
112
+ *
113
+ * @param event_id The id of the event.
114
+ * @param data The data to be passed when adding an RTMP source.
115
+ *
116
+ * @returns promise
117
+ */
118
+ static addFacebookMulticast<T>(event_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
119
+ /**
120
+ * Add a Youtube Stream to the current event. The user must have authenticatd with Google.
121
+ *
122
+ * @see https://api.glitch.fun/api/documentation#/Event%20Route/addRTMPSource
123
+ *
124
+ * @param event_id The id of the event.
125
+ * @param data The data to be passed when adding an RTMP source.
126
+ *
127
+ * @returns promise
128
+ */
129
+ static addYoutubeMulticast<T>(event_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
97
130
  /**
98
131
  * A function that should be run on an interval to set the event as live when the live stream is active.
99
132
  *
@@ -16,6 +16,14 @@ declare class TipPackagePurchases {
16
16
  *
17
17
  * @returns A promise
18
18
  */
19
- static stripePaymentIntent<T>(data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
19
+ static getStripePaymentIntent<T>(data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
20
+ /**
21
+ * Process the stripe payment intent after payment is complete.
22
+ *
23
+ * @see https://api.glitch.fun/api/documentation#/Authentication%20Route/authLogin
24
+ *
25
+ * @returns A promise
26
+ */
27
+ static processStripePaymentIntent<T>(data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
20
28
  }
21
29
  export default TipPackagePurchases;
package/dist/esm/index.js CHANGED
@@ -31504,7 +31504,10 @@ var EventsRoutes = /** @class */ (function () {
31504
31504
  enableDonations: { url: '/events/{event_id}/enableDonations', method: HTTP_METHODS.POST },
31505
31505
  disableDonations: { url: '/events/{event_id}/disableDonations', method: HTTP_METHODS.POST },
31506
31506
  sendInvite: { url: '/events/{event_id}/sendInvite', method: HTTP_METHODS.POST },
31507
- acceptInvite: { url: '/events/{event_id}/acceptInvite', method: HTTP_METHODS.POST }
31507
+ acceptInvite: { url: '/events/{event_id}/acceptInvite', method: HTTP_METHODS.POST },
31508
+ addTwitchMulticast: { url: '/events/{event_id}/addTwitchMulticast', method: HTTP_METHODS.POST },
31509
+ addFacebookMulticast: { url: '/events/{event_id}/addFacebookMulticast', method: HTTP_METHODS.POST },
31510
+ addYoutubeMulticast: { url: '/events/{event_id}/addYoutubeMulticast', method: HTTP_METHODS.POST },
31508
31511
  };
31509
31512
  return EventsRoutes;
31510
31513
  }());
@@ -31632,6 +31635,45 @@ var Events = /** @class */ (function () {
31632
31635
  Events.removeRTMPSource = function (event_id, stream_id, data, params) {
31633
31636
  return Requests.processRoute(EventsRoutes.routes.removeRTMPSource, data, { event_id: event_id, subid: stream_id }, params);
31634
31637
  };
31638
+ /**
31639
+ * Add a Twitch Stream to the current event. The user must have authenticatd with Twitch.
31640
+ *
31641
+ * @see https://api.glitch.fun/api/documentation#/Event%20Route/addRTMPSource
31642
+ *
31643
+ * @param event_id The id of the event.
31644
+ * @param data The data to be passed when adding an RTMP source.
31645
+ *
31646
+ * @returns promise
31647
+ */
31648
+ Events.addTwitchMulticast = function (event_id, data, params) {
31649
+ return Requests.processRoute(EventsRoutes.routes.addTwitchMulticast, data, { event_id: event_id }, params);
31650
+ };
31651
+ /**
31652
+ * Add a Facebook Stream to the current event. The user must have authenticatd with Facebook.
31653
+ *
31654
+ * @see https://api.glitch.fun/api/documentation#/Event%20Route/addRTMPSource
31655
+ *
31656
+ * @param event_id The id of the event.
31657
+ * @param data The data to be passed when adding an RTMP source.
31658
+ *
31659
+ * @returns promise
31660
+ */
31661
+ Events.addFacebookMulticast = function (event_id, data, params) {
31662
+ return Requests.processRoute(EventsRoutes.routes.addFacebookMulticast, data, { event_id: event_id }, params);
31663
+ };
31664
+ /**
31665
+ * Add a Youtube Stream to the current event. The user must have authenticatd with Google.
31666
+ *
31667
+ * @see https://api.glitch.fun/api/documentation#/Event%20Route/addRTMPSource
31668
+ *
31669
+ * @param event_id The id of the event.
31670
+ * @param data The data to be passed when adding an RTMP source.
31671
+ *
31672
+ * @returns promise
31673
+ */
31674
+ Events.addYoutubeMulticast = function (event_id, data, params) {
31675
+ return Requests.processRoute(EventsRoutes.routes.addYoutubeMulticast, data, { event_id: event_id }, params);
31676
+ };
31635
31677
  /**
31636
31678
  * A function that should be run on an interval to set the event as live when the live stream is active.
31637
31679
  *
@@ -32627,7 +32669,8 @@ var TipPackagePurchaseRoute = /** @class */ (function () {
32627
32669
  }
32628
32670
  TipPackagePurchaseRoute.routes = {
32629
32671
  stripe: { url: '/tipspackagepurchases/stripe', method: HTTP_METHODS.POST },
32630
- stripePaymentIntent: { url: '/tipspackagepurchases/stripepaymentintent', method: HTTP_METHODS.POST },
32672
+ getStripePaymentIntent: { url: '/tipspackagepurchases/getstripepaymentintent', method: HTTP_METHODS.POST },
32673
+ processStripePaymentIntent: { url: '/tipspackagepurchases/processstripepaymentintent', method: HTTP_METHODS.POST },
32631
32674
  };
32632
32675
  return TipPackagePurchaseRoute;
32633
32676
  }());
@@ -32652,8 +32695,18 @@ var TipPackagePurchases = /** @class */ (function () {
32652
32695
  *
32653
32696
  * @returns A promise
32654
32697
  */
32655
- TipPackagePurchases.stripePaymentIntent = function (data, params) {
32656
- return Requests.processRoute(TipPackagePurchaseRoute.routes.stripePaymentIntent, data, {}, params);
32698
+ TipPackagePurchases.getStripePaymentIntent = function (data, params) {
32699
+ return Requests.processRoute(TipPackagePurchaseRoute.routes.getStripePaymentIntent, data, {}, params);
32700
+ };
32701
+ /**
32702
+ * Process the stripe payment intent after payment is complete.
32703
+ *
32704
+ * @see https://api.glitch.fun/api/documentation#/Authentication%20Route/authLogin
32705
+ *
32706
+ * @returns A promise
32707
+ */
32708
+ TipPackagePurchases.processStripePaymentIntent = function (data, params) {
32709
+ return Requests.processRoute(TipPackagePurchaseRoute.routes.processStripePaymentIntent, data, {}, params);
32657
32710
  };
32658
32711
  return TipPackagePurchases;
32659
32712
  }());