glitch-javascript-sdk 0.6.2 → 0.6.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
@@ -2071,6 +2071,35 @@ declare class TipPackagePurchases {
2071
2071
  static processStripePaymentIntent<T>(data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
2072
2072
  }
2073
2073
 
2074
+ declare class SocialPosts {
2075
+ /**
2076
+ * List all the Posts.
2077
+ *
2078
+ * @see https://api.glitch.fun/api/documentation#/Post%20Route/resourcePostList
2079
+ *
2080
+ * @returns promise
2081
+ */
2082
+ static list<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
2083
+ /**
2084
+ * Give a tip to another user
2085
+ *
2086
+ * @see https://api.glitch.fun/api/documentation#/Authentication%20Route/authLogin
2087
+ *
2088
+ * @returns A promise
2089
+ */
2090
+ static create<T>(data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
2091
+ /**
2092
+ * Retrieve the information for a single post.
2093
+ *
2094
+ * @see https://api.glitch.fun/api/documentation#/Post%20Route/showPostStorage
2095
+ *
2096
+ * @param post_id The id fo the post to retrieve.
2097
+ *
2098
+ * @returns promise
2099
+ */
2100
+ static view<T>(post_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
2101
+ }
2102
+
2074
2103
  interface Route {
2075
2104
  url: string;
2076
2105
  method: string;
@@ -2381,6 +2410,7 @@ declare class Glitch {
2381
2410
  Utility: typeof Utility;
2382
2411
  Tips: typeof Tips;
2383
2412
  Social: typeof Social;
2413
+ SocialPosts: typeof SocialPosts;
2384
2414
  TipPackages: typeof TipPackages;
2385
2415
  TipEmojis: typeof TipEmojis;
2386
2416
  TipPackagePurchases: typeof TipPackagePurchases;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glitch-javascript-sdk",
3
- "version": "0.6.2",
3
+ "version": "0.6.4",
4
4
  "description": "Javascript SDK for Glitch",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -24,7 +24,7 @@ class SocialPosts {
24
24
  * @returns A promise
25
25
  */
26
26
  public static create<T>(data? : object, params?: Record<string, any>) : AxiosPromise<Response<T>> {
27
- return Requests.processRoute(SocialPostsRoute.routes.create, data, {}, params);
27
+ return Requests.processRoute(SocialPostsRoute.routes.createPost, data, {}, params);
28
28
  }
29
29
 
30
30
  /**
package/src/index.ts CHANGED
@@ -61,6 +61,7 @@ class Glitch {
61
61
  Utility : Utility,
62
62
  Tips: Tips,
63
63
  Social : Social,
64
+ SocialPosts : SocialPosts,
64
65
  TipPackages : TipPackages,
65
66
  TipEmojis : TipEmojis ,
66
67
  TipPackagePurchases: TipPackagePurchases