glitch-javascript-sdk 0.5.1 → 0.5.3
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 +109 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Events.d.ts +33 -0
- package/dist/esm/api/Users.d.ts +48 -0
- package/dist/esm/index.js +109 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +81 -0
- package/package.json +1 -1
- package/src/api/Events.ts +45 -0
- package/src/api/Users.ts +72 -0
- package/src/routes/EventsRoute.ts +6 -1
- package/src/routes/UserRoutes.ts +6 -0
package/dist/index.d.ts
CHANGED
|
@@ -981,6 +981,54 @@ declare class Users {
|
|
|
981
981
|
* @returns promise
|
|
982
982
|
*/
|
|
983
983
|
static createDonationPage<T>(): AxiosPromise<Response<T>>;
|
|
984
|
+
/**
|
|
985
|
+
* Clear Twitches authentication information from the current user.
|
|
986
|
+
*
|
|
987
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
988
|
+
*
|
|
989
|
+
* @returns promise
|
|
990
|
+
*/
|
|
991
|
+
static clearTwitchAuth<T>(): AxiosPromise<Response<T>>;
|
|
992
|
+
/**
|
|
993
|
+
* Clear Facebook authentication information from the current user.
|
|
994
|
+
*
|
|
995
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
996
|
+
*
|
|
997
|
+
* @returns promise
|
|
998
|
+
*/
|
|
999
|
+
static clearFacebookAuth<T>(): AxiosPromise<Response<T>>;
|
|
1000
|
+
/**
|
|
1001
|
+
* Clear Google authentication information from the current user.
|
|
1002
|
+
*
|
|
1003
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
1004
|
+
*
|
|
1005
|
+
* @returns promise
|
|
1006
|
+
*/
|
|
1007
|
+
static clearGoogleAuth<T>(): AxiosPromise<Response<T>>;
|
|
1008
|
+
/**
|
|
1009
|
+
* Clear Stripe authentication information from the current user.
|
|
1010
|
+
*
|
|
1011
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
1012
|
+
*
|
|
1013
|
+
* @returns promise
|
|
1014
|
+
*/
|
|
1015
|
+
static clearStripeAuth<T>(): AxiosPromise<Response<T>>;
|
|
1016
|
+
/**
|
|
1017
|
+
* Clear TikTok authentication information from the current user.
|
|
1018
|
+
*
|
|
1019
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
1020
|
+
*
|
|
1021
|
+
* @returns promise
|
|
1022
|
+
*/
|
|
1023
|
+
static clearTikTokAuth<T>(): AxiosPromise<Response<T>>;
|
|
1024
|
+
/**
|
|
1025
|
+
* Clear YouTube authentication information from the current user.
|
|
1026
|
+
*
|
|
1027
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
1028
|
+
*
|
|
1029
|
+
* @returns promise
|
|
1030
|
+
*/
|
|
1031
|
+
static clearYoutubeAuth<T>(): AxiosPromise<Response<T>>;
|
|
984
1032
|
}
|
|
985
1033
|
|
|
986
1034
|
declare class Events {
|
|
@@ -1077,6 +1125,39 @@ declare class Events {
|
|
|
1077
1125
|
* @returns promise
|
|
1078
1126
|
*/
|
|
1079
1127
|
static removeRTMPSource<T>(event_id: string, stream_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
1128
|
+
/**
|
|
1129
|
+
* Add a Twitch Stream to the current event. The user must have authenticatd with Twitch.
|
|
1130
|
+
*
|
|
1131
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/addRTMPSource
|
|
1132
|
+
*
|
|
1133
|
+
* @param event_id The id of the event.
|
|
1134
|
+
* @param data The data to be passed when adding an RTMP source.
|
|
1135
|
+
*
|
|
1136
|
+
* @returns promise
|
|
1137
|
+
*/
|
|
1138
|
+
static addTwitchMulticast<T>(event_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
1139
|
+
/**
|
|
1140
|
+
* Add a Facebook Stream to the current event. The user must have authenticatd with Facebook.
|
|
1141
|
+
*
|
|
1142
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/addRTMPSource
|
|
1143
|
+
*
|
|
1144
|
+
* @param event_id The id of the event.
|
|
1145
|
+
* @param data The data to be passed when adding an RTMP source.
|
|
1146
|
+
*
|
|
1147
|
+
* @returns promise
|
|
1148
|
+
*/
|
|
1149
|
+
static addFacebookMulticast<T>(event_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
1150
|
+
/**
|
|
1151
|
+
* Add a Youtube Stream to the current event. The user must have authenticatd with Google.
|
|
1152
|
+
*
|
|
1153
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/addRTMPSource
|
|
1154
|
+
*
|
|
1155
|
+
* @param event_id The id of the event.
|
|
1156
|
+
* @param data The data to be passed when adding an RTMP source.
|
|
1157
|
+
*
|
|
1158
|
+
* @returns promise
|
|
1159
|
+
*/
|
|
1160
|
+
static addYoutubeMulticast<T>(event_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
1080
1161
|
/**
|
|
1081
1162
|
* A function that should be run on an interval to set the event as live when the live stream is active.
|
|
1082
1163
|
*
|
package/package.json
CHANGED
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
|
*
|
package/src/api/Users.ts
CHANGED
|
@@ -159,6 +159,78 @@ class Users {
|
|
|
159
159
|
return Requests.processRoute(UserRoutes.routes.createDonationPage, {});
|
|
160
160
|
}
|
|
161
161
|
|
|
162
|
+
/**
|
|
163
|
+
* Clear Twitches authentication information from the current user.
|
|
164
|
+
*
|
|
165
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
166
|
+
*
|
|
167
|
+
* @returns promise
|
|
168
|
+
*/
|
|
169
|
+
public static clearTwitchAuth<T>(): AxiosPromise<Response<T>> {
|
|
170
|
+
|
|
171
|
+
return Requests.processRoute(UserRoutes.routes.clearTwitchAuth, {});
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Clear Facebook authentication information from the current user.
|
|
176
|
+
*
|
|
177
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
178
|
+
*
|
|
179
|
+
* @returns promise
|
|
180
|
+
*/
|
|
181
|
+
public static clearFacebookAuth<T>(): AxiosPromise<Response<T>> {
|
|
182
|
+
|
|
183
|
+
return Requests.processRoute(UserRoutes.routes.clearFacebookAuth, {});
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Clear Google authentication information from the current user.
|
|
188
|
+
*
|
|
189
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
190
|
+
*
|
|
191
|
+
* @returns promise
|
|
192
|
+
*/
|
|
193
|
+
public static clearGoogleAuth<T>(): AxiosPromise<Response<T>> {
|
|
194
|
+
|
|
195
|
+
return Requests.processRoute(UserRoutes.routes.clearGoogleAuth, {});
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Clear Stripe authentication information from the current user.
|
|
200
|
+
*
|
|
201
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
202
|
+
*
|
|
203
|
+
* @returns promise
|
|
204
|
+
*/
|
|
205
|
+
public static clearStripeAuth<T>(): AxiosPromise<Response<T>> {
|
|
206
|
+
|
|
207
|
+
return Requests.processRoute(UserRoutes.routes.clearStripeAuth, {});
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Clear TikTok authentication information from the current user.
|
|
212
|
+
*
|
|
213
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
214
|
+
*
|
|
215
|
+
* @returns promise
|
|
216
|
+
*/
|
|
217
|
+
public static clearTikTokAuth<T>(): AxiosPromise<Response<T>> {
|
|
218
|
+
|
|
219
|
+
return Requests.processRoute(UserRoutes.routes.clearTikTokAuth, {});
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Clear YouTube authentication information from the current user.
|
|
224
|
+
*
|
|
225
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
226
|
+
*
|
|
227
|
+
* @returns promise
|
|
228
|
+
*/
|
|
229
|
+
public static clearYoutubeAuth<T>(): AxiosPromise<Response<T>> {
|
|
230
|
+
|
|
231
|
+
return Requests.processRoute(UserRoutes.routes.clearYoutubeAuth, {});
|
|
232
|
+
}
|
|
233
|
+
|
|
162
234
|
|
|
163
235
|
|
|
164
236
|
|
|
@@ -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
|
|
package/src/routes/UserRoutes.ts
CHANGED
|
@@ -13,6 +13,12 @@ class UserRoutes {
|
|
|
13
13
|
uploadAvatar : { url: '/users/uploadAvatarImage', method: HTTP_METHODS.POST },
|
|
14
14
|
uploadBanner : { url: '/users/uploadBannerImage', method: HTTP_METHODS.POST },
|
|
15
15
|
createDonationPage : { url: '/users/createDonationPage', method: HTTP_METHODS.POST },
|
|
16
|
+
clearTwitchAuth : { url: '/users/clearTwitchAuth', method: HTTP_METHODS.DELETE },
|
|
17
|
+
clearFacebookAuth : { url: '/users/clearFacebookAuth', method: HTTP_METHODS.DELETE },
|
|
18
|
+
clearGoogleAuth : { url: '/users/clearGoogleAuth', method: HTTP_METHODS.DELETE },
|
|
19
|
+
clearStripeAuth : { url: '/users/clearStripeAuth', method: HTTP_METHODS.DELETE },
|
|
20
|
+
clearTikTokAuth : { url: '/users/clearTikTokAuth', method: HTTP_METHODS.DELETE },
|
|
21
|
+
clearYoutubeAuth : { url: '/users/clearYoutubeAuth', method: HTTP_METHODS.DELETE },
|
|
16
22
|
};
|
|
17
23
|
|
|
18
24
|
}
|