glitch-javascript-sdk 1.9.2 → 1.9.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 +22 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Scheduler.d.ts +13 -0
- package/dist/esm/index.js +22 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +13 -0
- package/package.json +1 -1
- package/src/api/Scheduler.ts +26 -0
- package/src/routes/SchedulerRoute.ts +4 -0
|
@@ -71,6 +71,19 @@ declare class Scheduler {
|
|
|
71
71
|
* @returns promise
|
|
72
72
|
*/
|
|
73
73
|
static getSchedulePosts<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
74
|
+
/**
|
|
75
|
+
* Rewrite / generate content for a promotion schedule.
|
|
76
|
+
*
|
|
77
|
+
* @see https://api.glitch.fun/api/documentation#/Scheduler/generateTitleContent
|
|
78
|
+
*
|
|
79
|
+
* @param scheduler_id UUID of the promotion schedule.
|
|
80
|
+
* @param data Body payload. At minimum you must supply
|
|
81
|
+
* `{ platform: 'twitter' }` plus either `content`
|
|
82
|
+
* **or** a `media` array containing at least one
|
|
83
|
+
* `{ id: '<media-uuid>' }`.
|
|
84
|
+
* @returns Axios promise with `{ content, title? }`
|
|
85
|
+
*/
|
|
86
|
+
static generateTitleContent<T>(scheduler_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
74
87
|
/**
|
|
75
88
|
* List title updates for a promotion schedule.
|
|
76
89
|
*
|
package/dist/esm/index.js
CHANGED
|
@@ -12878,6 +12878,10 @@ var SchedulerRoute = /** @class */ (function () {
|
|
|
12878
12878
|
url: "/schedulers/{scheduler_id}/funding_instruments",
|
|
12879
12879
|
method: HTTP_METHODS.GET,
|
|
12880
12880
|
},
|
|
12881
|
+
generateContent: {
|
|
12882
|
+
url: '/schedulers/{scheduler_id}/generateContent',
|
|
12883
|
+
method: HTTP_METHODS.POST
|
|
12884
|
+
},
|
|
12881
12885
|
};
|
|
12882
12886
|
return SchedulerRoute;
|
|
12883
12887
|
}());
|
|
@@ -12969,6 +12973,24 @@ var Scheduler = /** @class */ (function () {
|
|
|
12969
12973
|
Scheduler.getSchedulePosts = function (scheduler_id, params) {
|
|
12970
12974
|
return Requests.processRoute(SchedulerRoute.routes.getSchedulePosts, {}, { scheduler_id: scheduler_id }, params);
|
|
12971
12975
|
};
|
|
12976
|
+
/**
|
|
12977
|
+
* Rewrite / generate content for a promotion schedule.
|
|
12978
|
+
*
|
|
12979
|
+
* @see https://api.glitch.fun/api/documentation#/Scheduler/generateTitleContent
|
|
12980
|
+
*
|
|
12981
|
+
* @param scheduler_id UUID of the promotion schedule.
|
|
12982
|
+
* @param data Body payload. At minimum you must supply
|
|
12983
|
+
* `{ platform: 'twitter' }` plus either `content`
|
|
12984
|
+
* **or** a `media` array containing at least one
|
|
12985
|
+
* `{ id: '<media-uuid>' }`.
|
|
12986
|
+
* @returns Axios promise with `{ content, title? }`
|
|
12987
|
+
*/
|
|
12988
|
+
Scheduler.generateTitleContent = function (scheduler_id, data, params) {
|
|
12989
|
+
return Requests.processRoute(SchedulerRoute.routes.generateContent, data, // request body
|
|
12990
|
+
{ scheduler_id: scheduler_id }, // path params
|
|
12991
|
+
params // query params
|
|
12992
|
+
);
|
|
12993
|
+
};
|
|
12972
12994
|
/**
|
|
12973
12995
|
* List title updates for a promotion schedule.
|
|
12974
12996
|
*
|