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.
- package/dist/cjs/index.js +1337 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Posts.d.ts +21 -0
- package/dist/esm/api/SocialPosts.d.ts +31 -0
- package/dist/esm/api/index.d.ts +2 -0
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.js +1560 -44
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/routes/SocialPostsRoute.d.ts +7 -0
- package/dist/esm/util/Requests.d.ts +1 -1
- package/dist/index.d.ts +52 -1
- package/package.json +1 -1
- package/src/api/Posts.ts +77 -22
- package/src/api/SocialPosts.ts +46 -0
- package/src/api/index.ts +3 -1
- package/src/index.ts +3 -0
- package/src/routes/SocialPostsRoute.ts +14 -0
- package/src/util/Requests.ts +1 -1
package/dist/esm/api/Posts.d.ts
CHANGED
|
@@ -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;
|
package/dist/esm/api/index.d.ts
CHANGED
|
@@ -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 };
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -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;
|