diff --git a/README.md b/README.md index 634447ce..5941f145 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,7 @@ Results: size: 'Varies with device', androidVersion: 'VARY', androidVersionText: 'Varies with device', + androidMaxVersion: 'VARY', developer: 'Google LLC', developerId: '5700313618786177705', developerEmail: 'translate-android-support@google.com', diff --git a/lib/app.js b/lib/app.js index b53a9673..856f2324 100644 --- a/lib/app.js +++ b/lib/app.js @@ -94,6 +94,10 @@ const MAPPINGS = { path: ['ds:5', 1, 2, 140, 1, 1, 0, 0, 1], fun: (version) => version || 'Varies with device' }, + androidMaxVersion: { + path: ['ds:5', 1, 2, 140, 1, 1, 0, 1, 1], + fun: helper.normalizeAndroidVersion + }, developer: ['ds:5', 1, 2, 68, 0], developerId: { path: ['ds:5', 1, 2, 68, 1, 4, 2], diff --git a/test/lib.app.js b/test/lib.app.js index a8a12aca..38638693 100644 --- a/test/lib.app.js +++ b/test/lib.app.js @@ -37,6 +37,7 @@ const validateAppDetails = (app) => { assert.isString(app.contentRating); assert.equal(app.androidVersion, '7.0'); + assert.equal(app.androidMaxVersion, 'VARY'); assert.isBoolean(app.available); assert.equal(app.priceText, 'Free'); @@ -196,4 +197,12 @@ describe('App method', () => { assert.equal(app.available, false); }); }); + + it('should fetch android version limit set for some old apps', () => { + return gplay.app({ appId: 'air.com.zinkia.playset' }) + .then((app) => { + assert.equal(app.androidVersion, '4.2'); + assert.equal(app.androidMaxVersion, '7.1.1'); + }); + }); });