This repository has been archived by the owner on Mar 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* breaking changes, new device user agents - default to nexus 5X device profile - update README to include info regarding getting appropriate user agents - update README to incldue info about getting the device id - breaking change to API options * Fix download user agent png * Clean up * var => const cleanup * Add support for download of an additional file required for install * Use semistandard for linting/format check * Switch to tap for tests * Tweak addl file getter - add skipped test (need to update travis device profile) * Bump proto ver * Update travis env to use new login, device id * Enable addl. file info test * Make linter happy * Fix get-latest-proto lint * Fix test transition to node tap
- Loading branch information
1 parent
8ed6158
commit 82c0550
Showing
27 changed files
with
452 additions
and
443 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
language: node_js | ||
node_js: | ||
- "4" | ||
- "5" | ||
- '5' | ||
- '6' | ||
script: | ||
- npm test | ||
env: | ||
global: | ||
- secure: GQmuKiWbVHnPCR7WAy3NCv652dHmnmK/1LOfQlbmhan6+cSMJ5Y1aFHBSmdQ5TzNu0lvZPeTlkQrTsae7sS4gKhyXlOdDp0ILOkfdKf9T6oNwGQjzm5x0v/WFAMQzC1Mr6FLxpW/FwKhVa3Czkrx6Gv6+gkBXgbsHY1LOErisxY= | ||
- secure: Qkknepl5raIf/A8s7tJkN1NRQPGymNomANim6VY4oMycuMwUG87uWi4yLiaTmyKQPkQb1lW+SdusYZ5Ud0cIwKI+xk0b1RxsTQkc1g18QlfNcu9BBdT2rXef729KXQJhJcYyEbM8cR+qrKuzueOz/ysU/pogDXb4Hatc6ePYGOg= | ||
- secure: Y/lZBh0+l3206I2ytelgXnXwtHZUS0ff7kcRSOjI8P3vRqOs7UdeqlZDRQfrpW7TZ2EI4G6mR0giZGOIITC7CNWv+QYgDT/nrnih8t+Su2TGsZARR5cOUYDYxaaLMRxdiMpZ5V/veuHhJDL0C4MOd8xR56y7493cbznPvQu0jdo= | ||
- secure: "BZ2tPb/zQoqTKsBAcIdn/YPLJAmmJLih0NtdmOZl0H2c+nl57EC2rVIdm8e0V8G2B2Ho3L5KoLiiK0LafulCRWZ/sL/vR09kGMAccGR/qITkQ4FFWm1dbdoD00G9GHz2/7igyFhgmJ7zpNTkd8ND4k++mDHmLgh40Tg0TU/Ej8Q=" | ||
- secure: "Qg60PWwbOpVTjaRHA5D2lUBAIFwFJ5iLMjlMIyKpzlXIUSxBYg7xpZSfM+sA7vDHejlIsCCgMakyexWNbBj8po3DeRv9kZKfp44/SYoGhqFGEYzifmbXWbeJfBpouIJ1t/1YBUoBjHP190+3QnzDsyvrzJtmROPkRkW752SYco0=" | ||
- secure: "Tc2RSamcEEHUqPek2t1jQWCc/ZImEgB5wF3TsWPvJ9Wx/NbMLI50yZygWR+yB9D0i6bpn/rcCbGMXVkX0qpVE0/df3KIieR23ftWbaIH1HtJcpCWY2qXdzyUAMncVrnVi3WxJsREV9on8IAjINbhalwVK4Ygoy3E3XD6iV2ibeE=" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,13 @@ | ||
var GooglePlayAPI = require('../lib/api').GooglePlayAPI; | ||
|
||
var use_cache = false; | ||
var debug = false; | ||
|
||
function getBulkDetails(pkgs) { | ||
var api = GooglePlayAPI( | ||
process.env.GOOGLE_LOGIN, process.env.GOOGLE_PASSWORD, | ||
process.env.ANDROID_ID, | ||
use_cache, | ||
debug | ||
); | ||
var api = require('./common-api-init'); | ||
|
||
function getBulkDetails (pkgs) { | ||
return api.login() | ||
.then(function() { | ||
api.bulkDetails(pkgs).then(function (res) { | ||
console.log('%j', res); | ||
.then(function () { | ||
api.bulkDetails(pkgs).then(function (res) { | ||
console.log('%j', res); | ||
}); | ||
}); | ||
}); | ||
} | ||
|
||
var argv = require('minimist')(process.argv.slice(2)); | ||
getBulkDetails(argv._ || ['com.viber.voip', 'air.WatchESPN']); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
var GooglePlayAPI = require('../lib/api').GooglePlayAPI; | ||
|
||
module.exports = GooglePlayAPI({ | ||
username: process.env.GOOGLE_LOGIN, | ||
password: process.env.GOOGLE_PASSWORD, | ||
androidId: process.env.ANDROID_ID, | ||
useCache: false, | ||
debug: false | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,20 @@ | ||
var GooglePlayAPI = require('../lib/api').GooglePlayAPI; | ||
var api = require('./common-api-init'); | ||
|
||
var use_cache = false; | ||
var debug = false; | ||
|
||
var api = GooglePlayAPI( | ||
process.env.GOOGLE_LOGIN, process.env.GOOGLE_PASSWORD, | ||
process.env.ANDROID_ID, | ||
use_cache, | ||
debug | ||
); | ||
|
||
function getDeliveryData(pkg) { | ||
function getDeliveryData (pkg) { | ||
return api.login() | ||
.then(function() { | ||
api.details(pkg).then(function (res) { | ||
return res.details.appDetails.versionCode; | ||
}) | ||
.then(function (versionCode) { | ||
return api.deliveryData(pkg, versionCode); | ||
}) | ||
.then(function (info) { | ||
console.log('%j', info); | ||
.then(function () { | ||
api.details(pkg).then(function (res) { | ||
return res.details.appDetails.versionCode; | ||
}) | ||
.then(function (versionCode) { | ||
return api.deliveryData(pkg, versionCode); | ||
}) | ||
.then(function (info) { | ||
console.log('%j', info); | ||
}); | ||
}); | ||
}); | ||
} | ||
|
||
function getDeliveryDataVc(pkg, vc) { | ||
return api.login() | ||
.then(function() { | ||
return api.deliveryData(pkg, vc); | ||
}) | ||
.then(function (info) { | ||
console.log('%j', info); | ||
}); | ||
} | ||
|
||
|
||
var argv = require('minimist')(process.argv.slice(2)); | ||
var pkg = argv._[0] || argv.p || "com.viber.voip"; | ||
var pkg = argv._[0] || argv.p || 'com.viber.voip'; | ||
getDeliveryData(pkg); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,11 @@ | ||
var GooglePlayAPI = require('../lib/api').GooglePlayAPI; | ||
|
||
var use_cache = false; | ||
var debug = false; | ||
|
||
function getAppDetails(pkg) { | ||
var api = GooglePlayAPI( | ||
process.env.GOOGLE_LOGIN, process.env.GOOGLE_PASSWORD, | ||
process.env.ANDROID_ID, | ||
use_cache, | ||
debug | ||
); | ||
var api = require('./common-api-init'); | ||
|
||
function getAppDetails (pkg) { | ||
return api.details(pkg).then(function (res) { | ||
console.log('%j', res); | ||
}); | ||
} | ||
|
||
var argv = require('minimist')(process.argv.slice(2)); | ||
var pkg = argv._[0] || argv.p || "com.viber.voip"; | ||
var pkg = argv._[0] || argv.p || 'com.viber.voip'; | ||
getAppDetails(pkg); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,19 @@ | ||
var GooglePlayAPI = require('../lib/api').GooglePlayAPI; | ||
|
||
var use_cache = false; | ||
var debug = false; | ||
|
||
var api = require('./common-api-init'); | ||
var fs = require('fs'); | ||
|
||
function downloadToFile(pkg, vc) { | ||
|
||
var api = GooglePlayAPI( | ||
process.env.GOOGLE_LOGIN, process.env.GOOGLE_PASSWORD, | ||
process.env.ANDROID_ID, | ||
use_cache, | ||
debug | ||
); | ||
|
||
function downloadToFile (pkg, vc) { | ||
return api.details(pkg).then(function (res) { | ||
return vc || res.details.appDetails.versionCode; | ||
}) | ||
.then(function (versionCode) { | ||
var fStream = fs.createWriteStream(pkg+'.apk'); | ||
return api.download(pkg, versionCode).then(function (res) { | ||
res.pipe(fStream); | ||
.then(function (versionCode) { | ||
var fStream = fs.createWriteStream(pkg + '.apk'); | ||
return api.download(pkg, versionCode).then(function (res) { | ||
res.pipe(fStream); | ||
}); | ||
}); | ||
}); | ||
} | ||
|
||
|
||
var argv = require('minimist')(process.argv.slice(2)); | ||
var pkg = argv._[0] || argv.p || "com.MediaConverter"; | ||
var pkg = argv._[0] || argv.p || 'com.MediaConverter'; | ||
var vc = argv._[1] || argv.v; | ||
downloadToFile(pkg, vc); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,18 @@ | ||
var GooglePlayAPI = require('../lib/api').GooglePlayAPI; | ||
|
||
var use_cache = false; | ||
var debug = false; | ||
|
||
function getDownloadInfo(pkg) { | ||
|
||
var api = GooglePlayAPI( | ||
process.env.GOOGLE_LOGIN, process.env.GOOGLE_PASSWORD, | ||
process.env.ANDROID_ID, | ||
use_cache, | ||
debug | ||
); | ||
var api = require('./common-api-init'); | ||
|
||
function getDownloadInfo (pkg) { | ||
return api.login() | ||
.then(function() { | ||
api.details(pkg).then(function (res) { | ||
return res.details.appDetails.versionCode; | ||
}) | ||
.then(function (versionCode) { | ||
return api.downloadInfo(pkg, versionCode); | ||
}) | ||
.then(function (info) { | ||
console.log('%j', info); | ||
.then(function () { | ||
api.details(pkg).then(function (res) { | ||
return res.details.appDetails.versionCode; | ||
}) | ||
.then(function (versionCode) { | ||
return api.downloadInfo(pkg, versionCode); | ||
}) | ||
.then(function (info) { | ||
console.log('%j', info); | ||
}); | ||
}); | ||
}); | ||
} | ||
|
||
|
||
getDownloadInfo("air.WatchESPN"); | ||
|
||
getDownloadInfo('air.WatchESPN'); |
Oops, something went wrong.