glitch-javascript-sdk 1.0.2 → 1.0.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 CHANGED
@@ -23051,6 +23051,53 @@ var Influencers = /** @class */ (function () {
23051
23051
  return Influencers;
23052
23052
  }());
23053
23053
 
23054
+ var GamesRoutes = /** @class */ (function () {
23055
+ function GamesRoutes() {
23056
+ }
23057
+ GamesRoutes.routes = {
23058
+ listGames: { url: '/games', method: HTTP_METHODS.GET },
23059
+ viewGame: { url: '/games/{game_id}', method: HTTP_METHODS.GET },
23060
+ createCampaignData: { url: '/games/{game_id}/generateCampaign', method: HTTP_METHODS.POST },
23061
+ };
23062
+ return GamesRoutes;
23063
+ }());
23064
+
23065
+ var Games = /** @class */ (function () {
23066
+ function Games() {
23067
+ }
23068
+ /**
23069
+ * Get a list of Games available on he platform.
23070
+ *
23071
+ * @see https://api.glitch.fun/api/documentation#/ExternalGames/getExternalGames
23072
+ *
23073
+ * @returns promise
23074
+ */
23075
+ Games.listGames = function (params) {
23076
+ return Requests.processRoute(GamesRoutes.routes.listGames, undefined, undefined, params);
23077
+ };
23078
+ /**
23079
+ * Retrieve information on a single game.
23080
+ *
23081
+ * @see https://api.glitch.fun/api/documentation#/ExternalGames/getExternalGameById
23082
+ *
23083
+ * @returns promise
23084
+ */
23085
+ Games.viewGame = function (game_id, params) {
23086
+ return Requests.processRoute(GamesRoutes.routes.viewGame, undefined, { game_id: game_id }, params);
23087
+ };
23088
+ /**
23089
+ * Generates campaign data for this game.
23090
+ *
23091
+ * @see https://api.glitch.fun/api/documentation#/ExternalGames/generateCampaign
23092
+ *
23093
+ * @returns promise
23094
+ */
23095
+ Games.createCampaignData = function (game_id, data, params) {
23096
+ return Requests.processRoute(GamesRoutes.routes.createCampaignData, data, { game_id: game_id }, params);
23097
+ };
23098
+ return Games;
23099
+ }());
23100
+
23054
23101
  var Parser = /** @class */ (function () {
23055
23102
  function Parser() {
23056
23103
  }
@@ -23454,6 +23501,7 @@ var Glitch = /** @class */ (function () {
23454
23501
  Communities: Communities,
23455
23502
  Users: Users,
23456
23503
  Events: Events,
23504
+ Games: Games,
23457
23505
  Feedback: Feedback,
23458
23506
  Influencers: Influencers,
23459
23507
  Teams: Teams,