glitch-javascript-sdk 0.6.1 → 0.6.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.
@@ -41,6 +41,27 @@ declare class Posts {
41
41
  * @returns promise
42
42
  */
43
43
  static createWithBlob<T>(blob: Blob, data?: object): AxiosPromise<Response<T>>;
44
+ /**
45
+ * Create a new post with a file divided into chunks.
46
+ *
47
+ * @param file The file object to upload.
48
+ * @param chunkSize Size of each chunk in bytes. Default is 1MB.
49
+ * @param data Any additional data to pass along to the upload.
50
+ *
51
+ * @returns Promise
52
+ */
53
+ /**
54
+ * Create a new post with a file divided into chunks.
55
+ *
56
+ * @param file The file object to upload.
57
+ * @param chunkSize Size of each chunk in bytes. Default is 1MB.
58
+ * @param data Any additional data to pass along to the upload.
59
+ *
60
+ * @returns Promise
61
+ */
62
+ static createWithFileInChunks<T>(file: File, chunkSize?: number, data?: {
63
+ [key: string]: any;
64
+ }): Promise<AxiosPromise<Response<T>>>;
44
65
  /**
45
66
  * Update a post.
46
67
  *
@@ -0,0 +1,31 @@
1
+ import Response from "../util/Response";
2
+ import { AxiosPromise } from "axios";
3
+ declare class SocialPosts {
4
+ /**
5
+ * List all the Posts.
6
+ *
7
+ * @see https://api.glitch.fun/api/documentation#/Post%20Route/resourcePostList
8
+ *
9
+ * @returns promise
10
+ */
11
+ static list<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
12
+ /**
13
+ * Give a tip to another user
14
+ *
15
+ * @see https://api.glitch.fun/api/documentation#/Authentication%20Route/authLogin
16
+ *
17
+ * @returns A promise
18
+ */
19
+ static create<T>(data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
20
+ /**
21
+ * Retrieve the information for a single post.
22
+ *
23
+ * @see https://api.glitch.fun/api/documentation#/Post%20Route/showPostStorage
24
+ *
25
+ * @param post_id The id fo the post to retrieve.
26
+ *
27
+ * @returns promise
28
+ */
29
+ static view<T>(post_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
30
+ }
31
+ export default SocialPosts;
@@ -13,6 +13,7 @@ import Tips from "./Tips";
13
13
  import TipEmojis from "./TipEmojis";
14
14
  import TipPackages from "./TipPackages";
15
15
  import TipPackagePurchases from "./TipPackagePurchases";
16
+ import SocialPosts from "./SocialPosts";
16
17
  export { Auth };
17
18
  export { Competitions };
18
19
  export { Communities };
@@ -28,3 +29,4 @@ export { Tips };
28
29
  export { TipEmojis };
29
30
  export { TipPackages };
30
31
  export { TipPackagePurchases };
32
+ export { SocialPosts };
@@ -13,6 +13,7 @@ import { Tips } from "./api";
13
13
  import { TipPackages } from "./api";
14
14
  import { TipEmojis } from "./api";
15
15
  import { TipPackagePurchases } from "./api";
16
+ import { SocialPosts } from "./api";
16
17
  import Requests from "./util/Requests";
17
18
  import Parser from "./util/Parser";
18
19
  import Session from "./util/Session";
@@ -44,6 +45,7 @@ declare class Glitch {
44
45
  Utility: typeof Utility;
45
46
  Tips: typeof Tips;
46
47
  Social: typeof Social;
48
+ SocialPosts: typeof SocialPosts;
47
49
  TipPackages: typeof TipPackages;
48
50
  TipEmojis: typeof TipEmojis;
49
51
  TipPackagePurchases: typeof TipPackagePurchases;