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/index.d.ts CHANGED
@@ -1077,6 +1077,39 @@ declare class Events {
1077
1077
  * @returns promise
1078
1078
  */
1079
1079
  static removeRTMPSource<T>(event_id: string, stream_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
1080
+ /**
1081
+ * Add a Twitch Stream to the current event. The user must have authenticatd with Twitch.
1082
+ *
1083
+ * @see https://api.glitch.fun/api/documentation#/Event%20Route/addRTMPSource
1084
+ *
1085
+ * @param event_id The id of the event.
1086
+ * @param data The data to be passed when adding an RTMP source.
1087
+ *
1088
+ * @returns promise
1089
+ */
1090
+ static addTwitchMulticast<T>(event_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
1091
+ /**
1092
+ * Add a Facebook Stream to the current event. The user must have authenticatd with Facebook.
1093
+ *
1094
+ * @see https://api.glitch.fun/api/documentation#/Event%20Route/addRTMPSource
1095
+ *
1096
+ * @param event_id The id of the event.
1097
+ * @param data The data to be passed when adding an RTMP source.
1098
+ *
1099
+ * @returns promise
1100
+ */
1101
+ static addFacebookMulticast<T>(event_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
1102
+ /**
1103
+ * Add a Youtube Stream to the current event. The user must have authenticatd with Google.
1104
+ *
1105
+ * @see https://api.glitch.fun/api/documentation#/Event%20Route/addRTMPSource
1106
+ *
1107
+ * @param event_id The id of the event.
1108
+ * @param data The data to be passed when adding an RTMP source.
1109
+ *
1110
+ * @returns promise
1111
+ */
1112
+ static addYoutubeMulticast<T>(event_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
1080
1113
  /**
1081
1114
  * A function that should be run on an interval to set the event as live when the live stream is active.
1082
1115
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glitch-javascript-sdk",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
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
@@ -134,6 +134,51 @@ class Events {
134
134
  return Requests.processRoute(EventsRoutes.routes.removeRTMPSource, data, { event_id: event_id, subid: stream_id }, params);
135
135
  }
136
136
 
137
+ /**
138
+ * Add a Twitch Stream to the current event. The user must have authenticatd with Twitch.
139
+ *
140
+ * @see https://api.glitch.fun/api/documentation#/Event%20Route/addRTMPSource
141
+ *
142
+ * @param event_id The id of the event.
143
+ * @param data The data to be passed when adding an RTMP source.
144
+ *
145
+ * @returns promise
146
+ */
147
+ public static addTwitchMulticast<T>(event_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
148
+
149
+ return Requests.processRoute(EventsRoutes.routes.addTwitchMulticast, data, { event_id: event_id }, params);
150
+ }
151
+
152
+ /**
153
+ * Add a Facebook Stream to the current event. The user must have authenticatd with Facebook.
154
+ *
155
+ * @see https://api.glitch.fun/api/documentation#/Event%20Route/addRTMPSource
156
+ *
157
+ * @param event_id The id of the event.
158
+ * @param data The data to be passed when adding an RTMP source.
159
+ *
160
+ * @returns promise
161
+ */
162
+ public static addFacebookMulticast<T>(event_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
163
+
164
+ return Requests.processRoute(EventsRoutes.routes.addFacebookMulticast, data, { event_id: event_id }, params);
165
+ }
166
+
167
+ /**
168
+ * Add a Youtube Stream to the current event. The user must have authenticatd with Google.
169
+ *
170
+ * @see https://api.glitch.fun/api/documentation#/Event%20Route/addRTMPSource
171
+ *
172
+ * @param event_id The id of the event.
173
+ * @param data The data to be passed when adding an RTMP source.
174
+ *
175
+ * @returns promise
176
+ */
177
+ public static addYoutubeMulticast<T>(event_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
178
+
179
+ return Requests.processRoute(EventsRoutes.routes.addYoutubeMulticast, data, { event_id: event_id }, params);
180
+ }
181
+
137
182
  /**
138
183
  * A function that should be run on an interval to set the event as live when the live stream is active.
139
184
  *
@@ -26,7 +26,12 @@ class EventsRoutes {
26
26
  enableDonations : {url : '/events/{event_id}/enableDonations', method: HTTP_METHODS.POST},
27
27
  disableDonations : {url : '/events/{event_id}/disableDonations', method : HTTP_METHODS.POST},
28
28
  sendInvite : {url : '/events/{event_id}/sendInvite', method : HTTP_METHODS.POST},
29
- acceptInvite : {url : '/events/{event_id}/acceptInvite', method : HTTP_METHODS.POST}
29
+ acceptInvite : {url : '/events/{event_id}/acceptInvite', method : HTTP_METHODS.POST},
30
+ addTwitchMulticast : {url : '/events/{event_id}/addTwitchMulticast', method : HTTP_METHODS.POST},
31
+ addFacebookMulticast : {url : '/events/{event_id}/addFacebookMulticast', method : HTTP_METHODS.POST},
32
+ addYoutubeMulticast : {url : '/events/{event_id}/addYoutubeMulticast', method : HTTP_METHODS.POST},
33
+
34
+
30
35
 
31
36
  };
32
37