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.
package/dist/cjs/index.js CHANGED
@@ -20560,6 +20560,9 @@ var UserRoutes = /** @class */ (function () {
20560
20560
  getPayouts: { url: '/users/payouts', method: HTTP_METHODS.GET },
20561
20561
  verifyAccount: { url: '/users/verify', method: HTTP_METHODS.POST },
20562
20562
  getInstagramAccounts: { url: '/users/instagramAccounts', method: HTTP_METHODS.GET },
20563
+ getFacebookPages: { url: "/users/facebookPages", method: HTTP_METHODS.GET },
20564
+ getSubreddits: { url: "/users/reddit/subreddits", method: HTTP_METHODS.GET },
20565
+ getSubredditFlairs: { url: "/users/reddit/redditflairs/{subreddit}", method: HTTP_METHODS.GET },
20563
20566
  };
20564
20567
  return UserRoutes;
20565
20568
  }());
@@ -20971,6 +20974,37 @@ var Users = /** @class */ (function () {
20971
20974
  Users.getInstagramAccounts = function (params) {
20972
20975
  return Requests.processRoute(UserRoutes.routes.getInstagramAccounts, undefined, undefined, params);
20973
20976
  };
20977
+ /**
20978
+ * Gets the Facebook Pages associated with the user.
20979
+ *
20980
+ * @see https://api.glitch.fun/api/documentation#/Users%20Route/getFacebookPages
20981
+ *
20982
+ * @returns Promise resolving to the list of Facebook Pages
20983
+ */
20984
+ Users.getFacebookPages = function (params) {
20985
+ return Requests.processRoute(UserRoutes.routes.getFacebookPages, undefined, undefined, params);
20986
+ };
20987
+ /**
20988
+ * Gets the subreddits the user is subscribed to.
20989
+ *
20990
+ * @see https://api.glitch.fun/api/documentation#/Users%20Route/getSubreddits
20991
+ *
20992
+ * @returns Promise resolving to the list of subreddits
20993
+ */
20994
+ Users.getSubreddits = function (params) {
20995
+ return Requests.processRoute(UserRoutes.routes.getSubreddits, undefined, undefined, params);
20996
+ };
20997
+ /**
20998
+ * Gets the flairs for a specific subreddit.
20999
+ *
21000
+ * @see https://api.glitch.fun/api/documentation#/Users%20Route/getSubredditFlairs
21001
+ *
21002
+ * @param subreddit The name of the subreddit to get flairs for.
21003
+ * @returns Promise resolving to the list of flairs
21004
+ */
21005
+ Users.getSubredditFlairs = function (subreddit, params) {
21006
+ return Requests.processRoute(UserRoutes.routes.getSubredditFlairs, undefined, { subreddit: subreddit }, params);
21007
+ };
20974
21008
  return Users;
20975
21009
  }());
20976
21010
 
@@ -22505,6 +22539,7 @@ var SocialPostsRoute = /** @class */ (function () {
22505
22539
  createPost: { url: '/socialposts', method: HTTP_METHODS.POST },
22506
22540
  retrievePost: { url: '/socialposts/{post_id}', method: HTTP_METHODS.GET },
22507
22541
  updatePost: { url: '/socialposts/{post_id}', method: HTTP_METHODS.PUT },
22542
+ deletePost: { url: '/socialposts/{post_id}', method: HTTP_METHODS.DELETE },
22508
22543
  dispute: { url: '/social/{post_id}/dispute', method: HTTP_METHODS.POST },
22509
22544
  history: { url: '/socialposts/{post_id}/history', method: HTTP_METHODS.GET },
22510
22545
  addMedia: { url: '/socialposts/{post_id}/addMedia', method: HTTP_METHODS.POST },
@@ -22562,6 +22597,17 @@ var SocialPosts = /** @class */ (function () {
22562
22597
  SocialPosts.update = function (post_id, data, params) {
22563
22598
  return Requests.processRoute(SocialPostsRoute.routes.updatePost, data, { post_id: post_id }, params);
22564
22599
  };
22600
+ /**
22601
+ * Deletes a post.
22602
+ *
22603
+ * @see https://api.glitch.fun/api/documentation#/Post%20Route/destoryPostStorage
22604
+ *
22605
+ * @param post_id The id of the post to delete.
22606
+ * @returns promise
22607
+ */
22608
+ SocialPosts.delete = function (post_id, params) {
22609
+ return Requests.processRoute(SocialPostsRoute.routes.deletePost, {}, { post_id: post_id }, params);
22610
+ };
22565
22611
  /**
22566
22612
  * Dispute a post as being fraudulent.,s
22567
22613
  *