Skip to content

Commit c56c481

Browse files
committed
undo style change
1 parent 6d5cf31 commit c56c481

2 files changed

Lines changed: 20 additions & 20 deletions

File tree

appstorereviews.js

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ require('./constants');
66

77
exports.startReview = function (config, first_run) {
88

9-
if (config.regions === false) {
9+
if (config.regions === false){
1010
try {
11-
config.regions = JSON.parse(fs.readFileSync(__dirname + '/regions.json'));
11+
config.regions = JSON.parse(fs.readFileSync(__dirname + '/regions.json'));
1212
} catch (err) {
1313
config.regions = ["us"];
1414
}
@@ -26,7 +26,7 @@ exports.startReview = function (config, first_run) {
2626
for (var i = 0; i < config.regions.length; i++) {
2727
const region = config.regions[i];
2828

29-
const appInformation = Object.assign({}, globalAppInformation);
29+
const appInformation = Object.assign({},globalAppInformation);
3030
appInformation.region = region;
3131

3232
exports.fetchAppStoreReviews(config, appInformation, function (reviews) {
@@ -50,7 +50,7 @@ exports.startReview = function (config, first_run) {
5050
exports.handleFetchedAppStoreReviews(config, appInformation, reviews);
5151
}
5252

53-
// calculate the interval with an offset, to avoid spamming the server
53+
//calculate the interval with an offset, to avoid spamming the server
5454
var interval_seconds = typeof config.schedule === 'number' ? config.schedule + (i * 10) : i * 10;
5555

5656
var fetch = function (config, appInformation) {
@@ -73,8 +73,8 @@ exports.startReview = function (config, first_run) {
7373
});
7474
};
7575

76-
var fetchAppStoreReviewsByPage = function (config, appInformation, page, callback) {
77-
const url = "https://itunes.apple.com/" + appInformation.region + "/rss/customerreviews/page=" + page + "/id=" + config.appId + "/sortBy=mostRecent/json";
76+
var fetchAppStoreReviewsByPage = function(config, appInformation, page, callback){
77+
const url = "https://itunes.apple.com/" + appInformation.region + "/rss/customerreviews/page="+page+"/id=" + config.appId + "/sortBy=mostRecent/json";
7878

7979
request(url, function (error, response, body) {
8080
if (error) {
@@ -89,7 +89,7 @@ var fetchAppStoreReviewsByPage = function (config, appInformation, page, callbac
8989
var rss;
9090
try {
9191
rss = JSON.parse(body);
92-
} catch (e) {
92+
} catch(e) {
9393
console.error("Error parsing app store reviews");
9494
console.error(e);
9595

@@ -108,13 +108,13 @@ var fetchAppStoreReviewsByPage = function (config, appInformation, page, callbac
108108
if (config.verbose) console.log("INFO: Received reviews from App Store for (" + config.appId + ") (" + appInformation.region + ")");
109109

110110
var reviews = entries
111-
.filter(function (review) {
112-
return !isAppInformationEntry(review)
113-
})
114-
.reverse()
115-
.map(function (review) {
116-
return exports.parseAppStoreReview(review, config, appInformation);
117-
});
111+
.filter(function (review) {
112+
return !isAppInformationEntry(review)
113+
})
114+
.reverse()
115+
.map(function (review) {
116+
return exports.parseAppStoreReview(review, config, appInformation);
117+
});
118118

119119
callback(reviews)
120120
});
@@ -123,9 +123,9 @@ var fetchAppStoreReviewsByPage = function (config, appInformation, page, callbac
123123
exports.fetchAppStoreReviews = function (config, appInformation, callback) {
124124
var page = 1;
125125
var allReviews = [];
126-
function pageCallback(reviews) {
126+
function pageCallback(reviews){
127127
allReviews = allReviews.concat(reviews);
128-
if (reviews.length > 0 && page < 10) {
128+
if (reviews.length > 0 && page < 10){
129129
page++;
130130
fetchAppStoreReviewsByPage(config, appInformation, page, pageCallback);
131131
} else {
@@ -207,7 +207,7 @@ exports.fetchAppInformation = function (config, callback) {
207207
var data;
208208
try {
209209
data = JSON.parse(body);
210-
} catch (e) {
210+
} catch(e) {
211211
console.error("Error parsing app store data");
212212
console.error(e);
213213

@@ -229,7 +229,7 @@ exports.fetchAppInformation = function (config, callback) {
229229
appInformation.appName = entry.trackCensoredName;
230230
}
231231

232-
if (!config.appIcon && entry.artworkUrl100) {
232+
if (!config.appIcon && entry.artworkUrl100 ) {
233233
appInformation.appIcon = entry.artworkUrl100;
234234
}
235235

googleplayreviews.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const controller = require('./reviews');
2-
var { google } = require('googleapis');
2+
var {google} = require('googleapis');
33

44
var playScraper = require('google-play-scraper');
55
var androidVersions = require('android-versions')
@@ -8,7 +8,7 @@ exports.startReview = function (config, first_run) {
88
var appInformation = {};
99

1010
//scrape Google Play for app information first
11-
playScraper.app({ appId: config.appId })
11+
playScraper.app({appId: config.appId})
1212
.then(function (appData, error) {
1313
if (error) {
1414
return console.error("ERROR: [" + config.appId + "] Could not scrape Google Play, " + error);

0 commit comments

Comments
 (0)