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.
@@ -0,0 +1,37 @@
1
+ import Response from "../util/Response";
2
+ import { AxiosPromise } from "axios";
3
+ declare class Media {
4
+ /**
5
+ * Upload media content using a File object.
6
+ *
7
+ * @see https://api.glitch.fun/api/documentation#/Media%20Route/uploadMedia
8
+ *
9
+ * @param file The file object to upload.
10
+ * @param data Any additional data to pass along to the upload.
11
+ *
12
+ * @returns promise
13
+ */
14
+ static uploadFile<T>(file: File, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
15
+ /**
16
+ * Upload media content using a Blob.
17
+ *
18
+ * @see https://api.glitch.fun/api/documentation#/Media%20Route/uploadMedia
19
+ *
20
+ * @param blob The Blob object to upload.
21
+ * @param data Any additional data to pass along to the upload.
22
+ *
23
+ * @returns promise
24
+ */
25
+ static uploadBlob<T>(blob: Blob, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
26
+ /**
27
+ * Get media details.
28
+ *
29
+ * @see https://api.glitch.fun/api/documentation#/Media%20Route/getMedia
30
+ *
31
+ * @param id The ID of the media item.
32
+ *
33
+ * @returns promise
34
+ */
35
+ static get<T>(media_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
36
+ }
37
+ export default Media;
@@ -0,0 +1,217 @@
1
+ import Response from "../util/Response";
2
+ import { AxiosPromise } from "axios";
3
+ declare class Scheduler {
4
+ /**
5
+ * List promotion schedules.
6
+ *
7
+ * @see https://api.glitch.fun/api/documentation#/Scheduler/getTitlePromotionSchedules
8
+ *
9
+ * @returns promise
10
+ */
11
+ static listSchedules<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
12
+ /**
13
+ * Create a new promotion schedule.
14
+ *
15
+ * @see https://api.glitch.fun/api/documentation#/Scheduler/createTitlePromotionSchedule
16
+ *
17
+ * @param data The data for the new schedule.
18
+ *
19
+ * @returns promise
20
+ */
21
+ static createSchedule<T>(data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
22
+ /**
23
+ * Get a specific promotion schedule.
24
+ *
25
+ * @see https://api.glitch.fun/api/documentation#/Scheduler/getTitlePromotionSchedule
26
+ *
27
+ * @param scheduler_id The ID of the promotion schedule.
28
+ *
29
+ * @returns promise
30
+ */
31
+ static getSchedule<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
32
+ /**
33
+ * Update a promotion schedule.
34
+ *
35
+ * @see https://api.glitch.fun/api/documentation#/Scheduler/updateTitlePromotionSchedule
36
+ *
37
+ * @param scheduler_id The ID of the promotion schedule.
38
+ * @param data The data to update.
39
+ *
40
+ * @returns promise
41
+ */
42
+ static updateSchedule<T>(scheduler_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
43
+ /**
44
+ * Delete a promotion schedule.
45
+ *
46
+ * @see https://api.glitch.fun/api/documentation#/Scheduler/deleteTitlePromotionSchedule
47
+ *
48
+ * @param scheduler_id The ID of the promotion schedule.
49
+ *
50
+ * @returns promise
51
+ */
52
+ static deleteSchedule<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
53
+ /**
54
+ * Get social media posts related to a promotion schedule.
55
+ *
56
+ * @see https://api.glitch.fun/api/documentation#/Scheduler/getPromotionScheduleSocialPosts
57
+ *
58
+ * @param scheduler_id The ID of the promotion schedule.
59
+ *
60
+ * @returns promise
61
+ */
62
+ static getSchedulePosts<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
63
+ /**
64
+ * List title updates for a promotion schedule.
65
+ *
66
+ * @see https://api.glitch.fun/api/documentation#/Scheduler/getTitleUpdates
67
+ *
68
+ * @param scheduler_id The ID of the promotion schedule.
69
+ *
70
+ * @returns promise
71
+ */
72
+ static listUpdates<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
73
+ /**
74
+ * Create a new title update for a promotion schedule.
75
+ *
76
+ * @see https://api.glitch.fun/api/documentation#/Scheduler/createTitleUpdate
77
+ *
78
+ * @param scheduler_id The ID of the promotion schedule.
79
+ * @param data The data for the new update.
80
+ *
81
+ * @returns promise
82
+ */
83
+ static createUpdate<T>(scheduler_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
84
+ /**
85
+ * Get a specific title update.
86
+ *
87
+ * @see https://api.glitch.fun/api/documentation#/Scheduler/getTitleUpdate
88
+ *
89
+ * @param scheduler_id The ID of the promotion schedule.
90
+ * @param update_id The ID of the title update.
91
+ *
92
+ * @returns promise
93
+ */
94
+ static getUpdate<T>(scheduler_id: string, update_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
95
+ /**
96
+ * Update a title update.
97
+ *
98
+ * @see https://api.glitch.fun/api/documentation#/Scheduler/updateTitleUpdate
99
+ *
100
+ * @param scheduler_id The ID of the promotion schedule.
101
+ * @param update_id The ID of the title update.
102
+ * @param data The data to update.
103
+ *
104
+ * @returns promise
105
+ */
106
+ static updateUpdate<T>(scheduler_id: string, update_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
107
+ /**
108
+ * Delete a title update.
109
+ *
110
+ * @see https://api.glitch.fun/api/documentation#/Scheduler/deleteTitleUpdate
111
+ *
112
+ * @param scheduler_id The ID of the promotion schedule.
113
+ * @param update_id The ID of the title update.
114
+ *
115
+ * @returns promise
116
+ */
117
+ static deleteUpdate<T>(scheduler_id: string, update_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
118
+ /**
119
+ * Clear Twitter OAuth credentials from a promotion schedule.
120
+ *
121
+ * @param scheduler_id The ID of the promotion schedule.
122
+ * @returns promise
123
+ */
124
+ static clearTwitterAuth<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
125
+ /**
126
+ * Clear Facebook OAuth credentials from a promotion schedule.
127
+ *
128
+ * @param scheduler_id The ID of the promotion schedule.
129
+ * @returns promise
130
+ */
131
+ static clearFacebookAuth<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
132
+ /**
133
+ * Clear Instagram OAuth credentials from a promotion schedule.
134
+ *
135
+ * @param scheduler_id The ID of the promotion schedule.
136
+ * @returns promise
137
+ */
138
+ static clearInstagramAuth<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
139
+ /**
140
+ * Clear Snapchat OAuth credentials from a promotion schedule.
141
+ *
142
+ * @param scheduler_id The ID of the promotion schedule.
143
+ * @returns promise
144
+ */
145
+ static clearSnapchatAuth<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
146
+ /**
147
+ * Clear TikTok OAuth credentials from a promotion schedule.
148
+ *
149
+ * @param scheduler_id The ID of the promotion schedule.
150
+ * @returns promise
151
+ */
152
+ static clearTikTokAuth<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
153
+ /**
154
+ * Clear Twitch OAuth credentials from a promotion schedule.
155
+ *
156
+ * @param scheduler_id The ID of the promotion schedule.
157
+ * @returns promise
158
+ */
159
+ static clearTwitchAuth<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
160
+ /**
161
+ * Clear Kick OAuth credentials from a promotion schedule.
162
+ *
163
+ * @param scheduler_id The ID of the promotion schedule.
164
+ * @returns promise
165
+ */
166
+ static clearKickAuth<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
167
+ /**
168
+ * Clear Reddit OAuth credentials from a promotion schedule.
169
+ *
170
+ * @param scheduler_id The ID of the promotion schedule.
171
+ * @returns promise
172
+ */
173
+ static clearRedditAuth<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
174
+ /**
175
+ * Clear YouTube OAuth credentials from a promotion schedule.
176
+ *
177
+ * @param scheduler_id The ID of the promotion schedule.
178
+ * @returns promise
179
+ */
180
+ static clearYouTubeAuth<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
181
+ /**
182
+ * Clear Patreon OAuth credentials from a promotion schedule.
183
+ *
184
+ * @param scheduler_id The ID of the promotion schedule.
185
+ * @returns promise
186
+ */
187
+ static clearPatreonAuth<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
188
+ /**
189
+ * Clear Pinterest OAuth credentials from a promotion schedule.
190
+ *
191
+ * @param scheduler_id The ID of the promotion schedule.
192
+ * @returns promise
193
+ */
194
+ static clearPinterestAuth<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
195
+ /**
196
+ * Clear Steam OAuth credentials from a promotion schedule.
197
+ *
198
+ * @param scheduler_id The ID of the promotion schedule.
199
+ * @returns promise
200
+ */
201
+ static clearSteamAuth<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
202
+ /**
203
+ * Clear Discord OAuth credentials from a promotion schedule.
204
+ *
205
+ * @param scheduler_id The ID of the promotion schedule.
206
+ * @returns promise
207
+ */
208
+ static clearDiscordAuth<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
209
+ /**
210
+ * Clear Bluesky OAuth credentials from a promotion schedule.
211
+ *
212
+ * @param scheduler_id The ID of the promotion schedule.
213
+ * @returns promise
214
+ */
215
+ static clearBlueskyAuth<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
216
+ }
217
+ export default Scheduler;
@@ -27,6 +27,16 @@ declare class SocialPosts {
27
27
  * @returns promise
28
28
  */
29
29
  static view<T>(post_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
30
+ /**
31
+ * Update the informationa bout a post, as long as it hasn't been posted.
32
+ *
33
+ * @see https://api.glitch.fun/api/documentation#/Post%20Route/showPostStorage
34
+ *
35
+ * @param post_id The id fo the post to retrieve.
36
+ *
37
+ * @returns promise
38
+ */
39
+ static update<T>(post_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
30
40
  /**
31
41
  * Dispute a post as being fraudulent.,s
32
42
  *
@@ -47,5 +57,27 @@ declare class SocialPosts {
47
57
  * @returns promise
48
58
  */
49
59
  static history<T>(post_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
60
+ /**
61
+ * Add media to a social media post.
62
+ *
63
+ * @see https://api.glitch.fun/api/documentation#/Social%20Media%20Posts/addMediaToSocialMediaPost
64
+ *
65
+ * @param post_id The ID of the social media post.
66
+ * @param data The data to be sent in the request body.
67
+ *
68
+ * @returns promise
69
+ */
70
+ static addMedia<T>(post_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
71
+ /**
72
+ * Remove media from a social media post.
73
+ *
74
+ * @see https://api.glitch.fun/api/documentation#/Social%20Media%20Posts/removeMediaFromSocialMediaPost
75
+ *
76
+ * @param post_id The ID of the social media post.
77
+ * @param media_id The ID of the media to remove.
78
+ *
79
+ * @returns promise
80
+ */
81
+ static removeMedia<T>(post_id: string, media_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
50
82
  }
51
83
  export default SocialPosts;
@@ -25,6 +25,8 @@ import Publications from "./Publications";
25
25
  import GameShows from "./GameShows";
26
26
  import Newsletters from "./Newsletters";
27
27
  import PlayTests from "./PlayTests";
28
+ import Media from "./Media";
29
+ import Scheduler from "./Scheduler";
28
30
  export { Auth };
29
31
  export { Competitions };
30
32
  export { Communities };
@@ -52,3 +54,5 @@ export { Publications };
52
54
  export { GameShows };
53
55
  export { Newsletters };
54
56
  export { PlayTests };
57
+ export { Media };
58
+ export { Scheduler };
@@ -25,6 +25,8 @@ import { Publications } from "./api";
25
25
  import { GameShows } from "./api";
26
26
  import { Newsletters } from "./api";
27
27
  import { PlayTests } from "./api";
28
+ import { Media } from "./api";
29
+ import { Scheduler } from "./api";
28
30
  import Requests from "./util/Requests";
29
31
  import Parser from "./util/Parser";
30
32
  import Session from "./util/Session";
@@ -71,6 +73,8 @@ declare class Glitch {
71
73
  Publications: typeof Publications;
72
74
  Newsletters: typeof Newsletters;
73
75
  PlayTests: typeof PlayTests;
76
+ Media: typeof Media;
77
+ Scheduler: typeof Scheduler;
74
78
  };
75
79
  static util: {
76
80
  Requests: typeof Requests;