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/index.d.ts
CHANGED
|
@@ -4760,6 +4760,19 @@ declare class Scheduler {
|
|
|
4760
4760
|
* @returns promise
|
|
4761
4761
|
*/
|
|
4762
4762
|
static getSchedulePosts<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4763
|
+
/**
|
|
4764
|
+
* Rewrite / generate content for a promotion schedule.
|
|
4765
|
+
*
|
|
4766
|
+
* @see https://api.glitch.fun/api/documentation#/Scheduler/generateTitleContent
|
|
4767
|
+
*
|
|
4768
|
+
* @param scheduler_id UUID of the promotion schedule.
|
|
4769
|
+
* @param data Body payload. At minimum you must supply
|
|
4770
|
+
* `{ platform: 'twitter' }` plus either `content`
|
|
4771
|
+
* **or** a `media` array containing at least one
|
|
4772
|
+
* `{ id: '<media-uuid>' }`.
|
|
4773
|
+
* @returns Axios promise with `{ content, title? }`
|
|
4774
|
+
*/
|
|
4775
|
+
static generateTitleContent<T>(scheduler_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4763
4776
|
/**
|
|
4764
4777
|
* List title updates for a promotion schedule.
|
|
4765
4778
|
*
|
package/package.json
CHANGED
package/src/api/Scheduler.ts
CHANGED
|
@@ -95,6 +95,32 @@ class Scheduler {
|
|
|
95
95
|
return Requests.processRoute(SchedulerRoute.routes.getSchedulePosts, {}, { scheduler_id }, params);
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
+
/**
|
|
99
|
+
* Rewrite / generate content for a promotion schedule.
|
|
100
|
+
*
|
|
101
|
+
* @see https://api.glitch.fun/api/documentation#/Scheduler/generateTitleContent
|
|
102
|
+
*
|
|
103
|
+
* @param scheduler_id UUID of the promotion schedule.
|
|
104
|
+
* @param data Body payload. At minimum you must supply
|
|
105
|
+
* `{ platform: 'twitter' }` plus either `content`
|
|
106
|
+
* **or** a `media` array containing at least one
|
|
107
|
+
* `{ id: '<media-uuid>' }`.
|
|
108
|
+
* @returns Axios promise with `{ content, title? }`
|
|
109
|
+
*/
|
|
110
|
+
public static generateTitleContent<T>(
|
|
111
|
+
scheduler_id: string,
|
|
112
|
+
data: object,
|
|
113
|
+
params?: Record<string, any>
|
|
114
|
+
): AxiosPromise<Response<T>> {
|
|
115
|
+
return Requests.processRoute(
|
|
116
|
+
SchedulerRoute.routes.generateContent,
|
|
117
|
+
data, // request body
|
|
118
|
+
{ scheduler_id }, // path params
|
|
119
|
+
params // query params
|
|
120
|
+
);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
|
|
98
124
|
/**
|
|
99
125
|
* List title updates for a promotion schedule.
|
|
100
126
|
*
|