glitch-javascript-sdk 1.5.2 → 1.5.3
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 +13 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/SocialPosts.d.ts +10 -0
- package/dist/esm/index.js +13 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +10 -0
- package/package.json +1 -1
- package/src/api/SocialPosts.ts +14 -0
- package/src/routes/SocialPostsRoute.ts +1 -0
package/dist/index.d.ts
CHANGED
|
@@ -2699,6 +2699,16 @@ declare class SocialPosts {
|
|
|
2699
2699
|
* @returns promise
|
|
2700
2700
|
*/
|
|
2701
2701
|
static reports<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
2702
|
+
/**
|
|
2703
|
+
* Update the information about a post impressions, for posts who API do not give view counts.
|
|
2704
|
+
*
|
|
2705
|
+
* @see https://api.glitch.fun/api/documentation#/Post%20Route/showPostStorage
|
|
2706
|
+
*
|
|
2707
|
+
* @param post_id The id fo the post to retrieve.
|
|
2708
|
+
*
|
|
2709
|
+
* @returns promise
|
|
2710
|
+
*/
|
|
2711
|
+
static updatePostImpressions<T>(post_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
2702
2712
|
}
|
|
2703
2713
|
|
|
2704
2714
|
declare class Titles {
|
package/package.json
CHANGED
package/src/api/SocialPosts.ts
CHANGED
|
@@ -151,6 +151,20 @@ class SocialPosts {
|
|
|
151
151
|
return Requests.processRoute(SocialPostsRoute.routes.reports, undefined, undefined, params);
|
|
152
152
|
}
|
|
153
153
|
|
|
154
|
+
/**
|
|
155
|
+
* Update the information about a post impressions, for posts who API do not give view counts.
|
|
156
|
+
*
|
|
157
|
+
* @see https://api.glitch.fun/api/documentation#/Post%20Route/showPostStorage
|
|
158
|
+
*
|
|
159
|
+
* @param post_id The id fo the post to retrieve.
|
|
160
|
+
*
|
|
161
|
+
* @returns promise
|
|
162
|
+
*/
|
|
163
|
+
public static updatePostImpressions<T>(post_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
164
|
+
|
|
165
|
+
return Requests.processRoute(SocialPostsRoute.routes.updatePostImpressions, data, { post_id: post_id }, params);
|
|
166
|
+
}
|
|
167
|
+
|
|
154
168
|
}
|
|
155
169
|
|
|
156
170
|
export default SocialPosts;
|
|
@@ -15,6 +15,7 @@ class SocialPostsRoute {
|
|
|
15
15
|
removeMedia: { url: '/socialposts/{post_id}/removeMedia/{media_id}', method: HTTP_METHODS.DELETE },
|
|
16
16
|
reschedule: { url: '/socialposts/{post_id}/reschedule', method: HTTP_METHODS.POST },
|
|
17
17
|
reports: { url: '/socialposts/{post_id}/reports', method: HTTP_METHODS.GET },
|
|
18
|
+
updatePostImpressions : { url: '/socialposts/{post_id}/impressions', method: HTTP_METHODS.PUT },
|
|
18
19
|
|
|
19
20
|
};
|
|
20
21
|
|