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/esm/api/Events.d.ts
CHANGED
|
@@ -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
|
*
|
package/dist/esm/api/Users.d.ts
CHANGED
|
@@ -111,5 +111,53 @@ declare class Users {
|
|
|
111
111
|
* @returns promise
|
|
112
112
|
*/
|
|
113
113
|
static createDonationPage<T>(): AxiosPromise<Response<T>>;
|
|
114
|
+
/**
|
|
115
|
+
* Clear Twitches authentication information from the current user.
|
|
116
|
+
*
|
|
117
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
118
|
+
*
|
|
119
|
+
* @returns promise
|
|
120
|
+
*/
|
|
121
|
+
static clearTwitchAuth<T>(): AxiosPromise<Response<T>>;
|
|
122
|
+
/**
|
|
123
|
+
* Clear Facebook authentication information from the current user.
|
|
124
|
+
*
|
|
125
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
126
|
+
*
|
|
127
|
+
* @returns promise
|
|
128
|
+
*/
|
|
129
|
+
static clearFacebookAuth<T>(): AxiosPromise<Response<T>>;
|
|
130
|
+
/**
|
|
131
|
+
* Clear Google authentication information from the current user.
|
|
132
|
+
*
|
|
133
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
134
|
+
*
|
|
135
|
+
* @returns promise
|
|
136
|
+
*/
|
|
137
|
+
static clearGoogleAuth<T>(): AxiosPromise<Response<T>>;
|
|
138
|
+
/**
|
|
139
|
+
* Clear Stripe authentication information from the current user.
|
|
140
|
+
*
|
|
141
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
142
|
+
*
|
|
143
|
+
* @returns promise
|
|
144
|
+
*/
|
|
145
|
+
static clearStripeAuth<T>(): AxiosPromise<Response<T>>;
|
|
146
|
+
/**
|
|
147
|
+
* Clear TikTok authentication information from the current user.
|
|
148
|
+
*
|
|
149
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
150
|
+
*
|
|
151
|
+
* @returns promise
|
|
152
|
+
*/
|
|
153
|
+
static clearTikTokAuth<T>(): AxiosPromise<Response<T>>;
|
|
154
|
+
/**
|
|
155
|
+
* Clear YouTube authentication information from the current user.
|
|
156
|
+
*
|
|
157
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
158
|
+
*
|
|
159
|
+
* @returns promise
|
|
160
|
+
*/
|
|
161
|
+
static clearYoutubeAuth<T>(): AxiosPromise<Response<T>>;
|
|
114
162
|
}
|
|
115
163
|
export default Users;
|
package/dist/esm/index.js
CHANGED
|
@@ -31336,6 +31336,12 @@ var UserRoutes = /** @class */ (function () {
|
|
|
31336
31336
|
uploadAvatar: { url: '/users/uploadAvatarImage', method: HTTP_METHODS.POST },
|
|
31337
31337
|
uploadBanner: { url: '/users/uploadBannerImage', method: HTTP_METHODS.POST },
|
|
31338
31338
|
createDonationPage: { url: '/users/createDonationPage', method: HTTP_METHODS.POST },
|
|
31339
|
+
clearTwitchAuth: { url: '/users/clearTwitchAuth', method: HTTP_METHODS.DELETE },
|
|
31340
|
+
clearFacebookAuth: { url: '/users/clearFacebookAuth', method: HTTP_METHODS.DELETE },
|
|
31341
|
+
clearGoogleAuth: { url: '/users/clearGoogleAuth', method: HTTP_METHODS.DELETE },
|
|
31342
|
+
clearStripeAuth: { url: '/users/clearStripeAuth', method: HTTP_METHODS.DELETE },
|
|
31343
|
+
clearTikTokAuth: { url: '/users/clearTikTokAuth', method: HTTP_METHODS.DELETE },
|
|
31344
|
+
clearYoutubeAuth: { url: '/users/clearYoutubeAuth', method: HTTP_METHODS.DELETE },
|
|
31339
31345
|
};
|
|
31340
31346
|
return UserRoutes;
|
|
31341
31347
|
}());
|
|
@@ -31475,6 +31481,66 @@ var Users = /** @class */ (function () {
|
|
|
31475
31481
|
Users.createDonationPage = function () {
|
|
31476
31482
|
return Requests.processRoute(UserRoutes.routes.createDonationPage, {});
|
|
31477
31483
|
};
|
|
31484
|
+
/**
|
|
31485
|
+
* Clear Twitches authentication information from the current user.
|
|
31486
|
+
*
|
|
31487
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
31488
|
+
*
|
|
31489
|
+
* @returns promise
|
|
31490
|
+
*/
|
|
31491
|
+
Users.clearTwitchAuth = function () {
|
|
31492
|
+
return Requests.processRoute(UserRoutes.routes.clearTwitchAuth, {});
|
|
31493
|
+
};
|
|
31494
|
+
/**
|
|
31495
|
+
* Clear Facebook authentication information from the current user.
|
|
31496
|
+
*
|
|
31497
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
31498
|
+
*
|
|
31499
|
+
* @returns promise
|
|
31500
|
+
*/
|
|
31501
|
+
Users.clearFacebookAuth = function () {
|
|
31502
|
+
return Requests.processRoute(UserRoutes.routes.clearFacebookAuth, {});
|
|
31503
|
+
};
|
|
31504
|
+
/**
|
|
31505
|
+
* Clear Google authentication information from the current user.
|
|
31506
|
+
*
|
|
31507
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
31508
|
+
*
|
|
31509
|
+
* @returns promise
|
|
31510
|
+
*/
|
|
31511
|
+
Users.clearGoogleAuth = function () {
|
|
31512
|
+
return Requests.processRoute(UserRoutes.routes.clearGoogleAuth, {});
|
|
31513
|
+
};
|
|
31514
|
+
/**
|
|
31515
|
+
* Clear Stripe authentication information from the current user.
|
|
31516
|
+
*
|
|
31517
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
31518
|
+
*
|
|
31519
|
+
* @returns promise
|
|
31520
|
+
*/
|
|
31521
|
+
Users.clearStripeAuth = function () {
|
|
31522
|
+
return Requests.processRoute(UserRoutes.routes.clearStripeAuth, {});
|
|
31523
|
+
};
|
|
31524
|
+
/**
|
|
31525
|
+
* Clear TikTok authentication information from the current user.
|
|
31526
|
+
*
|
|
31527
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
31528
|
+
*
|
|
31529
|
+
* @returns promise
|
|
31530
|
+
*/
|
|
31531
|
+
Users.clearTikTokAuth = function () {
|
|
31532
|
+
return Requests.processRoute(UserRoutes.routes.clearTikTokAuth, {});
|
|
31533
|
+
};
|
|
31534
|
+
/**
|
|
31535
|
+
* Clear YouTube authentication information from the current user.
|
|
31536
|
+
*
|
|
31537
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
31538
|
+
*
|
|
31539
|
+
* @returns promise
|
|
31540
|
+
*/
|
|
31541
|
+
Users.clearYoutubeAuth = function () {
|
|
31542
|
+
return Requests.processRoute(UserRoutes.routes.clearYoutubeAuth, {});
|
|
31543
|
+
};
|
|
31478
31544
|
return Users;
|
|
31479
31545
|
}());
|
|
31480
31546
|
|
|
@@ -31504,7 +31570,10 @@ var EventsRoutes = /** @class */ (function () {
|
|
|
31504
31570
|
enableDonations: { url: '/events/{event_id}/enableDonations', method: HTTP_METHODS.POST },
|
|
31505
31571
|
disableDonations: { url: '/events/{event_id}/disableDonations', method: HTTP_METHODS.POST },
|
|
31506
31572
|
sendInvite: { url: '/events/{event_id}/sendInvite', method: HTTP_METHODS.POST },
|
|
31507
|
-
acceptInvite: { url: '/events/{event_id}/acceptInvite', method: HTTP_METHODS.POST }
|
|
31573
|
+
acceptInvite: { url: '/events/{event_id}/acceptInvite', method: HTTP_METHODS.POST },
|
|
31574
|
+
addTwitchMulticast: { url: '/events/{event_id}/addTwitchMulticast', method: HTTP_METHODS.POST },
|
|
31575
|
+
addFacebookMulticast: { url: '/events/{event_id}/addFacebookMulticast', method: HTTP_METHODS.POST },
|
|
31576
|
+
addYoutubeMulticast: { url: '/events/{event_id}/addYoutubeMulticast', method: HTTP_METHODS.POST },
|
|
31508
31577
|
};
|
|
31509
31578
|
return EventsRoutes;
|
|
31510
31579
|
}());
|
|
@@ -31632,6 +31701,45 @@ var Events = /** @class */ (function () {
|
|
|
31632
31701
|
Events.removeRTMPSource = function (event_id, stream_id, data, params) {
|
|
31633
31702
|
return Requests.processRoute(EventsRoutes.routes.removeRTMPSource, data, { event_id: event_id, subid: stream_id }, params);
|
|
31634
31703
|
};
|
|
31704
|
+
/**
|
|
31705
|
+
* Add a Twitch Stream to the current event. The user must have authenticatd with Twitch.
|
|
31706
|
+
*
|
|
31707
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/addRTMPSource
|
|
31708
|
+
*
|
|
31709
|
+
* @param event_id The id of the event.
|
|
31710
|
+
* @param data The data to be passed when adding an RTMP source.
|
|
31711
|
+
*
|
|
31712
|
+
* @returns promise
|
|
31713
|
+
*/
|
|
31714
|
+
Events.addTwitchMulticast = function (event_id, data, params) {
|
|
31715
|
+
return Requests.processRoute(EventsRoutes.routes.addTwitchMulticast, data, { event_id: event_id }, params);
|
|
31716
|
+
};
|
|
31717
|
+
/**
|
|
31718
|
+
* Add a Facebook Stream to the current event. The user must have authenticatd with Facebook.
|
|
31719
|
+
*
|
|
31720
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/addRTMPSource
|
|
31721
|
+
*
|
|
31722
|
+
* @param event_id The id of the event.
|
|
31723
|
+
* @param data The data to be passed when adding an RTMP source.
|
|
31724
|
+
*
|
|
31725
|
+
* @returns promise
|
|
31726
|
+
*/
|
|
31727
|
+
Events.addFacebookMulticast = function (event_id, data, params) {
|
|
31728
|
+
return Requests.processRoute(EventsRoutes.routes.addFacebookMulticast, data, { event_id: event_id }, params);
|
|
31729
|
+
};
|
|
31730
|
+
/**
|
|
31731
|
+
* Add a Youtube Stream to the current event. The user must have authenticatd with Google.
|
|
31732
|
+
*
|
|
31733
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/addRTMPSource
|
|
31734
|
+
*
|
|
31735
|
+
* @param event_id The id of the event.
|
|
31736
|
+
* @param data The data to be passed when adding an RTMP source.
|
|
31737
|
+
*
|
|
31738
|
+
* @returns promise
|
|
31739
|
+
*/
|
|
31740
|
+
Events.addYoutubeMulticast = function (event_id, data, params) {
|
|
31741
|
+
return Requests.processRoute(EventsRoutes.routes.addYoutubeMulticast, data, { event_id: event_id }, params);
|
|
31742
|
+
};
|
|
31635
31743
|
/**
|
|
31636
31744
|
* A function that should be run on an interval to set the event as live when the live stream is active.
|
|
31637
31745
|
*
|