gigya-node
Version:
Gigya SDK for NodeJS
152 lines • 6.24 kB
JavaScript
;
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.GM = void 0;
__exportStar(require("./interfaces/gigya-response"), exports);
__exportStar(require("./interfaces/base-params"), exports);
var GM = /** @class */ (function () {
function GM(gigya) {
this.gigya = gigya;
}
/**
* This API deletes a specified action.
*
* @see http://developers.gigya.com/display/GD/gm.deleteAction+REST
*/
GM.prototype.deleteAction = function (params, options) {
return this.gigya.request('gm.deleteAction', params, options);
};
/**
* This API deletes a specified challenge and all its variants.
*
* @see http://developers.gigya.com/display/GD/gm.deleteChallenge+REST
*/
GM.prototype.deleteChallenge = function (params, options) {
return this.gigya.request('gm.deleteChallenge', params, options);
};
/**
* This API deletes a specified variant of a challenge.
*
* @see http://developers.gigya.com/display/GD/gm.deleteChallengeVariant+REST
*/
GM.prototype.deleteChallengeVariant = function (params, options) {
return this.gigya.request('gm.deleteChallengeVariant', params, options);
};
/**
* This API retrieves the configuration of specified actions.
*
* @see http://developers.gigya.com/display/GD/gm.getActionConfig+REST
*/
GM.prototype.getActionConfig = function (params, options) {
return this.gigya.request('gm.getActionConfig', params, options);
};
/**
* This API retrieves a specified user's Game Mechanics (GM) actions and how many points are associated with each action.
*
* @see http://developers.gigya.com/display/GD/gm.getActionsLog+REST
*/
GM.prototype.getActionsLog = function (params, options) {
return this.gigya.request('gm.getActionsLog', params, options);
};
/**
* This API retrieves the configuration of specified challenges.
*
* @see http://developers.gigya.com/display/GD/gm.getChallengeConfig+REST
*/
GM.prototype.getChallengeConfig = function (params, options) {
return this.gigya.request('gm.getChallengeConfig', params, options);
};
/**
* This API retrieves the current status of the user in each of the specified challenges.
*
* @see http://developers.gigya.com/display/GD/gm.getChallengeStatus+REST
*/
GM.prototype.getChallengeStatus = function (params, options) {
return this.gigya.request('gm.getChallengeStatus', params, options);
};
/**
* This API retrieves the variants of a challenge.
*
* @see http://developers.gigya.com/display/GD/gm.getChallengeVariants+REST
*/
GM.prototype.getChallengeVariants = function (params, options) {
return this.gigya.request('gm.getChallengeVariants', params, options);
};
/**
* This API retrieves the Gamification global configuration, which includes a callback URL for notifying clients of new level achievements, and whether to enable client-side access.
*
* @see http://developers.gigya.com/display/GD/gm.getGlobalConfig+REST
*/
GM.prototype.getGlobalConfig = function (params, options) {
return this.gigya.request('gm.getGlobalConfig', params, options);
};
/**
* This API returns the top ranked users for a specified challenge.
*
* @see http://developers.gigya.com/display/GD/gm.getTopUsers+REST
*/
GM.prototype.getTopUsers = function (params, options) {
return this.gigya.request('gm.getTopUsers', params, options);
};
/**
* This API notifies the Game Mechanics (GM) engine about an action that a user has taken in the site.
*
* @see http://developers.gigya.com/display/GD/gm.notifyAction+REST
*/
GM.prototype.notifyAction = function (params, options) {
return this.gigya.request('gm.notifyAction', params, options);
};
/**
* This API deducts a specified number of points from a specified user in a specified challenge.
*
* @see http://developers.gigya.com/display/GD/gm.redeemPoints+REST
*/
GM.prototype.redeemPoints = function (params, options) {
return this.gigya.request('gm.redeemPoints', params, options);
};
/**
* This API resets the isNewLevel field value to false.
*
* @see http://developers.gigya.com/display/GD/gm.resetLevelStatus+REST
*/
GM.prototype.resetLevelStatus = function (params, options) {
return this.gigya.request('gm.resetLevelStatus', params, options);
};
/**
* This API creates or updates an existing Gamification action.
*
* @see http://developers.gigya.com/display/GD/gm.setActionConfig+REST
*/
GM.prototype.setActionConfig = function (params, options) {
return this.gigya.request('gm.setActionConfig', params, options);
};
/**
* This API creates or overwrites an existing Gamification challenge.
*
* @see http://developers.gigya.com/display/GD/gm.setChallengeConfig+REST
*/
GM.prototype.setChallengeConfig = function (params, options) {
return this.gigya.request('gm.setChallengeConfig', params, options);
};
/**
* This API sets the Gamification global configuration, which includes a callback URL for notifying clients of new level achievements, and whether to enable client-side access.
*
* @see http://developers.gigya.com/display/GD/gm.setGlobalConfig+REST
*/
GM.prototype.setGlobalConfig = function (params, options) {
return this.gigya.request('gm.setGlobalConfig', params, options);
};
return GM;
}());
exports.GM = GM;
exports.default = GM;
//# sourceMappingURL=gm.js.map