glitch-javascript-sdk 1.0.8 → 1.0.9
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
|
@@ -2263,6 +2263,16 @@ declare class SocialPosts {
|
|
|
2263
2263
|
* @returns promise
|
|
2264
2264
|
*/
|
|
2265
2265
|
static view<T>(post_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
2266
|
+
/**
|
|
2267
|
+
* Dispute a post as being fraudulent.,s
|
|
2268
|
+
*
|
|
2269
|
+
* @see https://api.glitch.fun/api/documentation#/Social%20Media%20Posts/disputePost
|
|
2270
|
+
*
|
|
2271
|
+
* @param post_id The id fo the post to retrieve.
|
|
2272
|
+
*
|
|
2273
|
+
* @returns promise
|
|
2274
|
+
*/
|
|
2275
|
+
static dispute<T>(post_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
2266
2276
|
}
|
|
2267
2277
|
|
|
2268
2278
|
declare class Titles {
|
package/package.json
CHANGED
package/src/api/SocialPosts.ts
CHANGED
|
@@ -41,6 +41,20 @@ class SocialPosts {
|
|
|
41
41
|
return Requests.processRoute(SocialPostsRoute.routes.retrievePost, {}, { post_id: post_id }, params);
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
+
/**
|
|
45
|
+
* Dispute a post as being fraudulent.,s
|
|
46
|
+
*
|
|
47
|
+
* @see https://api.glitch.fun/api/documentation#/Social%20Media%20Posts/disputePost
|
|
48
|
+
*
|
|
49
|
+
* @param post_id The id fo the post to retrieve.
|
|
50
|
+
*
|
|
51
|
+
* @returns promise
|
|
52
|
+
*/
|
|
53
|
+
public static dispute<T>(post_id: string, data? : object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
54
|
+
|
|
55
|
+
return Requests.processRoute(SocialPostsRoute.routes.dispute, data, { post_id: post_id }, params);
|
|
56
|
+
}
|
|
57
|
+
|
|
44
58
|
}
|
|
45
59
|
|
|
46
60
|
export default SocialPosts;
|
|
@@ -7,6 +7,7 @@ class SocialPostsRoute {
|
|
|
7
7
|
getPosts: { url: '/socialposts', method: HTTP_METHODS.GET },
|
|
8
8
|
createPost: { url: '/socialposts', method: HTTP_METHODS.POST },
|
|
9
9
|
retrievePost : { url: '/socialposts/{post_id}', method: HTTP_METHODS.GET },
|
|
10
|
+
dispute: { url: '/social/{post_id}/dispute', method: HTTP_METHODS.POST },
|
|
10
11
|
};
|
|
11
12
|
|
|
12
13
|
}
|