glitch-javascript-sdk 1.3.4 → 1.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 +402 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Media.d.ts +37 -0
- package/dist/esm/api/Scheduler.d.ts +217 -0
- package/dist/esm/api/SocialPosts.d.ts +32 -0
- package/dist/esm/api/index.d.ts +4 -0
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.js +402 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/routes/MediaRoute.d.ts +7 -0
- package/dist/esm/routes/SchedulerRoute.d.ts +7 -0
- package/dist/index.d.ts +284 -0
- package/package.json +1 -1
- package/src/api/Media.ts +49 -0
- package/src/api/Scheduler.ts +296 -0
- package/src/api/SocialPosts.ts +43 -0
- package/src/api/index.ts +5 -1
- package/src/index.ts +5 -1
- package/src/routes/MediaRoute.ts +11 -0
- package/src/routes/SchedulerRoute.ts +39 -0
- package/src/routes/SocialPostsRoute.ts +3 -0
package/dist/index.d.ts
CHANGED
|
@@ -2594,6 +2594,16 @@ declare class SocialPosts {
|
|
|
2594
2594
|
* @returns promise
|
|
2595
2595
|
*/
|
|
2596
2596
|
static view<T>(post_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
2597
|
+
/**
|
|
2598
|
+
* Update the informationa bout a post, as long as it hasn't been posted.
|
|
2599
|
+
*
|
|
2600
|
+
* @see https://api.glitch.fun/api/documentation#/Post%20Route/showPostStorage
|
|
2601
|
+
*
|
|
2602
|
+
* @param post_id The id fo the post to retrieve.
|
|
2603
|
+
*
|
|
2604
|
+
* @returns promise
|
|
2605
|
+
*/
|
|
2606
|
+
static update<T>(post_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
2597
2607
|
/**
|
|
2598
2608
|
* Dispute a post as being fraudulent.,s
|
|
2599
2609
|
*
|
|
@@ -2614,6 +2624,28 @@ declare class SocialPosts {
|
|
|
2614
2624
|
* @returns promise
|
|
2615
2625
|
*/
|
|
2616
2626
|
static history<T>(post_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
2627
|
+
/**
|
|
2628
|
+
* Add media to a social media post.
|
|
2629
|
+
*
|
|
2630
|
+
* @see https://api.glitch.fun/api/documentation#/Social%20Media%20Posts/addMediaToSocialMediaPost
|
|
2631
|
+
*
|
|
2632
|
+
* @param post_id The ID of the social media post.
|
|
2633
|
+
* @param data The data to be sent in the request body.
|
|
2634
|
+
*
|
|
2635
|
+
* @returns promise
|
|
2636
|
+
*/
|
|
2637
|
+
static addMedia<T>(post_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
2638
|
+
/**
|
|
2639
|
+
* Remove media from a social media post.
|
|
2640
|
+
*
|
|
2641
|
+
* @see https://api.glitch.fun/api/documentation#/Social%20Media%20Posts/removeMediaFromSocialMediaPost
|
|
2642
|
+
*
|
|
2643
|
+
* @param post_id The ID of the social media post.
|
|
2644
|
+
* @param media_id The ID of the media to remove.
|
|
2645
|
+
*
|
|
2646
|
+
* @returns promise
|
|
2647
|
+
*/
|
|
2648
|
+
static removeMedia<T>(post_id: string, media_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
2617
2649
|
}
|
|
2618
2650
|
|
|
2619
2651
|
declare class Titles {
|
|
@@ -3839,6 +3871,256 @@ declare class PlayTests {
|
|
|
3839
3871
|
static mine<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
3840
3872
|
}
|
|
3841
3873
|
|
|
3874
|
+
declare class Media {
|
|
3875
|
+
/**
|
|
3876
|
+
* Upload media content using a File object.
|
|
3877
|
+
*
|
|
3878
|
+
* @see https://api.glitch.fun/api/documentation#/Media%20Route/uploadMedia
|
|
3879
|
+
*
|
|
3880
|
+
* @param file The file object to upload.
|
|
3881
|
+
* @param data Any additional data to pass along to the upload.
|
|
3882
|
+
*
|
|
3883
|
+
* @returns promise
|
|
3884
|
+
*/
|
|
3885
|
+
static uploadFile<T>(file: File, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
3886
|
+
/**
|
|
3887
|
+
* Upload media content using a Blob.
|
|
3888
|
+
*
|
|
3889
|
+
* @see https://api.glitch.fun/api/documentation#/Media%20Route/uploadMedia
|
|
3890
|
+
*
|
|
3891
|
+
* @param blob The Blob object to upload.
|
|
3892
|
+
* @param data Any additional data to pass along to the upload.
|
|
3893
|
+
*
|
|
3894
|
+
* @returns promise
|
|
3895
|
+
*/
|
|
3896
|
+
static uploadBlob<T>(blob: Blob, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
3897
|
+
/**
|
|
3898
|
+
* Get media details.
|
|
3899
|
+
*
|
|
3900
|
+
* @see https://api.glitch.fun/api/documentation#/Media%20Route/getMedia
|
|
3901
|
+
*
|
|
3902
|
+
* @param id The ID of the media item.
|
|
3903
|
+
*
|
|
3904
|
+
* @returns promise
|
|
3905
|
+
*/
|
|
3906
|
+
static get<T>(media_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
3907
|
+
}
|
|
3908
|
+
|
|
3909
|
+
declare class Scheduler {
|
|
3910
|
+
/**
|
|
3911
|
+
* List promotion schedules.
|
|
3912
|
+
*
|
|
3913
|
+
* @see https://api.glitch.fun/api/documentation#/Scheduler/getTitlePromotionSchedules
|
|
3914
|
+
*
|
|
3915
|
+
* @returns promise
|
|
3916
|
+
*/
|
|
3917
|
+
static listSchedules<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
3918
|
+
/**
|
|
3919
|
+
* Create a new promotion schedule.
|
|
3920
|
+
*
|
|
3921
|
+
* @see https://api.glitch.fun/api/documentation#/Scheduler/createTitlePromotionSchedule
|
|
3922
|
+
*
|
|
3923
|
+
* @param data The data for the new schedule.
|
|
3924
|
+
*
|
|
3925
|
+
* @returns promise
|
|
3926
|
+
*/
|
|
3927
|
+
static createSchedule<T>(data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
3928
|
+
/**
|
|
3929
|
+
* Get a specific promotion schedule.
|
|
3930
|
+
*
|
|
3931
|
+
* @see https://api.glitch.fun/api/documentation#/Scheduler/getTitlePromotionSchedule
|
|
3932
|
+
*
|
|
3933
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
3934
|
+
*
|
|
3935
|
+
* @returns promise
|
|
3936
|
+
*/
|
|
3937
|
+
static getSchedule<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
3938
|
+
/**
|
|
3939
|
+
* Update a promotion schedule.
|
|
3940
|
+
*
|
|
3941
|
+
* @see https://api.glitch.fun/api/documentation#/Scheduler/updateTitlePromotionSchedule
|
|
3942
|
+
*
|
|
3943
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
3944
|
+
* @param data The data to update.
|
|
3945
|
+
*
|
|
3946
|
+
* @returns promise
|
|
3947
|
+
*/
|
|
3948
|
+
static updateSchedule<T>(scheduler_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
3949
|
+
/**
|
|
3950
|
+
* Delete a promotion schedule.
|
|
3951
|
+
*
|
|
3952
|
+
* @see https://api.glitch.fun/api/documentation#/Scheduler/deleteTitlePromotionSchedule
|
|
3953
|
+
*
|
|
3954
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
3955
|
+
*
|
|
3956
|
+
* @returns promise
|
|
3957
|
+
*/
|
|
3958
|
+
static deleteSchedule<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
3959
|
+
/**
|
|
3960
|
+
* Get social media posts related to a promotion schedule.
|
|
3961
|
+
*
|
|
3962
|
+
* @see https://api.glitch.fun/api/documentation#/Scheduler/getPromotionScheduleSocialPosts
|
|
3963
|
+
*
|
|
3964
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
3965
|
+
*
|
|
3966
|
+
* @returns promise
|
|
3967
|
+
*/
|
|
3968
|
+
static getSchedulePosts<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
3969
|
+
/**
|
|
3970
|
+
* List title updates for a promotion schedule.
|
|
3971
|
+
*
|
|
3972
|
+
* @see https://api.glitch.fun/api/documentation#/Scheduler/getTitleUpdates
|
|
3973
|
+
*
|
|
3974
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
3975
|
+
*
|
|
3976
|
+
* @returns promise
|
|
3977
|
+
*/
|
|
3978
|
+
static listUpdates<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
3979
|
+
/**
|
|
3980
|
+
* Create a new title update for a promotion schedule.
|
|
3981
|
+
*
|
|
3982
|
+
* @see https://api.glitch.fun/api/documentation#/Scheduler/createTitleUpdate
|
|
3983
|
+
*
|
|
3984
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
3985
|
+
* @param data The data for the new update.
|
|
3986
|
+
*
|
|
3987
|
+
* @returns promise
|
|
3988
|
+
*/
|
|
3989
|
+
static createUpdate<T>(scheduler_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
3990
|
+
/**
|
|
3991
|
+
* Get a specific title update.
|
|
3992
|
+
*
|
|
3993
|
+
* @see https://api.glitch.fun/api/documentation#/Scheduler/getTitleUpdate
|
|
3994
|
+
*
|
|
3995
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
3996
|
+
* @param update_id The ID of the title update.
|
|
3997
|
+
*
|
|
3998
|
+
* @returns promise
|
|
3999
|
+
*/
|
|
4000
|
+
static getUpdate<T>(scheduler_id: string, update_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4001
|
+
/**
|
|
4002
|
+
* Update a title update.
|
|
4003
|
+
*
|
|
4004
|
+
* @see https://api.glitch.fun/api/documentation#/Scheduler/updateTitleUpdate
|
|
4005
|
+
*
|
|
4006
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
4007
|
+
* @param update_id The ID of the title update.
|
|
4008
|
+
* @param data The data to update.
|
|
4009
|
+
*
|
|
4010
|
+
* @returns promise
|
|
4011
|
+
*/
|
|
4012
|
+
static updateUpdate<T>(scheduler_id: string, update_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4013
|
+
/**
|
|
4014
|
+
* Delete a title update.
|
|
4015
|
+
*
|
|
4016
|
+
* @see https://api.glitch.fun/api/documentation#/Scheduler/deleteTitleUpdate
|
|
4017
|
+
*
|
|
4018
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
4019
|
+
* @param update_id The ID of the title update.
|
|
4020
|
+
*
|
|
4021
|
+
* @returns promise
|
|
4022
|
+
*/
|
|
4023
|
+
static deleteUpdate<T>(scheduler_id: string, update_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4024
|
+
/**
|
|
4025
|
+
* Clear Twitter OAuth credentials from a promotion schedule.
|
|
4026
|
+
*
|
|
4027
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
4028
|
+
* @returns promise
|
|
4029
|
+
*/
|
|
4030
|
+
static clearTwitterAuth<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4031
|
+
/**
|
|
4032
|
+
* Clear Facebook OAuth credentials from a promotion schedule.
|
|
4033
|
+
*
|
|
4034
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
4035
|
+
* @returns promise
|
|
4036
|
+
*/
|
|
4037
|
+
static clearFacebookAuth<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4038
|
+
/**
|
|
4039
|
+
* Clear Instagram OAuth credentials from a promotion schedule.
|
|
4040
|
+
*
|
|
4041
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
4042
|
+
* @returns promise
|
|
4043
|
+
*/
|
|
4044
|
+
static clearInstagramAuth<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4045
|
+
/**
|
|
4046
|
+
* Clear Snapchat OAuth credentials from a promotion schedule.
|
|
4047
|
+
*
|
|
4048
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
4049
|
+
* @returns promise
|
|
4050
|
+
*/
|
|
4051
|
+
static clearSnapchatAuth<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4052
|
+
/**
|
|
4053
|
+
* Clear TikTok OAuth credentials from a promotion schedule.
|
|
4054
|
+
*
|
|
4055
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
4056
|
+
* @returns promise
|
|
4057
|
+
*/
|
|
4058
|
+
static clearTikTokAuth<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4059
|
+
/**
|
|
4060
|
+
* Clear Twitch OAuth credentials from a promotion schedule.
|
|
4061
|
+
*
|
|
4062
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
4063
|
+
* @returns promise
|
|
4064
|
+
*/
|
|
4065
|
+
static clearTwitchAuth<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4066
|
+
/**
|
|
4067
|
+
* Clear Kick OAuth credentials from a promotion schedule.
|
|
4068
|
+
*
|
|
4069
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
4070
|
+
* @returns promise
|
|
4071
|
+
*/
|
|
4072
|
+
static clearKickAuth<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4073
|
+
/**
|
|
4074
|
+
* Clear Reddit OAuth credentials from a promotion schedule.
|
|
4075
|
+
*
|
|
4076
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
4077
|
+
* @returns promise
|
|
4078
|
+
*/
|
|
4079
|
+
static clearRedditAuth<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4080
|
+
/**
|
|
4081
|
+
* Clear YouTube OAuth credentials from a promotion schedule.
|
|
4082
|
+
*
|
|
4083
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
4084
|
+
* @returns promise
|
|
4085
|
+
*/
|
|
4086
|
+
static clearYouTubeAuth<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4087
|
+
/**
|
|
4088
|
+
* Clear Patreon OAuth credentials from a promotion schedule.
|
|
4089
|
+
*
|
|
4090
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
4091
|
+
* @returns promise
|
|
4092
|
+
*/
|
|
4093
|
+
static clearPatreonAuth<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4094
|
+
/**
|
|
4095
|
+
* Clear Pinterest OAuth credentials from a promotion schedule.
|
|
4096
|
+
*
|
|
4097
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
4098
|
+
* @returns promise
|
|
4099
|
+
*/
|
|
4100
|
+
static clearPinterestAuth<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4101
|
+
/**
|
|
4102
|
+
* Clear Steam OAuth credentials from a promotion schedule.
|
|
4103
|
+
*
|
|
4104
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
4105
|
+
* @returns promise
|
|
4106
|
+
*/
|
|
4107
|
+
static clearSteamAuth<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4108
|
+
/**
|
|
4109
|
+
* Clear Discord OAuth credentials from a promotion schedule.
|
|
4110
|
+
*
|
|
4111
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
4112
|
+
* @returns promise
|
|
4113
|
+
*/
|
|
4114
|
+
static clearDiscordAuth<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4115
|
+
/**
|
|
4116
|
+
* Clear Bluesky OAuth credentials from a promotion schedule.
|
|
4117
|
+
*
|
|
4118
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
4119
|
+
* @returns promise
|
|
4120
|
+
*/
|
|
4121
|
+
static clearBlueskyAuth<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4122
|
+
}
|
|
4123
|
+
|
|
3842
4124
|
interface Route {
|
|
3843
4125
|
url: string;
|
|
3844
4126
|
method: string;
|
|
@@ -4165,6 +4447,8 @@ declare class Glitch {
|
|
|
4165
4447
|
Publications: typeof Publications;
|
|
4166
4448
|
Newsletters: typeof Newsletters;
|
|
4167
4449
|
PlayTests: typeof PlayTests;
|
|
4450
|
+
Media: typeof Media;
|
|
4451
|
+
Scheduler: typeof Scheduler;
|
|
4168
4452
|
};
|
|
4169
4453
|
static util: {
|
|
4170
4454
|
Requests: typeof Requests;
|
package/package.json
CHANGED
package/src/api/Media.ts
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import MediaRoute from "../routes/MediaRoute";
|
|
2
|
+
import Requests from "../util/Requests";
|
|
3
|
+
import Response from "../util/Response";
|
|
4
|
+
import { AxiosPromise } from "axios";
|
|
5
|
+
|
|
6
|
+
class Media {
|
|
7
|
+
/**
|
|
8
|
+
* Upload media content using a File object.
|
|
9
|
+
*
|
|
10
|
+
* @see https://api.glitch.fun/api/documentation#/Media%20Route/uploadMedia
|
|
11
|
+
*
|
|
12
|
+
* @param file The file object to upload.
|
|
13
|
+
* @param data Any additional data to pass along to the upload.
|
|
14
|
+
*
|
|
15
|
+
* @returns promise
|
|
16
|
+
*/
|
|
17
|
+
public static uploadFile<T>(file: File, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
18
|
+
return Requests.uploadFile(MediaRoute.routes.upload.url, 'media', file, data, params);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Upload media content using a Blob.
|
|
23
|
+
*
|
|
24
|
+
* @see https://api.glitch.fun/api/documentation#/Media%20Route/uploadMedia
|
|
25
|
+
*
|
|
26
|
+
* @param blob The Blob object to upload.
|
|
27
|
+
* @param data Any additional data to pass along to the upload.
|
|
28
|
+
*
|
|
29
|
+
* @returns promise
|
|
30
|
+
*/
|
|
31
|
+
public static uploadBlob<T>(blob: Blob, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
32
|
+
return Requests.uploadBlob(MediaRoute.routes.upload.url, 'media', blob, data, params);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Get media details.
|
|
37
|
+
*
|
|
38
|
+
* @see https://api.glitch.fun/api/documentation#/Media%20Route/getMedia
|
|
39
|
+
*
|
|
40
|
+
* @param id The ID of the media item.
|
|
41
|
+
*
|
|
42
|
+
* @returns promise
|
|
43
|
+
*/
|
|
44
|
+
public static get<T>(media_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
45
|
+
return Requests.processRoute(MediaRoute.routes.getMedia, {}, { media_id: media_id }, params);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export default Media;
|
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
import SchedulerRoute from "../routes/SchedulerRoute";
|
|
2
|
+
import Requests from "../util/Requests";
|
|
3
|
+
import Response from "../util/Response";
|
|
4
|
+
import { AxiosPromise } from "axios";
|
|
5
|
+
|
|
6
|
+
class Scheduler {
|
|
7
|
+
/**
|
|
8
|
+
* List promotion schedules.
|
|
9
|
+
*
|
|
10
|
+
* @see https://api.glitch.fun/api/documentation#/Scheduler/getTitlePromotionSchedules
|
|
11
|
+
*
|
|
12
|
+
* @returns promise
|
|
13
|
+
*/
|
|
14
|
+
public static listSchedules<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
15
|
+
return Requests.processRoute(SchedulerRoute.routes.listSchedules, {}, {}, params);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Create a new promotion schedule.
|
|
20
|
+
*
|
|
21
|
+
* @see https://api.glitch.fun/api/documentation#/Scheduler/createTitlePromotionSchedule
|
|
22
|
+
*
|
|
23
|
+
* @param data The data for the new schedule.
|
|
24
|
+
*
|
|
25
|
+
* @returns promise
|
|
26
|
+
*/
|
|
27
|
+
public static createSchedule<T>(data: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
28
|
+
return Requests.processRoute(SchedulerRoute.routes.createSchedule, data, {}, params);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Get a specific promotion schedule.
|
|
33
|
+
*
|
|
34
|
+
* @see https://api.glitch.fun/api/documentation#/Scheduler/getTitlePromotionSchedule
|
|
35
|
+
*
|
|
36
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
37
|
+
*
|
|
38
|
+
* @returns promise
|
|
39
|
+
*/
|
|
40
|
+
public static getSchedule<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
41
|
+
return Requests.processRoute(SchedulerRoute.routes.getSchedule, {}, { scheduler_id }, params);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Update a promotion schedule.
|
|
46
|
+
*
|
|
47
|
+
* @see https://api.glitch.fun/api/documentation#/Scheduler/updateTitlePromotionSchedule
|
|
48
|
+
*
|
|
49
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
50
|
+
* @param data The data to update.
|
|
51
|
+
*
|
|
52
|
+
* @returns promise
|
|
53
|
+
*/
|
|
54
|
+
public static updateSchedule<T>(scheduler_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
55
|
+
return Requests.processRoute(SchedulerRoute.routes.updateSchedule, data, { scheduler_id }, params);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Delete a promotion schedule.
|
|
60
|
+
*
|
|
61
|
+
* @see https://api.glitch.fun/api/documentation#/Scheduler/deleteTitlePromotionSchedule
|
|
62
|
+
*
|
|
63
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
64
|
+
*
|
|
65
|
+
* @returns promise
|
|
66
|
+
*/
|
|
67
|
+
public static deleteSchedule<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
68
|
+
return Requests.processRoute(SchedulerRoute.routes.deleteSchedule, {}, { scheduler_id }, params);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Get social media posts related to a promotion schedule.
|
|
73
|
+
*
|
|
74
|
+
* @see https://api.glitch.fun/api/documentation#/Scheduler/getPromotionScheduleSocialPosts
|
|
75
|
+
*
|
|
76
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
77
|
+
*
|
|
78
|
+
* @returns promise
|
|
79
|
+
*/
|
|
80
|
+
public static getSchedulePosts<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
81
|
+
return Requests.processRoute(SchedulerRoute.routes.getSchedulePosts, {}, { scheduler_id }, params);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* List title updates for a promotion schedule.
|
|
86
|
+
*
|
|
87
|
+
* @see https://api.glitch.fun/api/documentation#/Scheduler/getTitleUpdates
|
|
88
|
+
*
|
|
89
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
90
|
+
*
|
|
91
|
+
* @returns promise
|
|
92
|
+
*/
|
|
93
|
+
public static listUpdates<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
94
|
+
return Requests.processRoute(SchedulerRoute.routes.listUpdates, {}, { scheduler_id }, params);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Create a new title update for a promotion schedule.
|
|
99
|
+
*
|
|
100
|
+
* @see https://api.glitch.fun/api/documentation#/Scheduler/createTitleUpdate
|
|
101
|
+
*
|
|
102
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
103
|
+
* @param data The data for the new update.
|
|
104
|
+
*
|
|
105
|
+
* @returns promise
|
|
106
|
+
*/
|
|
107
|
+
public static createUpdate<T>(scheduler_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
108
|
+
return Requests.processRoute(SchedulerRoute.routes.createUpdate, data, { scheduler_id }, params);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Get a specific title update.
|
|
113
|
+
*
|
|
114
|
+
* @see https://api.glitch.fun/api/documentation#/Scheduler/getTitleUpdate
|
|
115
|
+
*
|
|
116
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
117
|
+
* @param update_id The ID of the title update.
|
|
118
|
+
*
|
|
119
|
+
* @returns promise
|
|
120
|
+
*/
|
|
121
|
+
public static getUpdate<T>(scheduler_id: string, update_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
122
|
+
return Requests.processRoute(SchedulerRoute.routes.getUpdate, {}, { scheduler_id, update_id }, params);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Update a title update.
|
|
127
|
+
*
|
|
128
|
+
* @see https://api.glitch.fun/api/documentation#/Scheduler/updateTitleUpdate
|
|
129
|
+
*
|
|
130
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
131
|
+
* @param update_id The ID of the title update.
|
|
132
|
+
* @param data The data to update.
|
|
133
|
+
*
|
|
134
|
+
* @returns promise
|
|
135
|
+
*/
|
|
136
|
+
public static updateUpdate<T>(scheduler_id: string, update_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
137
|
+
return Requests.processRoute(SchedulerRoute.routes.updateUpdate, data, { scheduler_id, update_id }, params);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Delete a title update.
|
|
142
|
+
*
|
|
143
|
+
* @see https://api.glitch.fun/api/documentation#/Scheduler/deleteTitleUpdate
|
|
144
|
+
*
|
|
145
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
146
|
+
* @param update_id The ID of the title update.
|
|
147
|
+
*
|
|
148
|
+
* @returns promise
|
|
149
|
+
*/
|
|
150
|
+
public static deleteUpdate<T>(scheduler_id: string, update_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
151
|
+
return Requests.processRoute(SchedulerRoute.routes.deleteUpdate, {}, { scheduler_id, update_id }, params);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Clear Twitter OAuth credentials from a promotion schedule.
|
|
156
|
+
*
|
|
157
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
158
|
+
* @returns promise
|
|
159
|
+
*/
|
|
160
|
+
public static clearTwitterAuth<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
161
|
+
return Requests.processRoute(SchedulerRoute.routes.clearTwitterAuth, {}, { scheduler_id }, params);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Clear Facebook OAuth credentials from a promotion schedule.
|
|
166
|
+
*
|
|
167
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
168
|
+
* @returns promise
|
|
169
|
+
*/
|
|
170
|
+
public static clearFacebookAuth<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
171
|
+
return Requests.processRoute(SchedulerRoute.routes.clearFacebookAuth, {}, { scheduler_id }, params);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Clear Instagram OAuth credentials from a promotion schedule.
|
|
176
|
+
*
|
|
177
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
178
|
+
* @returns promise
|
|
179
|
+
*/
|
|
180
|
+
public static clearInstagramAuth<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
181
|
+
return Requests.processRoute(SchedulerRoute.routes.clearInstagramAuth, {}, { scheduler_id }, params);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Clear Snapchat OAuth credentials from a promotion schedule.
|
|
186
|
+
*
|
|
187
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
188
|
+
* @returns promise
|
|
189
|
+
*/
|
|
190
|
+
public static clearSnapchatAuth<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
191
|
+
return Requests.processRoute(SchedulerRoute.routes.clearSnapchatAuth, {}, { scheduler_id }, params);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Clear TikTok OAuth credentials from a promotion schedule.
|
|
196
|
+
*
|
|
197
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
198
|
+
* @returns promise
|
|
199
|
+
*/
|
|
200
|
+
public static clearTikTokAuth<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
201
|
+
return Requests.processRoute(SchedulerRoute.routes.clearTikTokAuth, {}, { scheduler_id }, params);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* Clear Twitch OAuth credentials from a promotion schedule.
|
|
206
|
+
*
|
|
207
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
208
|
+
* @returns promise
|
|
209
|
+
*/
|
|
210
|
+
public static clearTwitchAuth<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
211
|
+
return Requests.processRoute(SchedulerRoute.routes.clearTwitchAuth, {}, { scheduler_id }, params);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Clear Kick OAuth credentials from a promotion schedule.
|
|
216
|
+
*
|
|
217
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
218
|
+
* @returns promise
|
|
219
|
+
*/
|
|
220
|
+
public static clearKickAuth<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
221
|
+
return Requests.processRoute(SchedulerRoute.routes.clearKickAuth, {}, { scheduler_id }, params);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* Clear Reddit OAuth credentials from a promotion schedule.
|
|
226
|
+
*
|
|
227
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
228
|
+
* @returns promise
|
|
229
|
+
*/
|
|
230
|
+
public static clearRedditAuth<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
231
|
+
return Requests.processRoute(SchedulerRoute.routes.clearRedditAuth, {}, { scheduler_id }, params);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* Clear YouTube OAuth credentials from a promotion schedule.
|
|
236
|
+
*
|
|
237
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
238
|
+
* @returns promise
|
|
239
|
+
*/
|
|
240
|
+
public static clearYouTubeAuth<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
241
|
+
return Requests.processRoute(SchedulerRoute.routes.clearYouTubeAuth, {}, { scheduler_id }, params);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* Clear Patreon OAuth credentials from a promotion schedule.
|
|
246
|
+
*
|
|
247
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
248
|
+
* @returns promise
|
|
249
|
+
*/
|
|
250
|
+
public static clearPatreonAuth<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
251
|
+
return Requests.processRoute(SchedulerRoute.routes.clearPatreonAuth, {}, { scheduler_id }, params);
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* Clear Pinterest OAuth credentials from a promotion schedule.
|
|
256
|
+
*
|
|
257
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
258
|
+
* @returns promise
|
|
259
|
+
*/
|
|
260
|
+
public static clearPinterestAuth<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
261
|
+
return Requests.processRoute(SchedulerRoute.routes.clearPinterestAuth, {}, { scheduler_id }, params);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* Clear Steam OAuth credentials from a promotion schedule.
|
|
266
|
+
*
|
|
267
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
268
|
+
* @returns promise
|
|
269
|
+
*/
|
|
270
|
+
public static clearSteamAuth<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
271
|
+
return Requests.processRoute(SchedulerRoute.routes.clearSteamAuth, {}, { scheduler_id }, params);
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* Clear Discord OAuth credentials from a promotion schedule.
|
|
276
|
+
*
|
|
277
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
278
|
+
* @returns promise
|
|
279
|
+
*/
|
|
280
|
+
public static clearDiscordAuth<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
281
|
+
return Requests.processRoute(SchedulerRoute.routes.clearDiscordAuth, {}, { scheduler_id }, params);
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* Clear Bluesky OAuth credentials from a promotion schedule.
|
|
286
|
+
*
|
|
287
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
288
|
+
* @returns promise
|
|
289
|
+
*/
|
|
290
|
+
public static clearBlueskyAuth<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
291
|
+
return Requests.processRoute(SchedulerRoute.routes.clearBlueskyAuth, {}, { scheduler_id }, params);
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
export default Scheduler;
|