diff --git a/README.md b/README.md index 8ed12f36..c7f4748a 100644 --- a/README.md +++ b/README.md @@ -71,6 +71,10 @@ Results: developerEmail: 'translate-android-support@google.com', developerWebsite: 'http://support.google.com/translate', developerAddress: '1600 Amphitheatre Parkway, Mountain View 94043', + developerLegalName: undefined, + developerLegalEmail: undefined, + developerLegalAddress: undefined, + developerLegalPhoneNumber: undefined, privacyPolicy: 'http://www.google.com/policies/privacy/', developerInternalID: '5700313618786177705', genre: 'Tools', diff --git a/index.d.ts b/index.d.ts index 083324a8..c2402ae6 100644 --- a/index.d.ts +++ b/index.d.ts @@ -129,6 +129,10 @@ export interface IAppItemFullDetail extends IAppItem { developerEmail: string developerWebsite: string developerAddress: string + developerLegalName: string + developerLegalEmail: string + developerLegalAddress: string + developerLegalPhoneNumber: string genre: string genreId: string categories: Array<{ diff --git a/lib/app.js b/lib/app.js index c778f82a..1bd082ea 100644 --- a/lib/app.js +++ b/lib/app.js @@ -110,6 +110,15 @@ const MAPPINGS = { developerEmail: ['ds:5', 1, 2, 69, 1, 0], developerWebsite: ['ds:5', 1, 2, 69, 0, 5, 2], developerAddress: ['ds:5', 1, 2, 69, 2, 0], + developerLegalName: ['ds:5', 1, 2, 69, 4, 0], + developerLegalEmail: ['ds:5', 1, 2, 69, 4, 1, 0], + developerLegalAddress: { + path: ['ds:5', 1, 2, 69], + fun: (searchArray) => { + return R.path([4, 2, 0], searchArray)?.replace(/\n/g, ', '); + } + }, + developerLegalPhoneNumber: ['ds:5', 1, 2, 69, 4, 3], privacyPolicy: ['ds:5', 1, 2, 99, 0, 5, 2], developerInternalID: { path: ['ds:5', 1, 2, 68, 1, 4, 2], diff --git a/test/lib.app.js b/test/lib.app.js index 27b04818..bc3a17d0 100644 --- a/test/lib.app.js +++ b/test/lib.app.js @@ -109,6 +109,16 @@ describe('App method', () => { }); }); + it('should check the developer legal information from the "About the developer" section', () => { + return gplay.app({ appId: 'com.soundcloud.android' }) + .then((app) => { + assert.equal(app.developerLegalName, 'SoundCloud Global Limited & Co. KG'); + assert.equal(app.developerLegalEmail, 'playstore@soundcloud.com'); + assert.equal(app.developerLegalAddress, 'Rheinsberger Str. 76 /, 10115 Berlin, Germany'); + assert.equal(app.developerLegalPhoneNumber, '+49 1573 5982119'); + }); + }); + it('should properly parse a VARY android version', () => { return gplay.app({ appId: 'com.facebook.katana' }) .then((app) => {