glitch-javascript-sdk 0.7.5 → 0.7.6
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 +96 -12
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Events.d.ts +11 -11
- package/dist/esm/api/Titles.d.ts +64 -0
- package/dist/esm/index.js +96 -12
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +75 -11
- package/package.json +1 -1
- package/src/api/Events.ts +3 -3
- package/src/api/Titles.ts +96 -0
- package/src/routes/TitlesRoute.ts +5 -1
package/dist/cjs/index.js
CHANGED
|
@@ -20491,15 +20491,15 @@ var Events = /** @class */ (function () {
|
|
|
20491
20491
|
return Requests.processRoute(EventsRoutes.routes.syncAsLive, data, { event_id: event_id }, params);
|
|
20492
20492
|
};
|
|
20493
20493
|
/**
|
|
20494
|
-
|
|
20495
|
-
|
|
20496
|
-
|
|
20497
|
-
|
|
20498
|
-
|
|
20499
|
-
|
|
20500
|
-
|
|
20501
|
-
|
|
20502
|
-
|
|
20494
|
+
* Updates the main image for the event using a File object.
|
|
20495
|
+
*
|
|
20496
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/uploadMainEventImage
|
|
20497
|
+
*
|
|
20498
|
+
* @param file The file object to upload.
|
|
20499
|
+
* @param data Any additional data to pass along to the upload.
|
|
20500
|
+
*
|
|
20501
|
+
* @returns promise
|
|
20502
|
+
*/
|
|
20503
20503
|
Events.uploadMainImageFile = function (event_id, file, data, params) {
|
|
20504
20504
|
var url = EventsRoutes.routes.uploadMainImage.url.replace('{event_id}', event_id);
|
|
20505
20505
|
return Requests.uploadFile(url, 'image', file, data);
|
|
@@ -20519,7 +20519,7 @@ var Events = /** @class */ (function () {
|
|
|
20519
20519
|
return Requests.uploadBlob(url, 'image', blob, data);
|
|
20520
20520
|
};
|
|
20521
20521
|
/**
|
|
20522
|
-
* Updates the banner image for the
|
|
20522
|
+
* Updates the banner image for the event using a File object.
|
|
20523
20523
|
*
|
|
20524
20524
|
* @see https://api.glitch.fun/api/documentation#/Event%20Route/uploadBannerEventImage
|
|
20525
20525
|
*
|
|
@@ -20533,7 +20533,7 @@ var Events = /** @class */ (function () {
|
|
|
20533
20533
|
return Requests.uploadFile(url, 'image', file, data);
|
|
20534
20534
|
};
|
|
20535
20535
|
/**
|
|
20536
|
-
* Updates the banner image for the
|
|
20536
|
+
* Updates the banner image for the event using a Blob.
|
|
20537
20537
|
*
|
|
20538
20538
|
* @see https://api.glitch.fun/api/documentation#/Event%20Route/uploadBannerEventImage
|
|
20539
20539
|
*
|
|
@@ -21774,7 +21774,11 @@ var TitlesRoute = /** @class */ (function () {
|
|
|
21774
21774
|
update: { url: '/titles/{title_id}', method: HTTP_METHODS.PUT },
|
|
21775
21775
|
delete: { url: '/titles/{title_id}', method: HTTP_METHODS.DELETE },
|
|
21776
21776
|
approve: { url: '/titles/{title_id}/approve', method: HTTP_METHODS.POST },
|
|
21777
|
-
reject: { url: '
|
|
21777
|
+
reject: { url: '/titles/{title_id}/reject', method: HTTP_METHODS.POST },
|
|
21778
|
+
uploadMainImage: { url: '/titles/{title_id}/uploadMainImage', method: HTTP_METHODS.POST },
|
|
21779
|
+
uploadBannerImage: { url: '/titles/{title_id}/uploadBannerImage', method: HTTP_METHODS.POST },
|
|
21780
|
+
addAdministrator: { url: '/titles/{title_id}/addAdministrator', method: HTTP_METHODS.POST },
|
|
21781
|
+
removeAdministrator: { url: '/titles/{title_id}/removeAdministrator/{user_id}', method: HTTP_METHODS.DELETE },
|
|
21778
21782
|
};
|
|
21779
21783
|
return TitlesRoute;
|
|
21780
21784
|
}());
|
|
@@ -21864,6 +21868,86 @@ var Titles = /** @class */ (function () {
|
|
|
21864
21868
|
Titles.reject = function (title_id, data, params) {
|
|
21865
21869
|
return Requests.processRoute(TitlesRoute.routes.reject, data, { title_id: title_id }, params);
|
|
21866
21870
|
};
|
|
21871
|
+
/**
|
|
21872
|
+
* Add a user as an administrator to a title
|
|
21873
|
+
*
|
|
21874
|
+
* @see https://api.glitch.fun/api/documentation#/Titles/addTitleAdministrator
|
|
21875
|
+
*
|
|
21876
|
+
* @param data The data to be passed when creating a title.
|
|
21877
|
+
*
|
|
21878
|
+
* @returns Promise
|
|
21879
|
+
*/
|
|
21880
|
+
Titles.addAdministrator = function (title_id, data, params) {
|
|
21881
|
+
return Requests.processRoute(TitlesRoute.routes.addAdministrator, data, { title_id: title_id }, params);
|
|
21882
|
+
};
|
|
21883
|
+
/**
|
|
21884
|
+
* Remove a user as an administrator toa tile
|
|
21885
|
+
*
|
|
21886
|
+
* @see https://api.glitch.fun/api/documentation#/Titles/removeTitleAdministrator
|
|
21887
|
+
*
|
|
21888
|
+
* @param data The data to be passed when creating a title.
|
|
21889
|
+
*
|
|
21890
|
+
* @returns Promise
|
|
21891
|
+
*/
|
|
21892
|
+
Titles.removeAdministrator = function (title_id, user_id, data, params) {
|
|
21893
|
+
return Requests.processRoute(TitlesRoute.routes.removeAdministrator, data, { title_id: title_id, user_id: user_id }, params);
|
|
21894
|
+
};
|
|
21895
|
+
/**
|
|
21896
|
+
* Updates the main image for the title using a File object.
|
|
21897
|
+
*
|
|
21898
|
+
* @see https://api.glitch.fun/api/documentation#/Titles/uploadTitleMainImage
|
|
21899
|
+
*
|
|
21900
|
+
* @param file The file object to upload.
|
|
21901
|
+
* @param data Any additional data to pass along to the upload.
|
|
21902
|
+
*
|
|
21903
|
+
* @returns promise
|
|
21904
|
+
*/
|
|
21905
|
+
Titles.uploadMainImageFile = function (title_id, file, data, params) {
|
|
21906
|
+
var url = TitlesRoute.routes.uploadMainImage.url.replace('{title_id}', title_id);
|
|
21907
|
+
return Requests.uploadFile(url, 'image', file, data);
|
|
21908
|
+
};
|
|
21909
|
+
/**
|
|
21910
|
+
* Updates the main image for the title using a Blob.
|
|
21911
|
+
*
|
|
21912
|
+
* @see https://api.glitch.fun/api/documentation#/Titles/uploadTitleMainImage
|
|
21913
|
+
*
|
|
21914
|
+
* @param blob The blob to upload.
|
|
21915
|
+
* @param data Any additional data to pass along to the upload
|
|
21916
|
+
*
|
|
21917
|
+
* @returns promise
|
|
21918
|
+
*/
|
|
21919
|
+
Titles.uploadMainImageBlob = function (title_id, blob, data, params) {
|
|
21920
|
+
var url = TitlesRoute.routes.uploadMainImage.url.replace('{title_id}', title_id);
|
|
21921
|
+
return Requests.uploadBlob(url, 'image', blob, data);
|
|
21922
|
+
};
|
|
21923
|
+
/**
|
|
21924
|
+
* Updates the banner image for the title using a File object.
|
|
21925
|
+
*
|
|
21926
|
+
* @see https://api.glitch.fun/api/documentation#/Titles/uploadTitleBannerImage
|
|
21927
|
+
*
|
|
21928
|
+
* @param file The file object to upload.
|
|
21929
|
+
* @param data Any additional data to pass along to the upload.
|
|
21930
|
+
*
|
|
21931
|
+
* @returns promise
|
|
21932
|
+
*/
|
|
21933
|
+
Titles.uploadBannerImageFile = function (title_id, file, data, params) {
|
|
21934
|
+
var url = TitlesRoute.routes.uploadBannerImage.url.replace('{title_id}', title_id);
|
|
21935
|
+
return Requests.uploadFile(url, 'image', file, data);
|
|
21936
|
+
};
|
|
21937
|
+
/**
|
|
21938
|
+
* Updates the banner image for the title using a Blob.
|
|
21939
|
+
*
|
|
21940
|
+
* @see https://api.glitch.fun/api/documentation#/Titles/uploadTitleBannerImage
|
|
21941
|
+
*
|
|
21942
|
+
* @param blob The blob to upload.
|
|
21943
|
+
* @param data Any additional data to pass along to the upload
|
|
21944
|
+
*
|
|
21945
|
+
* @returns promise
|
|
21946
|
+
*/
|
|
21947
|
+
Titles.uploadBannerImageBlob = function (title_id, blob, data, params) {
|
|
21948
|
+
var url = TitlesRoute.routes.uploadBannerImage.url.replace('{title_id}', title_id);
|
|
21949
|
+
return Requests.uploadBlob(url, 'image', blob, data);
|
|
21950
|
+
};
|
|
21867
21951
|
return Titles;
|
|
21868
21952
|
}());
|
|
21869
21953
|
|