glitch-javascript-sdk 1.2.5 → 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 +187 -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 +23 -0
- package/dist/esm/api/index.d.ts +4 -0
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.js +187 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/routes/GameShowsRoute.d.ts +7 -0
- package/dist/esm/routes/PublicationsRoutes.d.ts +7 -0
- package/dist/index.d.ts +126 -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 +38 -0
- package/src/api/index.ts +5 -1
- package/src/index.ts +5 -1
- package/src/routes/GameShowsRoute.ts +18 -0
- package/src/routes/InfluencerRoutes.ts +1 -0
- package/src/routes/PublicationsRoutes.ts +13 -0
package/dist/cjs/index.js
CHANGED
|
@@ -23431,6 +23431,7 @@ var InfluencerRoutes = /** @class */ (function () {
|
|
|
23431
23431
|
updateNote: { url: '/influencers/{influencer_id}/notes/{note_id}', method: HTTP_METHODS.PUT },
|
|
23432
23432
|
deleteNote: { url: '/influencers/{influencer_id}/notes/{note_id}', method: HTTP_METHODS.DELETE },
|
|
23433
23433
|
listContracts: { url: '/influencers/contracts', method: HTTP_METHODS.GET },
|
|
23434
|
+
workbook: { url: '/influencers/workbook', method: HTTP_METHODS.POST },
|
|
23434
23435
|
};
|
|
23435
23436
|
return InfluencerRoutes;
|
|
23436
23437
|
}());
|
|
@@ -23538,6 +23539,16 @@ var Influencers = /** @class */ (function () {
|
|
|
23538
23539
|
Influencers.listContracts = function (params) {
|
|
23539
23540
|
return Requests.processRoute(InfluencerRoutes.routes.listContracts, undefined, undefined, params);
|
|
23540
23541
|
};
|
|
23542
|
+
/**
|
|
23543
|
+
* Download the influencer work
|
|
23544
|
+
*
|
|
23545
|
+
* @see https://api.glitch.fun/api/documentation#/Influencers/downloadInfluencersWorkbook
|
|
23546
|
+
*
|
|
23547
|
+
* @returns promise
|
|
23548
|
+
*/
|
|
23549
|
+
Influencers.workbook = function (data, params) {
|
|
23550
|
+
return Requests.processRoute(InfluencerRoutes.routes.workbook, data, {}, params);
|
|
23551
|
+
};
|
|
23541
23552
|
return Influencers;
|
|
23542
23553
|
}());
|
|
23543
23554
|
|
|
@@ -23588,6 +23599,179 @@ var Games = /** @class */ (function () {
|
|
|
23588
23599
|
return Games;
|
|
23589
23600
|
}());
|
|
23590
23601
|
|
|
23602
|
+
var PublicationsRoutes = /** @class */ (function () {
|
|
23603
|
+
function PublicationsRoutes() {
|
|
23604
|
+
}
|
|
23605
|
+
PublicationsRoutes.routes = {
|
|
23606
|
+
list: { url: '/publications', method: HTTP_METHODS.GET },
|
|
23607
|
+
download: { url: '/publications/download', method: HTTP_METHODS.POST },
|
|
23608
|
+
};
|
|
23609
|
+
return PublicationsRoutes;
|
|
23610
|
+
}());
|
|
23611
|
+
|
|
23612
|
+
var Publications = /** @class */ (function () {
|
|
23613
|
+
function Publications() {
|
|
23614
|
+
}
|
|
23615
|
+
/**
|
|
23616
|
+
* Get a list of all publictions, podcasts and blogs.
|
|
23617
|
+
*
|
|
23618
|
+
* @see https://api.glitch.fun/api/documentation#/Publications/getPublications
|
|
23619
|
+
*
|
|
23620
|
+
* @returns promise
|
|
23621
|
+
*/
|
|
23622
|
+
Publications.list = function (params) {
|
|
23623
|
+
return Requests.processRoute(PublicationsRoutes.routes.list, undefined, undefined, params);
|
|
23624
|
+
};
|
|
23625
|
+
/**
|
|
23626
|
+
* Download the list of publictions, podcasts and blogs.
|
|
23627
|
+
*
|
|
23628
|
+
* @see https://api.glitch.fun/api/documentation#/Publications/downloadPublications
|
|
23629
|
+
*
|
|
23630
|
+
* @param data The data to be passed when creating a team.
|
|
23631
|
+
*
|
|
23632
|
+
* @returns Promise
|
|
23633
|
+
*/
|
|
23634
|
+
Publications.download = function (data, params) {
|
|
23635
|
+
return Requests.processRoute(PublicationsRoutes.routes.download, data, undefined, params);
|
|
23636
|
+
};
|
|
23637
|
+
return Publications;
|
|
23638
|
+
}());
|
|
23639
|
+
|
|
23640
|
+
var GameShowsRoute = /** @class */ (function () {
|
|
23641
|
+
function GameShowsRoute() {
|
|
23642
|
+
}
|
|
23643
|
+
GameShowsRoute.routes = {
|
|
23644
|
+
list: { url: '/gameshows', method: HTTP_METHODS.GET },
|
|
23645
|
+
create: { url: '/gameshows', method: HTTP_METHODS.POST },
|
|
23646
|
+
view: { url: '/gameshows/{show_id}', method: HTTP_METHODS.GET },
|
|
23647
|
+
update: { url: '/gameshows/{show_id}', method: HTTP_METHODS.PUT },
|
|
23648
|
+
delete: { url: '/gameshows/{show_id}', method: HTTP_METHODS.DELETE },
|
|
23649
|
+
uploadLogo: { url: '/gameshows/{show_id}/uploadLogo', method: HTTP_METHODS.POST },
|
|
23650
|
+
uploadBannerImage: { url: '/gameshows/{show_id}/uploadBannerImage', method: HTTP_METHODS.POST },
|
|
23651
|
+
};
|
|
23652
|
+
return GameShowsRoute;
|
|
23653
|
+
}());
|
|
23654
|
+
|
|
23655
|
+
var GameShows = /** @class */ (function () {
|
|
23656
|
+
function GameShows() {
|
|
23657
|
+
}
|
|
23658
|
+
/**
|
|
23659
|
+
* List all the GameShows.
|
|
23660
|
+
*
|
|
23661
|
+
* @see https://api.glitch.fun/api/documentation#/GameShows/getGameShows
|
|
23662
|
+
*
|
|
23663
|
+
* @returns promise
|
|
23664
|
+
*/
|
|
23665
|
+
GameShows.list = function (params) {
|
|
23666
|
+
return Requests.processRoute(GameShowsRoute.routes.list, undefined, undefined, params);
|
|
23667
|
+
};
|
|
23668
|
+
/**
|
|
23669
|
+
* Create a new game show.
|
|
23670
|
+
*
|
|
23671
|
+
* @see https://api.glitch.fun/api/documentation#/GameShows/createGameShow
|
|
23672
|
+
*
|
|
23673
|
+
* @param data The data to be passed when creating a game show.
|
|
23674
|
+
*
|
|
23675
|
+
* @returns Promise
|
|
23676
|
+
*/
|
|
23677
|
+
GameShows.create = function (data, params) {
|
|
23678
|
+
return Requests.processRoute(GameShowsRoute.routes.create, data, undefined, params);
|
|
23679
|
+
};
|
|
23680
|
+
/**
|
|
23681
|
+
* Update a game show.
|
|
23682
|
+
*
|
|
23683
|
+
* @see https://api.glitch.fun/api/documentation#/GameShows/updateGameShow
|
|
23684
|
+
*
|
|
23685
|
+
* @param show_id The id of the game show to update.
|
|
23686
|
+
* @param data The data to update.
|
|
23687
|
+
*
|
|
23688
|
+
* @returns promise
|
|
23689
|
+
*/
|
|
23690
|
+
GameShows.update = function (show_id, data, params) {
|
|
23691
|
+
return Requests.processRoute(GameShowsRoute.routes.update, data, { show_id: show_id }, params);
|
|
23692
|
+
};
|
|
23693
|
+
/**
|
|
23694
|
+
* Retrieve the information for a single game show.
|
|
23695
|
+
*
|
|
23696
|
+
* @see https://api.glitch.fun/api/documentation#/GameShows/getGameShowByUuid
|
|
23697
|
+
*
|
|
23698
|
+
* @param show_id The id fo the game show to retrieve.
|
|
23699
|
+
*
|
|
23700
|
+
* @returns promise
|
|
23701
|
+
*/
|
|
23702
|
+
GameShows.view = function (show_id, params) {
|
|
23703
|
+
return Requests.processRoute(GameShowsRoute.routes.view, {}, { show_id: show_id }, params);
|
|
23704
|
+
};
|
|
23705
|
+
/**
|
|
23706
|
+
* Deletes a game show.
|
|
23707
|
+
*
|
|
23708
|
+
* @see https://api.glitch.fun/api/documentation#/GameShows/deleteGameShow
|
|
23709
|
+
*
|
|
23710
|
+
* @param show_id The id of the game show to delete.
|
|
23711
|
+
* @returns promise
|
|
23712
|
+
*/
|
|
23713
|
+
GameShows.delete = function (show_id, params) {
|
|
23714
|
+
return Requests.processRoute(GameShowsRoute.routes.delete, {}, { show_id: show_id }, params);
|
|
23715
|
+
};
|
|
23716
|
+
/**
|
|
23717
|
+
* Updates the main image for the game show using a File object.
|
|
23718
|
+
*
|
|
23719
|
+
* @see https://api.glitch.fun/api/documentation#/GameShows/uploadGameShowLogo
|
|
23720
|
+
*
|
|
23721
|
+
* @param file The file object to upload.
|
|
23722
|
+
* @param data Any additional data to pass along to the upload.
|
|
23723
|
+
*
|
|
23724
|
+
* @returns promise
|
|
23725
|
+
*/
|
|
23726
|
+
GameShows.uploadLogoFile = function (show_id, file, data, params) {
|
|
23727
|
+
var url = GameShowsRoute.routes.uploadLogo.url.replace('{show_id}', show_id);
|
|
23728
|
+
return Requests.uploadFile(url, 'image', file, data);
|
|
23729
|
+
};
|
|
23730
|
+
/**
|
|
23731
|
+
* Updates the main image for the game show using a Blob.
|
|
23732
|
+
*
|
|
23733
|
+
* @see https://api.glitch.fun/api/documentation#/GameShows/uploadGameShowLogo
|
|
23734
|
+
*
|
|
23735
|
+
* @param blob The blob to upload.
|
|
23736
|
+
* @param data Any additional data to pass along to the upload
|
|
23737
|
+
*
|
|
23738
|
+
* @returns promise
|
|
23739
|
+
*/
|
|
23740
|
+
GameShows.uploadLogoBlob = function (show_id, blob, data, params) {
|
|
23741
|
+
var url = GameShowsRoute.routes.uploadLogo.url.replace('{show_id}', show_id);
|
|
23742
|
+
return Requests.uploadBlob(url, 'image', blob, data);
|
|
23743
|
+
};
|
|
23744
|
+
/**
|
|
23745
|
+
* Updates the banner image for the game show using a File object.
|
|
23746
|
+
*
|
|
23747
|
+
* @see https://api.glitch.fun/api/documentation#/GameShows/uploadGameShowBannerImage
|
|
23748
|
+
*
|
|
23749
|
+
* @param file The file object to upload.
|
|
23750
|
+
* @param data Any additional data to pass along to the upload.
|
|
23751
|
+
*
|
|
23752
|
+
* @returns promise
|
|
23753
|
+
*/
|
|
23754
|
+
GameShows.uploadBannerImageFile = function (show_id, file, data, params) {
|
|
23755
|
+
var url = GameShowsRoute.routes.uploadBannerImage.url.replace('{show_id}', show_id);
|
|
23756
|
+
return Requests.uploadFile(url, 'image', file, data);
|
|
23757
|
+
};
|
|
23758
|
+
/**
|
|
23759
|
+
* Updates the banner image for the game show using a Blob.
|
|
23760
|
+
*
|
|
23761
|
+
* @see https://api.glitch.fun/api/documentation#/GameShows/uploadGameShowBannerImage
|
|
23762
|
+
*
|
|
23763
|
+
* @param blob The blob to upload.
|
|
23764
|
+
* @param data Any additional data to pass along to the upload
|
|
23765
|
+
*
|
|
23766
|
+
* @returns promise
|
|
23767
|
+
*/
|
|
23768
|
+
GameShows.uploadBannerImageBlob = function (show_id, blob, data, params) {
|
|
23769
|
+
var url = GameShowsRoute.routes.uploadBannerImage.url.replace('{show_id}', show_id);
|
|
23770
|
+
return Requests.uploadBlob(url, 'image', blob, data);
|
|
23771
|
+
};
|
|
23772
|
+
return GameShows;
|
|
23773
|
+
}());
|
|
23774
|
+
|
|
23591
23775
|
var Parser = /** @class */ (function () {
|
|
23592
23776
|
function Parser() {
|
|
23593
23777
|
}
|
|
@@ -23992,6 +24176,7 @@ var Glitch = /** @class */ (function () {
|
|
|
23992
24176
|
Users: Users,
|
|
23993
24177
|
Events: Events,
|
|
23994
24178
|
Games: Games,
|
|
24179
|
+
GameShows: GameShows,
|
|
23995
24180
|
Feedback: Feedback,
|
|
23996
24181
|
Influencers: Influencers,
|
|
23997
24182
|
Teams: Teams,
|
|
@@ -24007,7 +24192,8 @@ var Glitch = /** @class */ (function () {
|
|
|
24007
24192
|
Subscriptions: Subscriptions,
|
|
24008
24193
|
TipPackages: TipPackages,
|
|
24009
24194
|
TipEmojis: TipEmojis,
|
|
24010
|
-
TipPackagePurchases: TipPackagePurchases
|
|
24195
|
+
TipPackagePurchases: TipPackagePurchases,
|
|
24196
|
+
Publications: Publications
|
|
24011
24197
|
};
|
|
24012
24198
|
Glitch.util = {
|
|
24013
24199
|
Requests: Requests,
|