glitch-javascript-sdk 1.0.2 → 1.0.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 CHANGED
@@ -20100,6 +20100,7 @@ var UserRoutes = /** @class */ (function () {
20100
20100
  profile: { url: '/users/{user_id}/profile', method: HTTP_METHODS.GET },
20101
20101
  me: { url: '/users/me', method: HTTP_METHODS.GET },
20102
20102
  syncInfluencer: { url: '/users/syncInfluencer', method: HTTP_METHODS.POST },
20103
+ generateInfluencerProfile: { url: '/users/generateInfluencerProfile', method: HTTP_METHODS.POST },
20103
20104
  oneTimeToken: { url: '/users/oneTimeToken', method: HTTP_METHODS.GET },
20104
20105
  uploadAvatar: { url: '/users/uploadAvatarImage', method: HTTP_METHODS.POST },
20105
20106
  uploadBanner: { url: '/users/uploadBannerImage', method: HTTP_METHODS.POST },
@@ -20206,6 +20207,19 @@ var Users = /** @class */ (function () {
20206
20207
  Users.syncInfluencer = function (params) {
20207
20208
  return Requests.processRoute(UserRoutes.routes.syncInfluencer, {}, undefined, params);
20208
20209
  };
20210
+ /**
20211
+ * Create profile data for an influencer based on their synced information and social media posts.
20212
+ *
20213
+ * @see https://api.glitch.fun/api/documentation#/Users%20Route/generateUserInfluencerProfile
20214
+ *
20215
+ * @param user_id The id of the user to update.
20216
+ * @param data The data to update.
20217
+ *
20218
+ * @returns promise
20219
+ */
20220
+ Users.generateInfluencerProfile = function (params) {
20221
+ return Requests.processRoute(UserRoutes.routes.generateInfluencerProfile, {}, undefined, params);
20222
+ };
20209
20223
  /**
20210
20224
  * Will follow and unfollow a user. If the user is not being following, it will follow the user. If they are following, it will unfollow the user. The current JWT is used for the follower.
20211
20225
  *
@@ -23021,6 +23035,7 @@ var InfluencerRoutes = /** @class */ (function () {
23021
23035
  InfluencerRoutes.routes = {
23022
23036
  listInfluencers: { url: '/influencers', method: HTTP_METHODS.GET },
23023
23037
  viewInfluencer: { url: '/influencers/{influencer_id}', method: HTTP_METHODS.GET },
23038
+ generateProfile: { url: '/influencers/{influencer_id}/generateProfile', method: HTTP_METHODS.POST },
23024
23039
  };
23025
23040
  return InfluencerRoutes;
23026
23041
  }());
@@ -23048,9 +23063,66 @@ var Influencers = /** @class */ (function () {
23048
23063
  Influencers.viewInfluencer = function (influencer_id, params) {
23049
23064
  return Requests.processRoute(InfluencerRoutes.routes.viewInfluencer, undefined, { influencer_id: influencer_id }, params);
23050
23065
  };
23066
+ /**
23067
+ * Generate a profile for an influencer based on their data.
23068
+ *
23069
+ * @see https://api.glitch.fun/api/documentation#/Influencers/generateInfluencerProfile
23070
+ *
23071
+ * @returns promise
23072
+ */
23073
+ Influencers.generateProfile = function (influencer_id, params) {
23074
+ return Requests.processRoute(InfluencerRoutes.routes.generateProfile, undefined, { influencer_id: influencer_id }, params);
23075
+ };
23051
23076
  return Influencers;
23052
23077
  }());
23053
23078
 
23079
+ var GamesRoutes = /** @class */ (function () {
23080
+ function GamesRoutes() {
23081
+ }
23082
+ GamesRoutes.routes = {
23083
+ listGames: { url: '/games', method: HTTP_METHODS.GET },
23084
+ viewGame: { url: '/games/{game_id}', method: HTTP_METHODS.GET },
23085
+ createCampaignData: { url: '/games/{game_id}/generateCampaign', method: HTTP_METHODS.POST },
23086
+ };
23087
+ return GamesRoutes;
23088
+ }());
23089
+
23090
+ var Games = /** @class */ (function () {
23091
+ function Games() {
23092
+ }
23093
+ /**
23094
+ * Get a list of Games available on he platform.
23095
+ *
23096
+ * @see https://api.glitch.fun/api/documentation#/ExternalGames/getExternalGames
23097
+ *
23098
+ * @returns promise
23099
+ */
23100
+ Games.listGames = function (params) {
23101
+ return Requests.processRoute(GamesRoutes.routes.listGames, undefined, undefined, params);
23102
+ };
23103
+ /**
23104
+ * Retrieve information on a single game.
23105
+ *
23106
+ * @see https://api.glitch.fun/api/documentation#/ExternalGames/getExternalGameById
23107
+ *
23108
+ * @returns promise
23109
+ */
23110
+ Games.viewGame = function (game_id, params) {
23111
+ return Requests.processRoute(GamesRoutes.routes.viewGame, undefined, { game_id: game_id }, params);
23112
+ };
23113
+ /**
23114
+ * Generates campaign data for this game.
23115
+ *
23116
+ * @see https://api.glitch.fun/api/documentation#/ExternalGames/generateCampaign
23117
+ *
23118
+ * @returns promise
23119
+ */
23120
+ Games.createCampaignData = function (game_id, data, params) {
23121
+ return Requests.processRoute(GamesRoutes.routes.createCampaignData, data, { game_id: game_id }, params);
23122
+ };
23123
+ return Games;
23124
+ }());
23125
+
23054
23126
  var Parser = /** @class */ (function () {
23055
23127
  function Parser() {
23056
23128
  }
@@ -23454,6 +23526,7 @@ var Glitch = /** @class */ (function () {
23454
23526
  Communities: Communities,
23455
23527
  Users: Users,
23456
23528
  Events: Events,
23529
+ Games: Games,
23457
23530
  Feedback: Feedback,
23458
23531
  Influencers: Influencers,
23459
23532
  Teams: Teams,