glitch-javascript-sdk 1.4.8 → 1.5.0

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.
@@ -37,6 +37,15 @@ declare class SocialPosts {
37
37
  * @returns promise
38
38
  */
39
39
  static update<T>(post_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
40
+ /**
41
+ * Deletes a post.
42
+ *
43
+ * @see https://api.glitch.fun/api/documentation#/Post%20Route/destoryPostStorage
44
+ *
45
+ * @param post_id The id of the post to delete.
46
+ * @returns promise
47
+ */
48
+ static delete<T>(post_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
40
49
  /**
41
50
  * Dispute a post as being fraudulent.,s
42
51
  *
@@ -333,5 +333,30 @@ declare class Users {
333
333
  * @returns promise
334
334
  */
335
335
  static getInstagramAccounts<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
336
+ /**
337
+ * Gets the Facebook Pages associated with the user.
338
+ *
339
+ * @see https://api.glitch.fun/api/documentation#/Users%20Route/getFacebookPages
340
+ *
341
+ * @returns Promise resolving to the list of Facebook Pages
342
+ */
343
+ static getFacebookPages<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
344
+ /**
345
+ * Gets the subreddits the user is subscribed to.
346
+ *
347
+ * @see https://api.glitch.fun/api/documentation#/Users%20Route/getSubreddits
348
+ *
349
+ * @returns Promise resolving to the list of subreddits
350
+ */
351
+ static getSubreddits<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
352
+ /**
353
+ * Gets the flairs for a specific subreddit.
354
+ *
355
+ * @see https://api.glitch.fun/api/documentation#/Users%20Route/getSubredditFlairs
356
+ *
357
+ * @param subreddit The name of the subreddit to get flairs for.
358
+ * @returns Promise resolving to the list of flairs
359
+ */
360
+ static getSubredditFlairs<T>(subreddit: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
336
361
  }
337
362
  export default Users;
package/dist/esm/index.js CHANGED
@@ -7376,6 +7376,9 @@ var UserRoutes = /** @class */ (function () {
7376
7376
  getPayouts: { url: '/users/payouts', method: HTTP_METHODS.GET },
7377
7377
  verifyAccount: { url: '/users/verify', method: HTTP_METHODS.POST },
7378
7378
  getInstagramAccounts: { url: '/users/instagramAccounts', method: HTTP_METHODS.GET },
7379
+ getFacebookPages: { url: "/users/facebookPages", method: HTTP_METHODS.GET },
7380
+ getSubreddits: { url: "/users/reddit/subreddits", method: HTTP_METHODS.GET },
7381
+ getSubredditFlairs: { url: "/users/reddit/redditflairs/{subreddit}", method: HTTP_METHODS.GET },
7379
7382
  };
7380
7383
  return UserRoutes;
7381
7384
  }());
@@ -7787,6 +7790,37 @@ var Users = /** @class */ (function () {
7787
7790
  Users.getInstagramAccounts = function (params) {
7788
7791
  return Requests.processRoute(UserRoutes.routes.getInstagramAccounts, undefined, undefined, params);
7789
7792
  };
7793
+ /**
7794
+ * Gets the Facebook Pages associated with the user.
7795
+ *
7796
+ * @see https://api.glitch.fun/api/documentation#/Users%20Route/getFacebookPages
7797
+ *
7798
+ * @returns Promise resolving to the list of Facebook Pages
7799
+ */
7800
+ Users.getFacebookPages = function (params) {
7801
+ return Requests.processRoute(UserRoutes.routes.getFacebookPages, undefined, undefined, params);
7802
+ };
7803
+ /**
7804
+ * Gets the subreddits the user is subscribed to.
7805
+ *
7806
+ * @see https://api.glitch.fun/api/documentation#/Users%20Route/getSubreddits
7807
+ *
7808
+ * @returns Promise resolving to the list of subreddits
7809
+ */
7810
+ Users.getSubreddits = function (params) {
7811
+ return Requests.processRoute(UserRoutes.routes.getSubreddits, undefined, undefined, params);
7812
+ };
7813
+ /**
7814
+ * Gets the flairs for a specific subreddit.
7815
+ *
7816
+ * @see https://api.glitch.fun/api/documentation#/Users%20Route/getSubredditFlairs
7817
+ *
7818
+ * @param subreddit The name of the subreddit to get flairs for.
7819
+ * @returns Promise resolving to the list of flairs
7820
+ */
7821
+ Users.getSubredditFlairs = function (subreddit, params) {
7822
+ return Requests.processRoute(UserRoutes.routes.getSubredditFlairs, undefined, { subreddit: subreddit }, params);
7823
+ };
7790
7824
  return Users;
7791
7825
  }());
7792
7826
 
@@ -9321,6 +9355,7 @@ var SocialPostsRoute = /** @class */ (function () {
9321
9355
  createPost: { url: '/socialposts', method: HTTP_METHODS.POST },
9322
9356
  retrievePost: { url: '/socialposts/{post_id}', method: HTTP_METHODS.GET },
9323
9357
  updatePost: { url: '/socialposts/{post_id}', method: HTTP_METHODS.PUT },
9358
+ deletePost: { url: '/socialposts/{post_id}', method: HTTP_METHODS.DELETE },
9324
9359
  dispute: { url: '/social/{post_id}/dispute', method: HTTP_METHODS.POST },
9325
9360
  history: { url: '/socialposts/{post_id}/history', method: HTTP_METHODS.GET },
9326
9361
  addMedia: { url: '/socialposts/{post_id}/addMedia', method: HTTP_METHODS.POST },
@@ -9378,6 +9413,17 @@ var SocialPosts = /** @class */ (function () {
9378
9413
  SocialPosts.update = function (post_id, data, params) {
9379
9414
  return Requests.processRoute(SocialPostsRoute.routes.updatePost, data, { post_id: post_id }, params);
9380
9415
  };
9416
+ /**
9417
+ * Deletes a post.
9418
+ *
9419
+ * @see https://api.glitch.fun/api/documentation#/Post%20Route/destoryPostStorage
9420
+ *
9421
+ * @param post_id The id of the post to delete.
9422
+ * @returns promise
9423
+ */
9424
+ SocialPosts.delete = function (post_id, params) {
9425
+ return Requests.processRoute(SocialPostsRoute.routes.deletePost, {}, { post_id: post_id }, params);
9426
+ };
9381
9427
  /**
9382
9428
  * Dispute a post as being fraudulent.,s
9383
9429
  *