glitch-javascript-sdk 0.3.4 → 0.3.5
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 +23 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Events.d.ts +12 -0
- package/dist/esm/index.js +23 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +12 -0
- package/package.json +1 -1
- package/src/api/Events.ts +17 -0
- package/src/routes/RecordingRoute.ts +1 -5
package/dist/index.d.ts
CHANGED
|
@@ -1163,6 +1163,18 @@ declare class Events {
|
|
|
1163
1163
|
static disableDonations<T>(event_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
1164
1164
|
static sendInvite<T>(event_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
1165
1165
|
static acceptInvite<T>(event_id: string, token: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
1166
|
+
/**
|
|
1167
|
+
* Update a recording related to an event.
|
|
1168
|
+
*
|
|
1169
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/updateEventRecording
|
|
1170
|
+
*
|
|
1171
|
+
* @param event_id The id of the event to update.
|
|
1172
|
+
* @param recording_id The id of the recording to update.
|
|
1173
|
+
* @param data The data to update.
|
|
1174
|
+
*
|
|
1175
|
+
* @returns promise
|
|
1176
|
+
*/
|
|
1177
|
+
static updateRecording<T>(event_id: string, recording_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
1166
1178
|
}
|
|
1167
1179
|
|
|
1168
1180
|
declare class Teams {
|
package/package.json
CHANGED
package/src/api/Events.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import EventsRoutes from "../routes/EventsRoute";
|
|
2
|
+
import RecordingsRoute from "../routes/RecordingRoute";
|
|
2
3
|
import Requests from "../util/Requests";
|
|
3
4
|
import Response from "../util/Response";
|
|
4
5
|
import { AxiosPromise } from "axios";
|
|
@@ -373,6 +374,22 @@ class Events {
|
|
|
373
374
|
return Requests.processRoute(EventsRoutes.routes.acceptInvite, { token: token }, { event_id: event_id }, params);
|
|
374
375
|
}
|
|
375
376
|
|
|
377
|
+
/**
|
|
378
|
+
* Update a recording related to an event.
|
|
379
|
+
*
|
|
380
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/updateEventRecording
|
|
381
|
+
*
|
|
382
|
+
* @param event_id The id of the event to update.
|
|
383
|
+
* @param recording_id The id of the recording to update.
|
|
384
|
+
* @param data The data to update.
|
|
385
|
+
*
|
|
386
|
+
* @returns promise
|
|
387
|
+
*/
|
|
388
|
+
public static updateRecording<T>(event_id: string, recording_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
389
|
+
|
|
390
|
+
return Requests.processRoute(RecordingsRoute.routes.update, data, { event_id: event_id, recording_id : recording_id }, params);
|
|
391
|
+
}
|
|
392
|
+
|
|
376
393
|
|
|
377
394
|
}
|
|
378
395
|
|
|
@@ -4,11 +4,7 @@ import HTTP_METHODS from "../constants/HttpMethods";
|
|
|
4
4
|
class RecordingsRoute {
|
|
5
5
|
|
|
6
6
|
public static routes: { [key: string]: Route } = {
|
|
7
|
-
|
|
8
|
-
register: { url: '/auth/register', method: HTTP_METHODS.POST },
|
|
9
|
-
one_time_login : { url: '/auth/oneTimeLoginWithToken', method: HTTP_METHODS.POST },
|
|
10
|
-
forgot_password :{ url: '/auth/forgotpassword', method: HTTP_METHODS.POST },
|
|
11
|
-
reset_password : { url: '/auth/resetpassword', method: HTTP_METHODS.POST },
|
|
7
|
+
update: { url: '/events/{event_id}/recording/{recording_id}', method: HTTP_METHODS.PUT },
|
|
12
8
|
};
|
|
13
9
|
|
|
14
10
|
}
|