glitch-javascript-sdk 0.3.3 → 0.3.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/cjs/index.js +26 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Posts.d.ts +22 -0
- package/dist/esm/index.js +26 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +22 -0
- package/package.json +1 -1
- package/src/api/Posts.ts +31 -0
package/dist/cjs/index.js
CHANGED
|
@@ -17791,6 +17791,32 @@ var Posts = /** @class */ (function () {
|
|
|
17791
17791
|
Posts.create = function (data, params) {
|
|
17792
17792
|
return Requests.processRoute(PostsRoute.routes.create, data, undefined, params);
|
|
17793
17793
|
};
|
|
17794
|
+
/**
|
|
17795
|
+
* Create a new post with a file. The file should either be an image or video.
|
|
17796
|
+
*
|
|
17797
|
+
* @see https://api.glitch.fun/api/documentation#/Post%20Route/newPostResourceStorage
|
|
17798
|
+
*
|
|
17799
|
+
* @param file The file object to upload.
|
|
17800
|
+
* @param data Any additional data to pass along to the upload.
|
|
17801
|
+
*
|
|
17802
|
+
* @returns promise
|
|
17803
|
+
*/
|
|
17804
|
+
Posts.createWithFile = function (file, data) {
|
|
17805
|
+
return Requests.uploadFile(PostsRoute.routes.create.url, 'file', file, data);
|
|
17806
|
+
};
|
|
17807
|
+
/**
|
|
17808
|
+
* Create a new post with a blob. The blob should either be an image or video.
|
|
17809
|
+
*
|
|
17810
|
+
* @see https://api.glitch.fun/api/documentation#/Post%20Route/newPostResourceStorage
|
|
17811
|
+
*
|
|
17812
|
+
* @param file The blob to upload.
|
|
17813
|
+
* @param data Any additional data to pass along to the upload.
|
|
17814
|
+
*
|
|
17815
|
+
* @returns promise
|
|
17816
|
+
*/
|
|
17817
|
+
Posts.createWithBlob = function (blob, data) {
|
|
17818
|
+
return Requests.uploadBlob(PostsRoute.routes.create.url, 'file', blob, data);
|
|
17819
|
+
};
|
|
17794
17820
|
/**
|
|
17795
17821
|
* Update a post.
|
|
17796
17822
|
*
|