glitch-javascript-sdk 1.1.6 → 1.1.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.
@@ -37,5 +37,15 @@ declare class SocialPosts {
37
37
  * @returns promise
38
38
  */
39
39
  static dispute<T>(post_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
40
+ /**
41
+ * Get the change of the post metrics over a period of time.
42
+ *
43
+ * @see https://api.glitch.fun/api/documentation#/Social%20Media%20Posts/getSocialMediaPostHistory
44
+ *
45
+ * @param post_id The id fo the post to retrieve.
46
+ *
47
+ * @returns promise
48
+ */
49
+ static history<T>(post_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
40
50
  }
41
51
  export default SocialPosts;
package/dist/esm/index.js CHANGED
@@ -8879,6 +8879,7 @@ var SocialPostsRoute = /** @class */ (function () {
8879
8879
  createPost: { url: '/socialposts', method: HTTP_METHODS.POST },
8880
8880
  retrievePost: { url: '/socialposts/{post_id}', method: HTTP_METHODS.GET },
8881
8881
  dispute: { url: '/social/{post_id}/dispute', method: HTTP_METHODS.POST },
8882
+ history: { url: '/socialposts/{post_id}/history', method: HTTP_METHODS.GET },
8882
8883
  };
8883
8884
  return SocialPostsRoute;
8884
8885
  }());
@@ -8930,6 +8931,18 @@ var SocialPosts = /** @class */ (function () {
8930
8931
  SocialPosts.dispute = function (post_id, data, params) {
8931
8932
  return Requests.processRoute(SocialPostsRoute.routes.dispute, data, { post_id: post_id }, params);
8932
8933
  };
8934
+ /**
8935
+ * Get the change of the post metrics over a period of time.
8936
+ *
8937
+ * @see https://api.glitch.fun/api/documentation#/Social%20Media%20Posts/getSocialMediaPostHistory
8938
+ *
8939
+ * @param post_id The id fo the post to retrieve.
8940
+ *
8941
+ * @returns promise
8942
+ */
8943
+ SocialPosts.history = function (post_id, params) {
8944
+ return Requests.processRoute(SocialPostsRoute.routes.history, {}, { post_id: post_id }, params);
8945
+ };
8933
8946
  return SocialPosts;
8934
8947
  }());
8935
8948