glitch-javascript-sdk 1.5.2 → 1.5.4

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.
@@ -66,6 +66,16 @@ declare class SocialPosts {
66
66
  * @returns promise
67
67
  */
68
68
  static history<T>(post_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
69
+ /**
70
+ * Get the change progression of a social media post over period of time.
71
+ *
72
+ * @see https://api.glitch.fun/api/documentation#/Social%20Media%20Posts/getSocialMediaPostHistory
73
+ *
74
+ * @param post_id The id fo the post to retrieve.
75
+ *
76
+ * @returns promise
77
+ */
78
+ static progression<T>(post_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
69
79
  /**
70
80
  * Add media to a social media post.
71
81
  *
@@ -107,5 +117,15 @@ declare class SocialPosts {
107
117
  * @returns promise
108
118
  */
109
119
  static reports<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
120
+ /**
121
+ * Update the information about a post impressions, for posts who API do not give view counts.
122
+ *
123
+ * @see https://api.glitch.fun/api/documentation#/Post%20Route/showPostStorage
124
+ *
125
+ * @param post_id The id fo the post to retrieve.
126
+ *
127
+ * @returns promise
128
+ */
129
+ static updatePostImpressions<T>(post_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
110
130
  }
111
131
  export default SocialPosts;
package/dist/esm/index.js CHANGED
@@ -9358,10 +9358,12 @@ var SocialPostsRoute = /** @class */ (function () {
9358
9358
  deletePost: { url: '/socialposts/{post_id}', method: HTTP_METHODS.DELETE },
9359
9359
  dispute: { url: '/social/{post_id}/dispute', method: HTTP_METHODS.POST },
9360
9360
  history: { url: '/socialposts/{post_id}/history', method: HTTP_METHODS.GET },
9361
+ progression: { url: '/socialposts/{post_id}/progression', method: HTTP_METHODS.GET },
9361
9362
  addMedia: { url: '/socialposts/{post_id}/addMedia', method: HTTP_METHODS.POST },
9362
9363
  removeMedia: { url: '/socialposts/{post_id}/removeMedia/{media_id}', method: HTTP_METHODS.DELETE },
9363
9364
  reschedule: { url: '/socialposts/{post_id}/reschedule', method: HTTP_METHODS.POST },
9364
9365
  reports: { url: '/socialposts/{post_id}/reports', method: HTTP_METHODS.GET },
9366
+ updatePostImpressions: { url: '/socialposts/{post_id}/impressions', method: HTTP_METHODS.PUT },
9365
9367
  };
9366
9368
  return SocialPostsRoute;
9367
9369
  }());
@@ -9448,6 +9450,18 @@ var SocialPosts = /** @class */ (function () {
9448
9450
  SocialPosts.history = function (post_id, params) {
9449
9451
  return Requests.processRoute(SocialPostsRoute.routes.history, {}, { post_id: post_id }, params);
9450
9452
  };
9453
+ /**
9454
+ * Get the change progression of a social media post over period of time.
9455
+ *
9456
+ * @see https://api.glitch.fun/api/documentation#/Social%20Media%20Posts/getSocialMediaPostHistory
9457
+ *
9458
+ * @param post_id The id fo the post to retrieve.
9459
+ *
9460
+ * @returns promise
9461
+ */
9462
+ SocialPosts.progression = function (post_id, params) {
9463
+ return Requests.processRoute(SocialPostsRoute.routes.progression, {}, { post_id: post_id }, params);
9464
+ };
9451
9465
  /**
9452
9466
  * Add media to a social media post.
9453
9467
  *
@@ -9497,6 +9511,18 @@ var SocialPosts = /** @class */ (function () {
9497
9511
  SocialPosts.reports = function (params) {
9498
9512
  return Requests.processRoute(SocialPostsRoute.routes.reports, undefined, undefined, params);
9499
9513
  };
9514
+ /**
9515
+ * Update the information about a post impressions, for posts who API do not give view counts.
9516
+ *
9517
+ * @see https://api.glitch.fun/api/documentation#/Post%20Route/showPostStorage
9518
+ *
9519
+ * @param post_id The id fo the post to retrieve.
9520
+ *
9521
+ * @returns promise
9522
+ */
9523
+ SocialPosts.updatePostImpressions = function (post_id, data, params) {
9524
+ return Requests.processRoute(SocialPostsRoute.routes.updatePostImpressions, data, { post_id: post_id }, params);
9525
+ };
9500
9526
  return SocialPosts;
9501
9527
  }());
9502
9528