glitch-javascript-sdk 2.1.4 → 2.1.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.
- package/dist/cjs/index.js +11 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/SocialPosts.d.ts +8 -0
- package/dist/esm/index.js +11 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +8 -0
- package/package.json +1 -1
- package/src/api/SocialPosts.ts +11 -0
- package/src/routes/SocialPostsRoute.ts +2 -0
package/dist/index.d.ts
CHANGED
|
@@ -3580,6 +3580,14 @@ declare class SocialPosts {
|
|
|
3580
3580
|
* @returns A promise
|
|
3581
3581
|
*/
|
|
3582
3582
|
static updateCommentMetrics<T>(comment_id: string): AxiosPromise<Response<T>>;
|
|
3583
|
+
/**
|
|
3584
|
+
* Create a new top-level comment on a post.
|
|
3585
|
+
*
|
|
3586
|
+
* @param post_id The ID of the social media post to comment on.
|
|
3587
|
+
* @param data The content of the comment.
|
|
3588
|
+
* @returns A promise
|
|
3589
|
+
*/
|
|
3590
|
+
static createComment<T>(post_id: string, data: object): AxiosPromise<Response<T>>;
|
|
3583
3591
|
}
|
|
3584
3592
|
|
|
3585
3593
|
declare class Titles {
|
package/package.json
CHANGED
package/src/api/SocialPosts.ts
CHANGED
|
@@ -286,6 +286,17 @@ class SocialPosts {
|
|
|
286
286
|
return Requests.processRoute(SocialPostsRoute.routes.updateCommentMetrics, undefined, { comment_id });
|
|
287
287
|
}
|
|
288
288
|
|
|
289
|
+
/**
|
|
290
|
+
* Create a new top-level comment on a post.
|
|
291
|
+
*
|
|
292
|
+
* @param post_id The ID of the social media post to comment on.
|
|
293
|
+
* @param data The content of the comment.
|
|
294
|
+
* @returns A promise
|
|
295
|
+
*/
|
|
296
|
+
public static createComment<T>(post_id: string, data: object): AxiosPromise<Response<T>> {
|
|
297
|
+
return Requests.processRoute(SocialPostsRoute.routes.createComment, data, { post_id });
|
|
298
|
+
}
|
|
299
|
+
|
|
289
300
|
}
|
|
290
301
|
|
|
291
302
|
export default SocialPosts;
|
|
@@ -29,6 +29,8 @@ class SocialPostsRoute {
|
|
|
29
29
|
markCommentForResponse: { url: '/socialposts/comments/{comment_id}/mark-for-response', method: HTTP_METHODS.PUT },
|
|
30
30
|
getCommentThread: { url: '/socialposts/comments/{comment_id}/thread', method: HTTP_METHODS.GET },
|
|
31
31
|
updateCommentMetrics: { url: '/socialposts/comments/{comment_id}/update-metrics', method: HTTP_METHODS.PUT },
|
|
32
|
+
createComment: { url: '/socialposts/{post_id}/comments', method: HTTP_METHODS.POST },
|
|
33
|
+
|
|
32
34
|
|
|
33
35
|
};
|
|
34
36
|
|