glitch-javascript-sdk 2.3.6 → 2.3.7
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/package.json
CHANGED
package/src/api/SocialPosts.ts
CHANGED
|
@@ -351,7 +351,17 @@ class SocialPosts {
|
|
|
351
351
|
public static performAction<T>(post_id: string, action: 'like' | 'unlike' | 'repost' | 'unrepost' | 'vote_up' | 'vote_down' | 'unvote'): AxiosPromise<Response<T>> {
|
|
352
352
|
return Requests.processRoute(SocialPostsRoute.routes.performAction, { action }, { post_id });
|
|
353
353
|
}
|
|
354
|
-
|
|
354
|
+
|
|
355
|
+
/**
|
|
356
|
+
* Perform a social action (Like, Repost, Vote) on a comment.
|
|
357
|
+
*
|
|
358
|
+
* @param comment_id The ID of the comment.
|
|
359
|
+
* @param action The action to perform.
|
|
360
|
+
* @returns promise
|
|
361
|
+
*/
|
|
362
|
+
public static performCommentAction<T>(comment_id: string, action: 'like' | 'unlike' | 'repost' | 'unrepost' | 'vote_up' | 'vote_down' | 'unvote'): AxiosPromise<Response<T>> {
|
|
363
|
+
return Requests.processRoute(SocialPostsRoute.routes.performCommentAction, { action }, { comment_id });
|
|
364
|
+
}
|
|
355
365
|
}
|
|
356
366
|
|
|
357
367
|
export default SocialPosts;
|
|
@@ -37,7 +37,7 @@ class SocialPostsRoute {
|
|
|
37
37
|
syncHistory: { url: '/social/sync-history/{platform}', method: HTTP_METHODS.POST },
|
|
38
38
|
|
|
39
39
|
performAction: { url: '/socialposts/{post_id}/action', method: HTTP_METHODS.POST },
|
|
40
|
-
|
|
40
|
+
performCommentAction: { url: '/socialposts/comments/{comment_id}/action', method: HTTP_METHODS.POST },
|
|
41
41
|
};
|
|
42
42
|
|
|
43
43
|
}
|