@como/como-client
Advanced tools
Comparing version 0.1.35 to 0.1.36
@@ -107,2 +107,34 @@ "use strict"; | ||
}(); | ||
}; | ||
exports.getZappResource = function (service) { | ||
return function () { | ||
var _ref7 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4(locationId) { | ||
var url, _ref8, data; | ||
return _regenerator2.default.wrap(function _callee4$(_context4) { | ||
while (1) { | ||
switch (_context4.prev = _context4.next) { | ||
case 0: | ||
url = "/v1/resource/zappResources/?tags=" + locationId; | ||
_context4.next = 3; | ||
return service.get(url); | ||
case 3: | ||
_ref8 = _context4.sent; | ||
data = _ref8.data; | ||
return _context4.abrupt("return", data); | ||
case 6: | ||
case "end": | ||
return _context4.stop(); | ||
} | ||
} | ||
}, _callee4, undefined); | ||
})); | ||
return function (_x8) { | ||
return _ref7.apply(this, arguments); | ||
}; | ||
}(); | ||
}; |
{ | ||
"name": "@como/como-client", | ||
"version": "0.1.35", | ||
"version": "0.1.36", | ||
"description": "Client module for Como's loaylty API", | ||
@@ -5,0 +5,0 @@ "main": "src/como.js", |
@@ -568,2 +568,11 @@ const moment = require('moment-timezone'); | ||
/** | ||
* | ||
* Get all legacy resources (Zapp) | ||
*/ | ||
getLegacyResources() { | ||
const { api, locationId } = this.comoData; | ||
return api.getZappResource(locationId); | ||
}; | ||
/** | ||
* Generates a new referral code for friend-referral | ||
@@ -570,0 +579,0 @@ */ |
Sorry, the diff of this file is too big to display
185503
4028