glitch-javascript-sdk 2.3.5 → 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/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 +21 -0
- package/src/routes/SocialPostsRoute.ts +2 -0
|
@@ -243,5 +243,13 @@ declare class SocialPosts {
|
|
|
243
243
|
* @returns promise
|
|
244
244
|
*/
|
|
245
245
|
static syncHistory<T>(platform: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
246
|
+
/**
|
|
247
|
+
* Perform a social action (Like, Repost, Vote) on a post.
|
|
248
|
+
*
|
|
249
|
+
* @param post_id The ID of the social media post.
|
|
250
|
+
* @param action The action to perform.
|
|
251
|
+
* @returns promise
|
|
252
|
+
*/
|
|
253
|
+
static performAction<T>(post_id: string, action: 'like' | 'unlike' | 'repost' | 'unrepost' | 'vote_up' | 'vote_down' | 'unvote'): AxiosPromise<Response<T>>;
|
|
246
254
|
}
|
|
247
255
|
export default SocialPosts;
|
package/dist/esm/index.js
CHANGED
|
@@ -10951,6 +10951,7 @@ var SocialPostsRoute = /** @class */ (function () {
|
|
|
10951
10951
|
getSocialPostAttributionReport: { url: '/reports/fingerprinting/social-post-attribution', method: HTTP_METHODS.GET },
|
|
10952
10952
|
getLinkSummary: { url: '/socialposts/{post_id}/link-summary', method: HTTP_METHODS.GET },
|
|
10953
10953
|
syncHistory: { url: '/social/sync-history/{platform}', method: HTTP_METHODS.POST },
|
|
10954
|
+
performAction: { url: '/socialposts/{post_id}/action', method: HTTP_METHODS.POST },
|
|
10954
10955
|
};
|
|
10955
10956
|
return SocialPostsRoute;
|
|
10956
10957
|
}());
|
|
@@ -11256,6 +11257,16 @@ var SocialPosts = /** @class */ (function () {
|
|
|
11256
11257
|
SocialPosts.syncHistory = function (platform, params) {
|
|
11257
11258
|
return Requests.processRoute(SocialPostsRoute.routes.syncHistory, {}, { platform: platform }, params);
|
|
11258
11259
|
};
|
|
11260
|
+
/**
|
|
11261
|
+
* Perform a social action (Like, Repost, Vote) on a post.
|
|
11262
|
+
*
|
|
11263
|
+
* @param post_id The ID of the social media post.
|
|
11264
|
+
* @param action The action to perform.
|
|
11265
|
+
* @returns promise
|
|
11266
|
+
*/
|
|
11267
|
+
SocialPosts.performAction = function (post_id, action) {
|
|
11268
|
+
return Requests.processRoute(SocialPostsRoute.routes.performAction, { action: action }, { post_id: post_id });
|
|
11269
|
+
};
|
|
11259
11270
|
return SocialPosts;
|
|
11260
11271
|
}());
|
|
11261
11272
|
|