glitch-javascript-sdk 1.4.2 → 1.4.3
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 +33 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Scheduler.d.ts +16 -0
- package/dist/esm/api/SocialPosts.d.ts +8 -0
- package/dist/esm/index.js +33 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +24 -0
- package/package.json +1 -1
- package/src/api/Scheduler.ts +22 -0
- package/src/api/SocialPosts.ts +11 -0
- package/src/routes/SchedulerRoute.ts +2 -0
- package/src/routes/SocialPostsRoute.ts +2 -0
package/dist/index.d.ts
CHANGED
|
@@ -2657,6 +2657,14 @@ declare class SocialPosts {
|
|
|
2657
2657
|
* @returns promise
|
|
2658
2658
|
*/
|
|
2659
2659
|
static reschedule<T>(post_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
2660
|
+
/**
|
|
2661
|
+
* Get the reports for a social media post
|
|
2662
|
+
*
|
|
2663
|
+
* @see https://api.glitch.fun/api/documentation#/Post%20Route/resourcePostList
|
|
2664
|
+
*
|
|
2665
|
+
* @returns promise
|
|
2666
|
+
*/
|
|
2667
|
+
static reports<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
2660
2668
|
}
|
|
2661
2669
|
|
|
2662
2670
|
declare class Titles {
|
|
@@ -4193,6 +4201,22 @@ declare class Scheduler {
|
|
|
4193
4201
|
* @returns promise
|
|
4194
4202
|
*/
|
|
4195
4203
|
static getDiscordChannels<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4204
|
+
/**
|
|
4205
|
+
* Get aggregated reports for a promotion schedule.
|
|
4206
|
+
*
|
|
4207
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
4208
|
+
* @param params Query parameters (e.g., social_platform, start_date, end_date)
|
|
4209
|
+
* @returns promise
|
|
4210
|
+
*/
|
|
4211
|
+
static getSchedulerReports<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4212
|
+
/**
|
|
4213
|
+
* Get progression data for social media posts over time.
|
|
4214
|
+
*
|
|
4215
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
4216
|
+
* @param params Query parameters (e.g., social_platform, start_date, end_date)
|
|
4217
|
+
* @returns promise
|
|
4218
|
+
*/
|
|
4219
|
+
static getSchedulerProgression<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4196
4220
|
}
|
|
4197
4221
|
|
|
4198
4222
|
declare class Funnel {
|
package/package.json
CHANGED
package/src/api/Scheduler.ts
CHANGED
|
@@ -356,6 +356,28 @@ class Scheduler {
|
|
|
356
356
|
return Requests.processRoute(SchedulerRoute.routes.getDiscordChannels, {}, { scheduler_id }, params);
|
|
357
357
|
}
|
|
358
358
|
|
|
359
|
+
/**
|
|
360
|
+
* Get aggregated reports for a promotion schedule.
|
|
361
|
+
*
|
|
362
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
363
|
+
* @param params Query parameters (e.g., social_platform, start_date, end_date)
|
|
364
|
+
* @returns promise
|
|
365
|
+
*/
|
|
366
|
+
public static getSchedulerReports<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
367
|
+
return Requests.processRoute(SchedulerRoute.routes.getSchedulerReports, {}, { scheduler_id }, params);
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
/**
|
|
371
|
+
* Get progression data for social media posts over time.
|
|
372
|
+
*
|
|
373
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
374
|
+
* @param params Query parameters (e.g., social_platform, start_date, end_date)
|
|
375
|
+
* @returns promise
|
|
376
|
+
*/
|
|
377
|
+
public static getSchedulerProgression<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
378
|
+
return Requests.processRoute(SchedulerRoute.routes.getSchedulerProgression, {}, { scheduler_id }, params);
|
|
379
|
+
}
|
|
380
|
+
|
|
359
381
|
}
|
|
360
382
|
|
|
361
383
|
export default Scheduler;
|
package/src/api/SocialPosts.ts
CHANGED
|
@@ -126,6 +126,17 @@ class SocialPosts {
|
|
|
126
126
|
return Requests.processRoute(SocialPostsRoute.routes.reschedule, data, { post_id: post_id }, params);
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
+
/**
|
|
130
|
+
* Get the reports for a social media post
|
|
131
|
+
*
|
|
132
|
+
* @see https://api.glitch.fun/api/documentation#/Post%20Route/resourcePostList
|
|
133
|
+
*
|
|
134
|
+
* @returns promise
|
|
135
|
+
*/
|
|
136
|
+
public static reports<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
137
|
+
return Requests.processRoute(SocialPostsRoute.routes.reports, undefined, undefined, params);
|
|
138
|
+
}
|
|
139
|
+
|
|
129
140
|
}
|
|
130
141
|
|
|
131
142
|
export default SocialPosts;
|
|
@@ -19,6 +19,8 @@ class SchedulerRoute {
|
|
|
19
19
|
deleteUpdate: { url: '/schedulers/{scheduler_id}/updates/{update_id}', method: HTTP_METHODS.DELETE },
|
|
20
20
|
|
|
21
21
|
testTone: { url: '/schedulers/{scheduler_id}/tone', method: HTTP_METHODS.POST },
|
|
22
|
+
getSchedulerReports: { url: '/schedulers/{scheduler_id}/reports', method: HTTP_METHODS.GET },
|
|
23
|
+
getSchedulerProgression: { url: '/schedulers/{scheduler_id}/progression', method: HTTP_METHODS.GET },
|
|
22
24
|
|
|
23
25
|
// Clear OAuth Routes
|
|
24
26
|
clearTwitterAuth: { url: '/schedulers/{scheduler_id}/clearTwitterAuth', method: HTTP_METHODS.DELETE },
|
|
@@ -13,6 +13,8 @@ class SocialPostsRoute {
|
|
|
13
13
|
addMedia: { url: '/socialposts/{post_id}/addMedia', method: HTTP_METHODS.POST },
|
|
14
14
|
removeMedia: { url: '/socialposts/{post_id}/removeMedia/{media_id}', method: HTTP_METHODS.DELETE },
|
|
15
15
|
reschedule: { url: '/socialposts/{post_id}/reschedule', method: HTTP_METHODS.POST },
|
|
16
|
+
reports: { url: '/socialposts/{post_id}/reports', method: HTTP_METHODS.GET },
|
|
17
|
+
|
|
16
18
|
};
|
|
17
19
|
|
|
18
20
|
}
|