glitch-javascript-sdk 1.2.6 → 1.2.7
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 +148 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/GameShows.d.ts +97 -0
- package/dist/esm/api/Influencers.d.ts +8 -0
- package/dist/esm/api/Publications.d.ts +1 -1
- package/dist/esm/api/index.d.ts +2 -0
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.js +148 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/routes/GameShowsRoute.d.ts +7 -0
- package/dist/index.d.ts +104 -0
- package/package.json +1 -1
- package/src/api/GameShows.ts +145 -0
- package/src/api/Influencers.ts +11 -0
- package/src/api/Publications.ts +1 -1
- package/src/api/index.ts +3 -1
- package/src/index.ts +2 -0
- package/src/routes/GameShowsRoute.ts +18 -0
- package/src/routes/InfluencerRoutes.ts +1 -0
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import Response from "../util/Response";
|
|
2
|
+
import { AxiosPromise } from "axios";
|
|
3
|
+
declare class GameShows {
|
|
4
|
+
/**
|
|
5
|
+
* List all the GameShows.
|
|
6
|
+
*
|
|
7
|
+
* @see https://api.glitch.fun/api/documentation#/GameShows/getGameShows
|
|
8
|
+
*
|
|
9
|
+
* @returns promise
|
|
10
|
+
*/
|
|
11
|
+
static list<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
12
|
+
/**
|
|
13
|
+
* Create a new game show.
|
|
14
|
+
*
|
|
15
|
+
* @see https://api.glitch.fun/api/documentation#/GameShows/createGameShow
|
|
16
|
+
*
|
|
17
|
+
* @param data The data to be passed when creating a game show.
|
|
18
|
+
*
|
|
19
|
+
* @returns Promise
|
|
20
|
+
*/
|
|
21
|
+
static create<T>(data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
22
|
+
/**
|
|
23
|
+
* Update a game show.
|
|
24
|
+
*
|
|
25
|
+
* @see https://api.glitch.fun/api/documentation#/GameShows/updateGameShow
|
|
26
|
+
*
|
|
27
|
+
* @param show_id The id of the game show to update.
|
|
28
|
+
* @param data The data to update.
|
|
29
|
+
*
|
|
30
|
+
* @returns promise
|
|
31
|
+
*/
|
|
32
|
+
static update<T>(show_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
33
|
+
/**
|
|
34
|
+
* Retrieve the information for a single game show.
|
|
35
|
+
*
|
|
36
|
+
* @see https://api.glitch.fun/api/documentation#/GameShows/getGameShowByUuid
|
|
37
|
+
*
|
|
38
|
+
* @param show_id The id fo the game show to retrieve.
|
|
39
|
+
*
|
|
40
|
+
* @returns promise
|
|
41
|
+
*/
|
|
42
|
+
static view<T>(show_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
43
|
+
/**
|
|
44
|
+
* Deletes a game show.
|
|
45
|
+
*
|
|
46
|
+
* @see https://api.glitch.fun/api/documentation#/GameShows/deleteGameShow
|
|
47
|
+
*
|
|
48
|
+
* @param show_id The id of the game show to delete.
|
|
49
|
+
* @returns promise
|
|
50
|
+
*/
|
|
51
|
+
static delete<T>(show_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
52
|
+
/**
|
|
53
|
+
* Updates the main image for the game show using a File object.
|
|
54
|
+
*
|
|
55
|
+
* @see https://api.glitch.fun/api/documentation#/GameShows/uploadGameShowLogo
|
|
56
|
+
*
|
|
57
|
+
* @param file The file object to upload.
|
|
58
|
+
* @param data Any additional data to pass along to the upload.
|
|
59
|
+
*
|
|
60
|
+
* @returns promise
|
|
61
|
+
*/
|
|
62
|
+
static uploadLogoFile<T>(show_id: string, file: File, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
63
|
+
/**
|
|
64
|
+
* Updates the main image for the game show using a Blob.
|
|
65
|
+
*
|
|
66
|
+
* @see https://api.glitch.fun/api/documentation#/GameShows/uploadGameShowLogo
|
|
67
|
+
*
|
|
68
|
+
* @param blob The blob to upload.
|
|
69
|
+
* @param data Any additional data to pass along to the upload
|
|
70
|
+
*
|
|
71
|
+
* @returns promise
|
|
72
|
+
*/
|
|
73
|
+
static uploadLogoBlob<T>(show_id: string, blob: Blob, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
74
|
+
/**
|
|
75
|
+
* Updates the banner image for the game show using a File object.
|
|
76
|
+
*
|
|
77
|
+
* @see https://api.glitch.fun/api/documentation#/GameShows/uploadGameShowBannerImage
|
|
78
|
+
*
|
|
79
|
+
* @param file The file object to upload.
|
|
80
|
+
* @param data Any additional data to pass along to the upload.
|
|
81
|
+
*
|
|
82
|
+
* @returns promise
|
|
83
|
+
*/
|
|
84
|
+
static uploadBannerImageFile<T>(show_id: string, file: File, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
85
|
+
/**
|
|
86
|
+
* Updates the banner image for the game show using a Blob.
|
|
87
|
+
*
|
|
88
|
+
* @see https://api.glitch.fun/api/documentation#/GameShows/uploadGameShowBannerImage
|
|
89
|
+
*
|
|
90
|
+
* @param blob The blob to upload.
|
|
91
|
+
* @param data Any additional data to pass along to the upload
|
|
92
|
+
*
|
|
93
|
+
* @returns promise
|
|
94
|
+
*/
|
|
95
|
+
static uploadBannerImageBlob<T>(show_id: string, blob: Blob, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
96
|
+
}
|
|
97
|
+
export default GameShows;
|
|
@@ -81,5 +81,13 @@ declare class Influencers {
|
|
|
81
81
|
* @returns promise
|
|
82
82
|
*/
|
|
83
83
|
static listContracts<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
84
|
+
/**
|
|
85
|
+
* Download the influencer work
|
|
86
|
+
*
|
|
87
|
+
* @see https://api.glitch.fun/api/documentation#/Influencers/downloadInfluencersWorkbook
|
|
88
|
+
*
|
|
89
|
+
* @returns promise
|
|
90
|
+
*/
|
|
91
|
+
static workbook<T>(data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
84
92
|
}
|
|
85
93
|
export default Influencers;
|
|
@@ -18,6 +18,6 @@ declare class Publications {
|
|
|
18
18
|
*
|
|
19
19
|
* @returns Promise
|
|
20
20
|
*/
|
|
21
|
-
static
|
|
21
|
+
static download<T>(data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
22
22
|
}
|
|
23
23
|
export default Publications;
|
package/dist/esm/api/index.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ import Feedback from "./Feedback";
|
|
|
22
22
|
import Influencers from "./Influencers";
|
|
23
23
|
import Games from "./Games";
|
|
24
24
|
import Publications from "./Publications";
|
|
25
|
+
import GameShows from "./GameShows";
|
|
25
26
|
export { Auth };
|
|
26
27
|
export { Competitions };
|
|
27
28
|
export { Communities };
|
|
@@ -46,3 +47,4 @@ export { Feedback };
|
|
|
46
47
|
export { Influencers };
|
|
47
48
|
export { Games };
|
|
48
49
|
export { Publications };
|
|
50
|
+
export { GameShows };
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ import { Feedback } from "./api";
|
|
|
22
22
|
import { Influencers } from "./api";
|
|
23
23
|
import { Games } from "./api";
|
|
24
24
|
import { Publications } from "./api";
|
|
25
|
+
import { GameShows } from "./api";
|
|
25
26
|
import Requests from "./util/Requests";
|
|
26
27
|
import Parser from "./util/Parser";
|
|
27
28
|
import Session from "./util/Session";
|
|
@@ -48,6 +49,7 @@ declare class Glitch {
|
|
|
48
49
|
Users: typeof Users;
|
|
49
50
|
Events: typeof Events;
|
|
50
51
|
Games: typeof Games;
|
|
52
|
+
GameShows: typeof GameShows;
|
|
51
53
|
Feedback: typeof Feedback;
|
|
52
54
|
Influencers: typeof Influencers;
|
|
53
55
|
Teams: typeof Teams;
|
package/dist/esm/index.js
CHANGED
|
@@ -10247,6 +10247,7 @@ var InfluencerRoutes = /** @class */ (function () {
|
|
|
10247
10247
|
updateNote: { url: '/influencers/{influencer_id}/notes/{note_id}', method: HTTP_METHODS.PUT },
|
|
10248
10248
|
deleteNote: { url: '/influencers/{influencer_id}/notes/{note_id}', method: HTTP_METHODS.DELETE },
|
|
10249
10249
|
listContracts: { url: '/influencers/contracts', method: HTTP_METHODS.GET },
|
|
10250
|
+
workbook: { url: '/influencers/workbook', method: HTTP_METHODS.POST },
|
|
10250
10251
|
};
|
|
10251
10252
|
return InfluencerRoutes;
|
|
10252
10253
|
}());
|
|
@@ -10354,6 +10355,16 @@ var Influencers = /** @class */ (function () {
|
|
|
10354
10355
|
Influencers.listContracts = function (params) {
|
|
10355
10356
|
return Requests.processRoute(InfluencerRoutes.routes.listContracts, undefined, undefined, params);
|
|
10356
10357
|
};
|
|
10358
|
+
/**
|
|
10359
|
+
* Download the influencer work
|
|
10360
|
+
*
|
|
10361
|
+
* @see https://api.glitch.fun/api/documentation#/Influencers/downloadInfluencersWorkbook
|
|
10362
|
+
*
|
|
10363
|
+
* @returns promise
|
|
10364
|
+
*/
|
|
10365
|
+
Influencers.workbook = function (data, params) {
|
|
10366
|
+
return Requests.processRoute(InfluencerRoutes.routes.workbook, data, {}, params);
|
|
10367
|
+
};
|
|
10357
10368
|
return Influencers;
|
|
10358
10369
|
}());
|
|
10359
10370
|
|
|
@@ -10436,12 +10447,147 @@ var Publications = /** @class */ (function () {
|
|
|
10436
10447
|
*
|
|
10437
10448
|
* @returns Promise
|
|
10438
10449
|
*/
|
|
10439
|
-
Publications.
|
|
10450
|
+
Publications.download = function (data, params) {
|
|
10440
10451
|
return Requests.processRoute(PublicationsRoutes.routes.download, data, undefined, params);
|
|
10441
10452
|
};
|
|
10442
10453
|
return Publications;
|
|
10443
10454
|
}());
|
|
10444
10455
|
|
|
10456
|
+
var GameShowsRoute = /** @class */ (function () {
|
|
10457
|
+
function GameShowsRoute() {
|
|
10458
|
+
}
|
|
10459
|
+
GameShowsRoute.routes = {
|
|
10460
|
+
list: { url: '/gameshows', method: HTTP_METHODS.GET },
|
|
10461
|
+
create: { url: '/gameshows', method: HTTP_METHODS.POST },
|
|
10462
|
+
view: { url: '/gameshows/{show_id}', method: HTTP_METHODS.GET },
|
|
10463
|
+
update: { url: '/gameshows/{show_id}', method: HTTP_METHODS.PUT },
|
|
10464
|
+
delete: { url: '/gameshows/{show_id}', method: HTTP_METHODS.DELETE },
|
|
10465
|
+
uploadLogo: { url: '/gameshows/{show_id}/uploadLogo', method: HTTP_METHODS.POST },
|
|
10466
|
+
uploadBannerImage: { url: '/gameshows/{show_id}/uploadBannerImage', method: HTTP_METHODS.POST },
|
|
10467
|
+
};
|
|
10468
|
+
return GameShowsRoute;
|
|
10469
|
+
}());
|
|
10470
|
+
|
|
10471
|
+
var GameShows = /** @class */ (function () {
|
|
10472
|
+
function GameShows() {
|
|
10473
|
+
}
|
|
10474
|
+
/**
|
|
10475
|
+
* List all the GameShows.
|
|
10476
|
+
*
|
|
10477
|
+
* @see https://api.glitch.fun/api/documentation#/GameShows/getGameShows
|
|
10478
|
+
*
|
|
10479
|
+
* @returns promise
|
|
10480
|
+
*/
|
|
10481
|
+
GameShows.list = function (params) {
|
|
10482
|
+
return Requests.processRoute(GameShowsRoute.routes.list, undefined, undefined, params);
|
|
10483
|
+
};
|
|
10484
|
+
/**
|
|
10485
|
+
* Create a new game show.
|
|
10486
|
+
*
|
|
10487
|
+
* @see https://api.glitch.fun/api/documentation#/GameShows/createGameShow
|
|
10488
|
+
*
|
|
10489
|
+
* @param data The data to be passed when creating a game show.
|
|
10490
|
+
*
|
|
10491
|
+
* @returns Promise
|
|
10492
|
+
*/
|
|
10493
|
+
GameShows.create = function (data, params) {
|
|
10494
|
+
return Requests.processRoute(GameShowsRoute.routes.create, data, undefined, params);
|
|
10495
|
+
};
|
|
10496
|
+
/**
|
|
10497
|
+
* Update a game show.
|
|
10498
|
+
*
|
|
10499
|
+
* @see https://api.glitch.fun/api/documentation#/GameShows/updateGameShow
|
|
10500
|
+
*
|
|
10501
|
+
* @param show_id The id of the game show to update.
|
|
10502
|
+
* @param data The data to update.
|
|
10503
|
+
*
|
|
10504
|
+
* @returns promise
|
|
10505
|
+
*/
|
|
10506
|
+
GameShows.update = function (show_id, data, params) {
|
|
10507
|
+
return Requests.processRoute(GameShowsRoute.routes.update, data, { show_id: show_id }, params);
|
|
10508
|
+
};
|
|
10509
|
+
/**
|
|
10510
|
+
* Retrieve the information for a single game show.
|
|
10511
|
+
*
|
|
10512
|
+
* @see https://api.glitch.fun/api/documentation#/GameShows/getGameShowByUuid
|
|
10513
|
+
*
|
|
10514
|
+
* @param show_id The id fo the game show to retrieve.
|
|
10515
|
+
*
|
|
10516
|
+
* @returns promise
|
|
10517
|
+
*/
|
|
10518
|
+
GameShows.view = function (show_id, params) {
|
|
10519
|
+
return Requests.processRoute(GameShowsRoute.routes.view, {}, { show_id: show_id }, params);
|
|
10520
|
+
};
|
|
10521
|
+
/**
|
|
10522
|
+
* Deletes a game show.
|
|
10523
|
+
*
|
|
10524
|
+
* @see https://api.glitch.fun/api/documentation#/GameShows/deleteGameShow
|
|
10525
|
+
*
|
|
10526
|
+
* @param show_id The id of the game show to delete.
|
|
10527
|
+
* @returns promise
|
|
10528
|
+
*/
|
|
10529
|
+
GameShows.delete = function (show_id, params) {
|
|
10530
|
+
return Requests.processRoute(GameShowsRoute.routes.delete, {}, { show_id: show_id }, params);
|
|
10531
|
+
};
|
|
10532
|
+
/**
|
|
10533
|
+
* Updates the main image for the game show using a File object.
|
|
10534
|
+
*
|
|
10535
|
+
* @see https://api.glitch.fun/api/documentation#/GameShows/uploadGameShowLogo
|
|
10536
|
+
*
|
|
10537
|
+
* @param file The file object to upload.
|
|
10538
|
+
* @param data Any additional data to pass along to the upload.
|
|
10539
|
+
*
|
|
10540
|
+
* @returns promise
|
|
10541
|
+
*/
|
|
10542
|
+
GameShows.uploadLogoFile = function (show_id, file, data, params) {
|
|
10543
|
+
var url = GameShowsRoute.routes.uploadLogo.url.replace('{show_id}', show_id);
|
|
10544
|
+
return Requests.uploadFile(url, 'image', file, data);
|
|
10545
|
+
};
|
|
10546
|
+
/**
|
|
10547
|
+
* Updates the main image for the game show using a Blob.
|
|
10548
|
+
*
|
|
10549
|
+
* @see https://api.glitch.fun/api/documentation#/GameShows/uploadGameShowLogo
|
|
10550
|
+
*
|
|
10551
|
+
* @param blob The blob to upload.
|
|
10552
|
+
* @param data Any additional data to pass along to the upload
|
|
10553
|
+
*
|
|
10554
|
+
* @returns promise
|
|
10555
|
+
*/
|
|
10556
|
+
GameShows.uploadLogoBlob = function (show_id, blob, data, params) {
|
|
10557
|
+
var url = GameShowsRoute.routes.uploadLogo.url.replace('{show_id}', show_id);
|
|
10558
|
+
return Requests.uploadBlob(url, 'image', blob, data);
|
|
10559
|
+
};
|
|
10560
|
+
/**
|
|
10561
|
+
* Updates the banner image for the game show using a File object.
|
|
10562
|
+
*
|
|
10563
|
+
* @see https://api.glitch.fun/api/documentation#/GameShows/uploadGameShowBannerImage
|
|
10564
|
+
*
|
|
10565
|
+
* @param file The file object to upload.
|
|
10566
|
+
* @param data Any additional data to pass along to the upload.
|
|
10567
|
+
*
|
|
10568
|
+
* @returns promise
|
|
10569
|
+
*/
|
|
10570
|
+
GameShows.uploadBannerImageFile = function (show_id, file, data, params) {
|
|
10571
|
+
var url = GameShowsRoute.routes.uploadBannerImage.url.replace('{show_id}', show_id);
|
|
10572
|
+
return Requests.uploadFile(url, 'image', file, data);
|
|
10573
|
+
};
|
|
10574
|
+
/**
|
|
10575
|
+
* Updates the banner image for the game show using a Blob.
|
|
10576
|
+
*
|
|
10577
|
+
* @see https://api.glitch.fun/api/documentation#/GameShows/uploadGameShowBannerImage
|
|
10578
|
+
*
|
|
10579
|
+
* @param blob The blob to upload.
|
|
10580
|
+
* @param data Any additional data to pass along to the upload
|
|
10581
|
+
*
|
|
10582
|
+
* @returns promise
|
|
10583
|
+
*/
|
|
10584
|
+
GameShows.uploadBannerImageBlob = function (show_id, blob, data, params) {
|
|
10585
|
+
var url = GameShowsRoute.routes.uploadBannerImage.url.replace('{show_id}', show_id);
|
|
10586
|
+
return Requests.uploadBlob(url, 'image', blob, data);
|
|
10587
|
+
};
|
|
10588
|
+
return GameShows;
|
|
10589
|
+
}());
|
|
10590
|
+
|
|
10445
10591
|
var Parser = /** @class */ (function () {
|
|
10446
10592
|
function Parser() {
|
|
10447
10593
|
}
|
|
@@ -10846,6 +10992,7 @@ var Glitch = /** @class */ (function () {
|
|
|
10846
10992
|
Users: Users,
|
|
10847
10993
|
Events: Events,
|
|
10848
10994
|
Games: Games,
|
|
10995
|
+
GameShows: GameShows,
|
|
10849
10996
|
Feedback: Feedback,
|
|
10850
10997
|
Influencers: Influencers,
|
|
10851
10998
|
Teams: Teams,
|