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
package/dist/cjs/index.js
CHANGED
|
@@ -26062,6 +26062,10 @@ var SchedulerRoute = /** @class */ (function () {
|
|
|
26062
26062
|
url: "/schedulers/{scheduler_id}/funding_instruments",
|
|
26063
26063
|
method: HTTP_METHODS.GET,
|
|
26064
26064
|
},
|
|
26065
|
+
generateContent: {
|
|
26066
|
+
url: '/schedulers/{scheduler_id}/generateContent',
|
|
26067
|
+
method: HTTP_METHODS.POST
|
|
26068
|
+
},
|
|
26065
26069
|
};
|
|
26066
26070
|
return SchedulerRoute;
|
|
26067
26071
|
}());
|
|
@@ -26153,6 +26157,24 @@ var Scheduler = /** @class */ (function () {
|
|
|
26153
26157
|
Scheduler.getSchedulePosts = function (scheduler_id, params) {
|
|
26154
26158
|
return Requests.processRoute(SchedulerRoute.routes.getSchedulePosts, {}, { scheduler_id: scheduler_id }, params);
|
|
26155
26159
|
};
|
|
26160
|
+
/**
|
|
26161
|
+
* Rewrite / generate content for a promotion schedule.
|
|
26162
|
+
*
|
|
26163
|
+
* @see https://api.glitch.fun/api/documentation#/Scheduler/generateTitleContent
|
|
26164
|
+
*
|
|
26165
|
+
* @param scheduler_id UUID of the promotion schedule.
|
|
26166
|
+
* @param data Body payload. At minimum you must supply
|
|
26167
|
+
* `{ platform: 'twitter' }` plus either `content`
|
|
26168
|
+
* **or** a `media` array containing at least one
|
|
26169
|
+
* `{ id: '<media-uuid>' }`.
|
|
26170
|
+
* @returns Axios promise with `{ content, title? }`
|
|
26171
|
+
*/
|
|
26172
|
+
Scheduler.generateTitleContent = function (scheduler_id, data, params) {
|
|
26173
|
+
return Requests.processRoute(SchedulerRoute.routes.generateContent, data, // request body
|
|
26174
|
+
{ scheduler_id: scheduler_id }, // path params
|
|
26175
|
+
params // query params
|
|
26176
|
+
);
|
|
26177
|
+
};
|
|
26156
26178
|
/**
|
|
26157
26179
|
* List title updates for a promotion schedule.
|
|
26158
26180
|
*
|