diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..a644f92 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,257 @@ +{ + "name": "steam-api", + "version": "1.1.5", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "coffeescript": { + "version": "1.12.7", + "resolved": "https://registry.npmjs.org/coffeescript/-/coffeescript-1.12.7.tgz", + "integrity": "sha512-pLXHFxQMPklVoEekowk8b3erNynC+DVJzChxS/LCBBgR6/8AJkHivkm//zbowcfc7BTCAjryuhx6gPqPRfsFoA==", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "gaze": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/gaze/-/gaze-1.1.3.tgz", + "integrity": "sha512-BRdNm8hbWzFzWHERTrejLqwHDfS4GibPoq5wjTPIoJHoBtKGPg3xAFfxmM+9ztbXelxcf2hwQcaz1PtmFeue8g==", + "dev": true, + "requires": { + "globule": "^1.0.0" + } + }, + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "globule": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/globule/-/globule-1.3.1.tgz", + "integrity": "sha512-OVyWOHgw29yosRHCHo7NncwR1hW5ew0W/UrvtwvjefVJeQ26q4/8r8FmPsSF1hJ93IgWkyv16pCTz6WblMzm/g==", + "dev": true, + "requires": { + "glob": "~7.1.1", + "lodash": "~4.17.12", + "minimatch": "~3.0.2" + } + }, + "growl": { + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "jasmine-growl-reporter": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/jasmine-growl-reporter/-/jasmine-growl-reporter-2.0.0.tgz", + "integrity": "sha512-RYwVfPaGgxQQSHDOt6jQ99/KAkFQ/Fiwg/AzBS+uO9A4UhGhxb7hwXaUUSU/Zs0MxBoFNqmIRC+7P4/+5O3lXg==", + "dev": true, + "requires": { + "growl": "^1.10.5" + } + }, + "jasmine-node": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/jasmine-node/-/jasmine-node-3.0.0.tgz", + "integrity": "sha512-vUa5Q7bQYwHHqi6FlJYndiKqZp+d+c3MKe0QUMwwrC4JRmoRV3zkg0buxB/uQ6qLh0NO34TNstpAnvaZ6xGlAA==", + "dev": true, + "requires": { + "coffeescript": "~1.12.7", + "gaze": "~1.1.2", + "jasmine-growl-reporter": "~2.0.0", + "jasmine-reporters": "~1.0.0", + "mkdirp": "~0.3.5", + "requirejs": "~2.3.6", + "underscore": "~1.9.1", + "walkdir": "~0.0.12" + } + }, + "jasmine-reporters": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/jasmine-reporters/-/jasmine-reporters-1.0.2.tgz", + "integrity": "sha1-q2E+1Zd9x0h+hbPBL2qOqNsq3jE=", + "dev": true, + "requires": { + "mkdirp": "~0.3.5" + } + }, + "lodash": { + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", + "dev": true + }, + "merge": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/merge/-/merge-1.2.1.tgz", + "integrity": "sha512-VjFo4P5Whtj4vsLzsYBu5ayHhoHJ0UqNm7ibvShmbmoz7tGi0vXaoJbGdB+GmDMLUdg8DpQXEIeVDAe8MaABvQ==" + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "mkdirp": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.5.tgz", + "integrity": "sha1-3j5fiWHIjHh+4TaN+EmsRBPsqNc=", + "dev": true + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "q": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", + "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=" + }, + "requirejs": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/requirejs/-/requirejs-2.3.6.tgz", + "integrity": "sha512-ipEzlWQe6RK3jkzikgCupiTbTvm4S0/CAU5GlgptkN5SO6F3u0UD0K18wy6ErDqiCyP4J4YYe1HuAShvsxePLg==", + "dev": true + }, + "restler-base": { + "version": "3.4.6", + "resolved": "https://registry.npmjs.org/restler-base/-/restler-base-3.4.6.tgz", + "integrity": "sha512-WWiivZStHYyUxyqkQat5pyRYb/S8wpWn3Y8bpcVRMW9Cs0R/Qv/f/WrjWNJM430ewZH6nCORGrNHqzXSAms60Q==", + "requires": { + "iconv-lite": "0.4.23", + "qs": "6.5.2", + "xml2js": "0.4.19", + "yaml": "0.3.0" + }, + "dependencies": { + "iconv-lite": { + "version": "0.4.23", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", + "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" + }, + "sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" + }, + "xml2js": { + "version": "0.4.19", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz", + "integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==", + "requires": { + "sax": ">=0.6.0", + "xmlbuilder": "~9.0.1" + } + }, + "xmlbuilder": { + "version": "9.0.7", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", + "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=" + }, + "yaml": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-0.3.0.tgz", + "integrity": "sha1-wxphbQes28IBLXOmulsbC90YWn8=" + } + } + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "underscore": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.9.2.tgz", + "integrity": "sha512-D39qtimx0c1fI3ya1Lnhk3E9nONswSKhnffBI0gME9C99fYOkNi04xs8K6pePLhvl1frbDemkaBQ5ikWllR2HQ==", + "dev": true + }, + "walkdir": { + "version": "0.0.12", + "resolved": "https://registry.npmjs.org/walkdir/-/walkdir-0.0.12.tgz", + "integrity": "sha512-HFhaD4mMWPzFSqhpyDG48KDdrjfn409YQuVW7ckZYhW4sE87mYtWifdB/+73RA7+p4s4K18n5Jfx1kHthE1gBw==", + "dev": true + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + } + } +} diff --git a/package.json b/package.json index f2089d8..70ccf45 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "steam-api", - "version": "1.1.3", + "version": "1.1.5", "description": "Steam Web Api Integration", "main": "index.js", "scripts": { @@ -25,11 +25,11 @@ "url": "https://github.com/DPr00f/steam-api-node/issues" }, "devDependencies": { - "jasmine-node": "^1.14.5" + "jasmine-node": "^3.0.0" }, "dependencies": { - "merge": "^1.2.0", - "q": "^1.1.2", - "restler": "^3.2.2" + "merge": "^1.2.1", + "q": "^1.5.1", + "restler-base": "latest" } } diff --git a/steam/Client.js b/steam/Client.js index 859bd05..469e0da 100644 --- a/steam/Client.js +++ b/steam/Client.js @@ -1,13 +1,13 @@ -module.exports = (function (undefined){ +module.exports = (function (undefined) { "use strict"; - var rest = require('restler'), - q = require('q'), - mixin = require('./helpers').mixin, - http_build_query = require('./helpers').http_build_query; + var rest = require("restler-base"), + q = require("q"), + mixin = require("./helpers").mixin, + http_build_query = require("./helpers").http_build_query; function Client(steamApiKey) { if (!steamApiKey) { - if (!process.env.STEAM_API_KEY){ + if (!process.env.STEAM_API_KEY) { throw new Error("Please provide a steam api key."); } steamApiKey = process.env.STEAM_API_KEY; @@ -16,7 +16,7 @@ module.exports = (function (undefined){ this.apiKey = steamApiKey; this.setUrl("http://api.steampowered.com/"); this.setVersion(2); - this.setApiFormat('json'); + this.setApiFormat("json"); this.isService(false); this.setMethod(undefined); this.setSteamId(undefined); @@ -27,65 +27,72 @@ module.exports = (function (undefined){ return this.apiKey; }; - Client.prototype.getUrl = function getUrl(){ + Client.prototype.getUrl = function getUrl() { return this.url; }; - Client.prototype.setUrl = function setUrl(value){ + Client.prototype.setUrl = function setUrl(value) { this.url = value; }; - Client.prototype.getInterface = function getInterface(){ + Client.prototype.getInterface = function getInterface() { return this.interface_; }; - Client.prototype.setInterface = function setInterface(value){ + Client.prototype.setInterface = function setInterface(value) { this.interface_ = value; }; - Client.prototype.getMethod = function getMethod(){ + Client.prototype.getMethod = function getMethod() { return this.method; }; - Client.prototype.setMethod = function setMethod(value){ + Client.prototype.setMethod = function setMethod(value) { this.method = value; }; - Client.prototype.getVersion = function getVersion(){ + Client.prototype.getVersion = function getVersion() { return this.version; }; - Client.prototype.setVersion = function setVersion(value){ + Client.prototype.setVersion = function setVersion(value) { this.version = value; }; - Client.prototype.getApiFormat = function getApiFormat(){ + Client.prototype.getApiFormat = function getApiFormat() { return this.apiFormat; }; - Client.prototype.setApiFormat = function setApiFormat(value){ + Client.prototype.setApiFormat = function setApiFormat(value) { this.apiFormat = value; }; - Client.prototype.getSteamId = function getSteamId(){ + Client.prototype.getSteamId = function getSteamId() { return this.steamId; }; - Client.prototype.setSteamId = function setSteamId(value){ + Client.prototype.setSteamId = function setSteamId(value) { // polyfill for less than es2015 - Number.isSafeInteger = Number.isSafeInteger || function (value) { - return typeof value === 'number' && Math.abs(value) <= Number.MAX_SAFE_INTEGER; - }; - - if (typeof value === 'number' && ! Number.isSafeInteger(value)) { - throw new Error('SteamId should be a string when larger than MAX_SAFE_INTEGER 9007199254740991'); + Number.isSafeInteger = + Number.isSafeInteger || + function (value) { + return ( + typeof value === "number" && + Math.abs(value) <= Number.MAX_SAFE_INTEGER + ); + }; + + if (typeof value === "number" && !Number.isSafeInteger(value)) { + throw new Error( + "SteamId should be a string when larger than MAX_SAFE_INTEGER 9007199254740991" + ); } this.steamId = value; }; - Client.prototype.isService = function isService(value){ - if (!value){ + Client.prototype.isService = function isService(value) { + if (!value) { return this.isService_; } this.isService_ = value; @@ -95,15 +102,15 @@ module.exports = (function (undefined){ Client.prototype.buildUrl = function buildUrl(version) { var url = this.getUrl(); if (this.getInterface()) { - url += this.getInterface() + '/'; + url += this.getInterface() + "/"; } if (this.getMethod()) { - url += this.getMethod() + '/'; + url += this.getMethod() + "/"; } if (version) { - url += 'v' + this.getVersion() + '/'; + url += "v" + this.getVersion() + "/"; } return url; @@ -111,8 +118,8 @@ module.exports = (function (undefined){ Client.prototype.setupService = function setupService(args) { var parameters, - steamUrl, - deferred = q.defer(); + steamUrl, + deferred = q.defer(); if (!args) { throw new Error("arguments must be defined"); } @@ -120,55 +127,56 @@ module.exports = (function (undefined){ steamUrl = this.buildUrl(true); parameters = http_build_query({ - 'key': this.getApiKey(), - 'format': this.getApiFormat(), - 'input_json': JSON.stringify(args) + key: this.getApiKey(), + format: this.getApiFormat(), + input_json: JSON.stringify(args), }); - rest.get(steamUrl + "?" + parameters) - .on('success', function restlerComplete(data, response){ - deferred.resolve({ - status: 'ok', - data: data, - response: response - }); - }) - .on('fail', function restlerFail(data, response){ - deferred.reject({ - status: 'fail', - data: data, - response: response - }); - }) - .on('timeout', function restlerTimeout(ms){ - deferred.reject({ - status: 'timeout', - data: ms, - response: {} - }); - }) - .on('error', function restlerError(err, response){ - deferred.reject({ - status: 'error', - data: err, - response: response - }); + rest + .get(steamUrl + "?" + parameters) + .on("success", function restlerComplete(data, response) { + deferred.resolve({ + status: "ok", + data: data, + response: response, + }); + }) + .on("fail", function restlerFail(data, response) { + deferred.reject({ + status: "fail", + data: data, + response: response, + }); + }) + .on("timeout", function restlerTimeout(ms) { + deferred.reject({ + status: "timeout", + data: ms, + response: {}, }); + }) + .on("error", function restlerError(err, response) { + deferred.reject({ + status: "error", + data: err, + response: response, + }); + }); return deferred.promise; }; Client.prototype.setupClient = function setupClient(args) { var parameters, - steamUrl, - deferred = q.defer(), - versionFlag = this.getVersion() ? true : false; + steamUrl, + deferred = q.defer(), + versionFlag = this.getVersion() ? true : false; - steamUrl = this.buildUrl( versionFlag ); + steamUrl = this.buildUrl(versionFlag); parameters = { - 'key': this.getApiKey(), - 'format': this.getApiFormat() + key: this.getApiKey(), + format: this.getApiFormat(), }; if (args) { @@ -177,35 +185,36 @@ module.exports = (function (undefined){ parameters = http_build_query(parameters); - rest.get(steamUrl + "?" + parameters) - .on('success', function restlerComplete(data, response){ - deferred.resolve({ - status: 'ok', - data: data, - response: response - }); - }) - .on('fail', function restlerFail(data, response){ - deferred.reject({ - status: 'fail', - data: data, - response: response - }); - }) - .on('timeout', function restlerTimeout(ms){ - deferred.reject({ - status: 'timeout', - data: ms, - response: {} - }); - }) - .on('error', function restlerError(err, response){ - deferred.reject({ - status: 'error', - data: err, - response: response - }); + rest + .get(steamUrl + "?" + parameters) + .on("success", function restlerComplete(data, response) { + deferred.resolve({ + status: "ok", + data: data, + response: response, + }); + }) + .on("fail", function restlerFail(data, response) { + deferred.reject({ + status: "fail", + data: data, + response: response, + }); + }) + .on("timeout", function restlerTimeout(ms) { + deferred.reject({ + status: "timeout", + data: ms, + response: {}, + }); + }) + .on("error", function restlerError(err, response) { + deferred.reject({ + status: "error", + data: err, + response: response, }); + }); return deferred.promise; }; diff --git a/steam/Community.js b/steam/Community.js index 05babbb..6fa32df 100644 --- a/steam/Community.js +++ b/steam/Community.js @@ -1,17 +1,17 @@ -module.exports = (function(undefined){ +module.exports = (function (undefined) { "use strict"; - var Client = require('./Client'), - rest = require('restler'), - q = require('q'), - requestUrl, - context; + var Client = require("./Client"), + rest = require("restler-base"), + q = require("q"), + requestUrl, + context; function Community() { Client.apply(this, arguments); - this.setUrl('http://steamcommunity.com/'); - this.setInterface('profiles'); + this.setUrl("http://steamcommunity.com/"); + this.setInterface("profiles"); - if(arguments.length > 1){ + if (arguments.length > 1) { this.setSteamId(arguments[1]); } } @@ -38,15 +38,15 @@ module.exports = (function(undefined){ Community.prototype.buildCommunityUrl = function buildCommunityUrl() { var url = this.getUrl(); if (this.getInterface()) { - url += this.getInterface() + '/'; + url += this.getInterface() + "/"; } if (this.getSteamId()) { - url += this.getSteamId() + '/'; + url += this.getSteamId() + "/"; } if (this.getRequestUrl()) { - url += this.getRequestUrl() + '/'; + url += this.getRequestUrl() + "/"; } return url; @@ -54,39 +54,40 @@ module.exports = (function(undefined){ Community.prototype.setupCommunity = function setupCommunity() { var steamUrl, - deferred = q.defer(); + deferred = q.defer(); steamUrl = this.buildCommunityUrl(); - rest.get(steamUrl) - .on('success', function restlerComplete(data, response){ - deferred.resolve({ - status: 'ok', - data: data, - response: response - }); - }) - .on('fail', function restlerFail(data, response){ - deferred.reject({ - status: 'fail', - data: data, - response: response - }); - }) - .on('timeout', function restlerTimeout(ms){ - deferred.reject({ - status: 'timeout', - data: ms, - response: {} - }); - }) - .on('error', function restlerError(err, response){ - deferred.reject({ - status: 'error', - data: err, - response: response - }); + rest + .get(steamUrl) + .on("success", function restlerComplete(data, response) { + deferred.resolve({ + status: "ok", + data: data, + response: response, }); + }) + .on("fail", function restlerFail(data, response) { + deferred.reject({ + status: "fail", + data: data, + response: response, + }); + }) + .on("timeout", function restlerTimeout(ms) { + deferred.reject({ + status: "timeout", + data: ms, + response: {}, + }); + }) + .on("error", function restlerError(err, response) { + deferred.reject({ + status: "error", + data: err, + response: response, + }); + }); return deferred.promise; }; diff --git a/steam/containers/App.js b/steam/containers/App.js index 544e8fb..69da109 100644 --- a/steam/containers/App.js +++ b/steam/containers/App.js @@ -3,12 +3,14 @@ module.exports = (function(undefined){ function App(app) { this.id = app.steam_appid; + this.type = app.type; this.name = app.name; this.controllerSupport = app.controller_support ? app.controller_support : 'None'; this.description = app.detailed_description; + this.shortDescription = app.short_description; this.about = app.about_the_game; this.header = app.header_image; - this.website = !app.website ? app.website : 'None'; + this.website = app.website ? app.website : 'None'; this.pcRequirements = app.pc_requirements; this.legal = app.legal_notice ? app.legal_notice : 'None'; this.developers = app.developers ? app.developers : undefined; @@ -19,6 +21,8 @@ module.exports = (function(undefined){ this.categories = app.categories ? app.categories : undefined; this.genres = app.genres ? app.genres : undefined; this.release = app.release_date; + this.screenshots = app.screenshots ? app.screenshots.map(function(s){ return s.path_full; }) : undefined; + this.package_groups = app.package_groups; } App.prototype.getFakeMetacriticObject = function getFakeMetacriticObject(){