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.
package/dist/index.d.ts CHANGED
@@ -2658,6 +2658,16 @@ declare class SocialPosts {
2658
2658
  * @returns promise
2659
2659
  */
2660
2660
  static history<T>(post_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
2661
+ /**
2662
+ * Get the change progression of a social media post over period of time.
2663
+ *
2664
+ * @see https://api.glitch.fun/api/documentation#/Social%20Media%20Posts/getSocialMediaPostHistory
2665
+ *
2666
+ * @param post_id The id fo the post to retrieve.
2667
+ *
2668
+ * @returns promise
2669
+ */
2670
+ static progression<T>(post_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
2661
2671
  /**
2662
2672
  * Add media to a social media post.
2663
2673
  *
@@ -2699,6 +2709,16 @@ declare class SocialPosts {
2699
2709
  * @returns promise
2700
2710
  */
2701
2711
  static reports<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
2712
+ /**
2713
+ * Update the information about a post impressions, for posts who API do not give view counts.
2714
+ *
2715
+ * @see https://api.glitch.fun/api/documentation#/Post%20Route/showPostStorage
2716
+ *
2717
+ * @param post_id The id fo the post to retrieve.
2718
+ *
2719
+ * @returns promise
2720
+ */
2721
+ static updatePostImpressions<T>(post_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
2702
2722
  }
2703
2723
 
2704
2724
  declare class Titles {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glitch-javascript-sdk",
3
- "version": "1.5.2",
3
+ "version": "1.5.4",
4
4
  "description": "Javascript SDK for Glitch",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -98,6 +98,20 @@ class SocialPosts {
98
98
  return Requests.processRoute(SocialPostsRoute.routes.history, {}, { post_id: post_id }, params);
99
99
  }
100
100
 
101
+ /**
102
+ * Get the change progression of a social media post over period of time.
103
+ *
104
+ * @see https://api.glitch.fun/api/documentation#/Social%20Media%20Posts/getSocialMediaPostHistory
105
+ *
106
+ * @param post_id The id fo the post to retrieve.
107
+ *
108
+ * @returns promise
109
+ */
110
+ public static progression<T>(post_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
111
+
112
+ return Requests.processRoute(SocialPostsRoute.routes.progression, {}, { post_id: post_id }, params);
113
+ }
114
+
101
115
  /**
102
116
  * Add media to a social media post.
103
117
  *
@@ -151,6 +165,20 @@ class SocialPosts {
151
165
  return Requests.processRoute(SocialPostsRoute.routes.reports, undefined, undefined, params);
152
166
  }
153
167
 
168
+ /**
169
+ * Update the information about a post impressions, for posts who API do not give view counts.
170
+ *
171
+ * @see https://api.glitch.fun/api/documentation#/Post%20Route/showPostStorage
172
+ *
173
+ * @param post_id The id fo the post to retrieve.
174
+ *
175
+ * @returns promise
176
+ */
177
+ public static updatePostImpressions<T>(post_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
178
+
179
+ return Requests.processRoute(SocialPostsRoute.routes.updatePostImpressions, data, { post_id: post_id }, params);
180
+ }
181
+
154
182
  }
155
183
 
156
184
  export default SocialPosts;
@@ -11,10 +11,12 @@ class SocialPostsRoute {
11
11
  deletePost : { url: '/socialposts/{post_id}', method: HTTP_METHODS.DELETE },
12
12
  dispute: { url: '/social/{post_id}/dispute', method: HTTP_METHODS.POST },
13
13
  history : { url: '/socialposts/{post_id}/history', method: HTTP_METHODS.GET },
14
+ progression : { url: '/socialposts/{post_id}/progression', method: HTTP_METHODS.GET },
14
15
  addMedia: { url: '/socialposts/{post_id}/addMedia', method: HTTP_METHODS.POST },
15
16
  removeMedia: { url: '/socialposts/{post_id}/removeMedia/{media_id}', method: HTTP_METHODS.DELETE },
16
17
  reschedule: { url: '/socialposts/{post_id}/reschedule', method: HTTP_METHODS.POST },
17
18
  reports: { url: '/socialposts/{post_id}/reports', method: HTTP_METHODS.GET },
19
+ updatePostImpressions : { url: '/socialposts/{post_id}/impressions', method: HTTP_METHODS.PUT },
18
20
 
19
21
  };
20
22