@ohos-ports/app-store-scraper 0.0.0-stage → 0.18.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.eslintrc ADDED
@@ -0,0 +1,18 @@
1
+ {
2
+ "env": {
3
+ "es6": true,
4
+ "mocha": true,
5
+ "node": true
6
+ },
7
+ "extends": "semistandard",
8
+ "plugins": [
9
+ "standard"
10
+ ],
11
+ "rules": {
12
+ "no-unused-vars": [2, { "vars": "all", "args": "after-used" }],
13
+ "no-var": "error",
14
+ "prefer-const": "error",
15
+ "no-else-return": "error",
16
+ "object-shorthand": ["error", "properties"]
17
+ }
18
+ }
@@ -0,0 +1 @@
1
+ github: [facundoolano]
@@ -0,0 +1,25 @@
1
+ <!--
2
+ 1. Before filing a bug please make sure to search the open issues
3
+ to make sure it hasn't already been reported: https://github.com/facundoolano/app-store-scraper/issues
4
+
5
+ 2. Also make sure you are running the latest version of the code. Old versions of the package tend to break
6
+ due to changes in source pages being scraped.
7
+ -->
8
+
9
+ * Operating System:
10
+ * Node version:
11
+ * app-play-scraper version:
12
+
13
+ ### Description:
14
+ Describe your issue here
15
+
16
+ ### Example code:
17
+ ```js
18
+ // Put code to reproduce the issue here
19
+ ```
20
+
21
+ ### Error message:
22
+
23
+ ```
24
+ Put error message here
25
+ ```
@@ -0,0 +1,21 @@
1
+ name: build
2
+ on:
3
+ push:
4
+ branches:
5
+ - master
6
+ pull_request:
7
+ jobs:
8
+ checks:
9
+ runs-on: ubuntu-latest
10
+ strategy:
11
+ matrix:
12
+ node-version: [16.x, 18.x, 20.x]
13
+ steps:
14
+ - uses: actions/checkout@v3
15
+ - name: Use Node.js ${{ matrix.node-version }}
16
+ uses: actions/setup-node@v3
17
+ with:
18
+ node-version: ${{ matrix.node-version }}
19
+ - run: npm ci
20
+ - run: npm run lint
21
+ - run: npm test
package/.travis.yml ADDED
@@ -0,0 +1,7 @@
1
+ language: node_js
2
+ node_js:
3
+ - "node"
4
+ script:
5
+ - eslint .
6
+ - npm test
7
+ - npm audit
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2017 LambdaClass
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,463 @@
1
- # Temporary Holding Version
1
+ # app-store-scraper [![Build Status](https://secure.travis-ci.org/facundoolano/app-store-scraper.png)](http://travis-ci.org/facundoolano/app-store-scraper)
2
+ Node.js module to scrape application data from the iTunes/Mac App Store.
3
+ The goal is to provide an interface as close as possible to the
4
+ [google-play-scraper](https://github.com/facundoolano/google-play-scraper) module.
2
5
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
6
+ ## Installation
7
+ ```
8
+ npm install app-store-scraper
9
+ ```
10
+
11
+ ## Usage
12
+ Available methods:
13
+ - [app](#app): Retrieves the full detail of an application.
14
+ - [list](#list): Retrieves a list of applications from one of the collections at iTunes.
15
+ - [search](#search): Retrieves a list of apps that results of searching by the given term.
16
+ - [developer](#developer): Retrieves a list of apps by the given developer id.
17
+ - [privacy](#privacy): Display the privacy details for the app.
18
+ - [suggest](#suggest): Given a string returns up to 50 suggestions to complete a search query term.
19
+ - [similar](#similar): Returns the list of "customers also bought" apps shown in the app's detail page.
20
+ - [reviews](#reviews): Retrieves a page of reviews for the app.
21
+ - [ratings](#ratings): Retrieves the ratings for the app.
22
+
23
+ ### app
24
+ Retrieves the full detail of an application. Options:
25
+
26
+ * `id`: the iTunes "trackId" of the app, for example `553834731` for Candy Crush Saga. Either this or the `appId` should be provided.
27
+ * `appId`: the iTunes "bundleId" of the app, for example `com.midasplayer.apps.candycrushsaga` for Candy Crush Saga. Either this or the `id` should be provided.
28
+ * `country`: the two letter country code to get the app details from. Defaults to `us`. Note this also affects the language of the data.
29
+ * `lang`: language code for the result text. Defaults to undefined, so country specific language should be used automatically.
30
+ + `ratings`: load additional ratings information like `ratings` number and `histogram`
31
+
32
+ Example:
33
+
34
+ ```javascript
35
+ var store = require('app-store-scraper');
36
+
37
+ store.app({id: 553834731}).then(console.log).catch(console.log);
38
+ ```
39
+
40
+ Results:
41
+
42
+ ```javascript
43
+ { id: 553834731,
44
+ appId: 'com.midasplayer.apps.candycrushsaga',
45
+ title: 'Candy Crush Saga',
46
+ url: 'https://itunes.apple.com/us/app/candy-crush-saga/id553834731?mt=8&uo=4',
47
+ description: 'Candy Crush Saga, from the makers of Candy Crush ...',
48
+ icon: 'http://is5.mzstatic.com/image/thumb/Purple30/v4/7a/e4/a9/7ae4a9a9-ff68-cbe4-eed6-fe0a246e625d/source/512x512bb.jpg',
49
+ genres: [ 'Games', 'Entertainment', 'Puzzle', 'Arcade' ],
50
+ genreIds: [ '6014', '6016', '7012', '7003' ],
51
+ primaryGenre: 'Games',
52
+ primaryGenreId: 6014,
53
+ contentRating: '4+',
54
+ languages: [ 'EN', 'JA' ],
55
+ size: '73974859',
56
+ requiredOsVersion: '5.1.1',
57
+ released: '2012-11-14T14:41:32Z',
58
+ updated: '2016-05-31T06:39:52Z',
59
+ releaseNotes: 'We are back with a tasty Candy Crush Saga update ...',
60
+ version: '1.76.1',
61
+ price: 0,
62
+ currency: 'USD',
63
+ free: true,
64
+ developerId: 526656015,
65
+ developer: 'King',
66
+ developerUrl: 'https://itunes.apple.com/us/developer/king/id526656015?uo=4',
67
+ developerWebsite: undefined,
68
+ score: 4,
69
+ reviews: 818816,
70
+ currentVersionScore: 4.5,
71
+ currentVersionReviews: 1323,
72
+ screenshots:
73
+ [ 'http://a3.mzstatic.com/us/r30/Purple49/v4/7a/8a/a0/7a8aa0ec-976d-801f-0bd9-7b753fdaf93c/screen1136x1136.jpeg',
74
+ ... ],
75
+ ipadScreenshots:
76
+ [ 'http://a1.mzstatic.com/us/r30/Purple49/v4/db/45/cf/db45cff9-bdb6-0832-157f-ac3f14565aef/screen480x480.jpeg',
77
+ ... ],
78
+ appletvScreenshots: [],
79
+ supportedDevices:
80
+ [ 'iPhone-3GS',
81
+ 'iPadWifi',
82
+ ... ]}
83
+ ```
84
+
85
+ Example with `ratings` option:
86
+
87
+ ```javascript
88
+ var store = require('app-store-scraper');
89
+
90
+ store.app({id: 553834731, ratings: true}).then(console.log).catch(console.log);
91
+ ```
92
+
93
+ Results:
94
+
95
+ ```javascript
96
+ { id: 553834731,
97
+ appId: 'com.midasplayer.apps.candycrushsaga',
98
+
99
+ // ... like above
100
+
101
+ ratings: 652230,
102
+ histogram: {
103
+ '1': 7004,
104
+ '2': 6650,
105
+ '3': 26848,
106
+ '4': 140625,
107
+ '5': 471103
108
+ }
109
+ }
110
+ ```
111
+
112
+ ### list
113
+
114
+ Retrieves a list of applications from one of the collections at iTunes. Options:
115
+
116
+ * `collection`: the collection to look up. Defaults to `collection.TOP_FREE_IOS`, available options can be found [here](https://github.com/facundoolano/app-store-scraper/blob/master/lib/constants.js#L3).
117
+ * `category`: the category to look up. This is a number associated with the genre for the application. Defaults to no specific category. Available options can be found [here](https://github.com/facundoolano/app-store-scraper/blob/master/lib/constants.js#L19).
118
+ * `country`: the two letter country code to get the list from. Defaults to `us`.
119
+ * `lang`: language code for the result text. Defaults to undefined, so country specific language should be used automatically.
120
+ * `num`: the amount of elements to retrieve. Defaults to `50`, maximum
121
+ allowed is `200`.
122
+ * `fullDetail`: If this is set to `true`, an extra request will be
123
+ made to get extra attributes of the resulting applications (like
124
+ those returned by the `app` method).
125
+
126
+ Example:
127
+
128
+ ```js
129
+ var store = require('app-store-scraper');
130
+
131
+ store.list({
132
+ collection: store.collection.TOP_FREE_IPAD,
133
+ category: store.category.GAMES_ACTION,
134
+ num: 2
135
+ })
136
+ .then(console.log)
137
+ .catch(console.log);
138
+ ```
139
+
140
+ Returns:
141
+
142
+ ```js
143
+ [ { id: '1091944550',
144
+ appId: 'com.hypah.io.slither',
145
+ title: 'slither.io',
146
+ icon: 'http://is4.mzstatic.com/image/thumb/Purple30/v4/68/d7/4d/68d74df4-f4e7-d4a4-a8ea-dbab686e5554/mzl.ujmngosn.png/100x100bb-85.png',
147
+ url: 'https://itunes.apple.com/us/app/slither.io/id1091944550?mt=8&uo=2',
148
+ price: 0,
149
+ currency: 'USD',
150
+ free: true,
151
+ description: 'Play against other people online! ...',
152
+ developer: 'Steve Howse',
153
+ developerUrl: 'https://itunes.apple.com/us/developer/steve-howse/id867992583?mt=8&uo=2',
154
+ developerId: '867992583',
155
+ genre: 'Games',
156
+ genreId: '6014',
157
+ released: '2016-03-25T10:01:46-07:00' },
158
+ { id: '1046846443',
159
+ appId: 'com.ubisoft.hungrysharkworld',
160
+ title: 'Hungry Shark World',
161
+ icon: 'http://is5.mzstatic.com/image/thumb/Purple60/v4/08/1a/8d/081a8d06-b4d5-528b-fa8e-f53646b6f797/mzl.ehtjvlft.png/100x100bb-85.png',
162
+ url: 'https://itunes.apple.com/us/app/hungry-shark-world/id1046846443?mt=8&uo=2',
163
+ price: 0,
164
+ currency: 'USD',
165
+ free: true,
166
+ description: 'The stunning sequel to Hungry ...',
167
+ developer: 'Ubisoft',
168
+ developerUrl: 'https://itunes.apple.com/us/developer/ubisoft/id317644720?mt=8&uo=2',
169
+ developerId: '317644720',
170
+ genre: 'Games',
171
+ genreId: '6014',
172
+ released: '2016-05-04T09:43:06-07:00' } ]
173
+ ```
174
+
175
+ ### search
176
+
177
+ Retrieves a list of apps that results of searching by the given term. Options:
178
+
179
+ * `term`: the term to search for (required).
180
+ * `num`: the amount of elements to retrieve. Defaults to `50`.
181
+ * `page`: page of results to retrieve. Defaults to to `1`.
182
+ * `country`: the two letter country code to get the similar apps
183
+ from. Defaults to `us`.
184
+ * `lang`: language code for the result text. Defaults to `en-us`.
185
+ * `idsOnly`: (optional, defaults to `false`): skip extra lookup request. Search results will contain array of application ids.
186
+
187
+ Example:
188
+
189
+ ```js
190
+ var store = require('app-store-scraper');
191
+
192
+ store.search({
193
+ term: 'panda',
194
+ num: 2,
195
+ page: 3,
196
+ country : 'us',
197
+ lang: 'lang'
198
+ })
199
+ .then(console.log)
200
+ .catch(console.log);
201
+ ```
202
+
203
+ Results:
204
+
205
+ ```js
206
+ [
207
+ { id: 903990394,
208
+ appId: 'com.pandarg.pxmobileapp',
209
+ title: 'Panda Express Chinese Kitchen',
210
+ (...)
211
+ },
212
+ {
213
+ id: 700970012,
214
+ appId: 'com.sgn.pandapop',
215
+ title: 'Panda Pop',
216
+ (...)
217
+ }
218
+ ]
219
+ ```
220
+
221
+ ### developer
222
+ Retrieves a list of applications by the give developer id. Options:
223
+
224
+ * `devId`: the iTunes "artistId" of the developer, for example `284882218` for Facebook.
225
+ * `country`: the two letter country code to get the app details from. Defaults to `us`. Note this also affects the language of the data.
226
+ * `lang`: language code for the result text. Defaults to undefined, so country specific language should be used automatically.
227
+
228
+ Example:
229
+
230
+ ```javascript
231
+ var store = require('app-store-scraper');
232
+
233
+ store.developer({devId: 284882218}).then(console.log).catch(console.log);
234
+ ```
235
+
236
+ Results:
237
+
238
+ ```js
239
+ [
240
+ { id: 284882215,
241
+ appId: 'com.facebook.Facebook',
242
+ title: 'Facebook',
243
+ (...)
244
+ },
245
+ { id: 454638411,
246
+ appId: 'com.facebook.Messenger',
247
+ title: 'Messenger',
248
+ (...)
249
+ },
250
+ (...)
251
+ ]
252
+ ```
253
+
254
+ ### privacy
255
+
256
+ Retrieves the ratings for the app. Currently only for US App Store. Options:
257
+
258
+ * `id`: the iTunes "trackId" of the app, for example `553834731` for Candy Crush Saga.
259
+
260
+ Example:
261
+
262
+ ```js
263
+ var store = require('app-store-scraper');
264
+
265
+ store.privacy({
266
+ id: 324684580,
267
+ })
268
+ .then(console.log)
269
+ .catch(console.log);
270
+ ```
271
+
272
+ Returns:
273
+
274
+ ```js
275
+ {
276
+ "managePrivacyChoicesUrl": null,
277
+ "privacyTypes": [
278
+ {
279
+ "privacyType": "Data Used to Track You",
280
+ "identifier": "DATA_USED_TO_TRACK_YOU",
281
+ "description": "The following data may be used to track you across apps and websites owned by other companies:",
282
+ "dataCategories": [
283
+ {
284
+ "dataCategory": "Contact Info",
285
+ "identifier": "CONTACT_INFO",
286
+ "dataTypes": [
287
+ "Email Address",
288
+ "Phone Number"
289
+ ]
290
+ },
291
+ ...
292
+ ],
293
+ "purposes": []
294
+ },
295
+ ...
296
+ ]
297
+ }
298
+ ```
299
+
300
+ ### suggest
301
+
302
+ Given a string returns up to 50 suggestions to complete a search query term.
303
+ A priority index is also returned which goes from `0` for terms with low traffic
304
+ to `10000` for the most searched terms.
305
+
306
+ Example:
307
+
308
+ ```js
309
+ var store = require('app-store-scraper');
310
+
311
+ store.suggest({term: 'panda'}).then(console.log).catch(console.log);
312
+ ```
313
+
314
+ Results:
315
+
316
+ ```js
317
+ [
318
+ { term: 'panda pop' },
319
+ { term: 'panda pop free' },
320
+ { term: 'panda' },
321
+ { term: 'panda express' },
322
+ { term: 'panda games' },
323
+ { term: 'panda pop 2' },
324
+ ...
325
+ ]
326
+ ```
327
+
328
+ ### similar
329
+ Returns the list of "customers also bought" apps shown in the app's detail page. Options:
330
+
331
+ * `id`: the iTunes "trackId" of the app, for example `553834731` for Candy Crush Saga. Either this or the `appId` should be provided.
332
+ * `appId`: the iTunes "bundleId" of the app, for example `com.midasplayer.apps.candycrushsaga` for Candy Crush Saga. Either this or the `id` should be provided.
333
+
334
+ Example:
335
+
336
+ ```js
337
+ var store = require('app-store-scraper');
338
+
339
+ store.similar({id: 553834731}).then(console.log).catch(console.log);
340
+ ```
341
+
342
+ Results:
343
+
344
+ ```js
345
+ [
346
+ {
347
+ id: 632285588,
348
+ appId: 'com.nerdyoctopus.dots',
349
+ title: 'Dots: A Game About Connecting',
350
+ (...)
351
+ },
352
+ {
353
+ id: 727296976,
354
+ appId: 'com.sgn.cookiejam',
355
+ title: 'Cookie Jam',
356
+ (...)
357
+ }
358
+ (...)
359
+ ]
360
+ ```
361
+
362
+ ### reviews
363
+
364
+ Retrieves a page of reviews for the app. Options:
365
+
366
+ * `id`: the iTunes "trackId" of the app, for example `553834731` for Candy Crush Saga. Either this or the `appId` should be provided.
367
+ * `appId`: the iTunes "bundleId" of the app, for example `com.midasplayer.apps.candycrushsaga` for Candy Crush Saga. Either this or the `id` should be provided.
368
+ * `country`: the two letter country code to get the reviews from. Defaults to `us`.
369
+ * `page`: the review page number to retrieve. Defaults to `1`, maximum allowed is `10`.
370
+ * `sort`: the review sort order. Defaults to `store.sort.RECENT`, available options are `store.sort.RECENT` and `store.sort.HELPFUL`.
371
+
372
+ Example:
373
+
374
+ ```js
375
+ var store = require('app-store-scraper');
376
+
377
+ store.reviews({
378
+ appId: 'com.midasplayer.apps.candycrushsaga',
379
+ sort: store.sort.HELPFUL,
380
+ page: 2
381
+ })
382
+ .then(console.log)
383
+ .catch(console.log);
384
+ ```
385
+
386
+ Returns:
387
+
388
+ ```js
389
+ [ { id: '1472864600',
390
+ userName: 'Linda D. Lopez',
391
+ userUrl: 'https://itunes.apple.com/us/reviews/id324568166',
392
+ version: '1.80.1',
393
+ score: 5,
394
+ title: 'Great way to pass time or unwind',
395
+ text: 'I was a fan of Bejeweled many moons ago...',
396
+ updated: '2021-07-26T18:26:24-07:00',
397
+ url: 'https://itunes.apple.com/us/review?id=553834731&type=Purple%20Software' },,
398
+ { id: '1472864708',
399
+ userName: 'Jennamaxkidd',
400
+ userUrl: 'https://itunes.apple.com/us/reviews/id223990784',
401
+ version: '1.80.1',
402
+ score: 1,
403
+ title: 'Help! THE PROBLEM IS NOT FIXED!',
404
+ text: 'STILL HAVING THE SAME ISSUE. It\'s happening again...',
405
+ updated: '2021-07-26T18:04:41-07:00',
406
+ url: 'https://itunes.apple.com/us/review?id=553834731&type=Purple%20Software' },
407
+ (...)
408
+ ]
409
+ ```
410
+
411
+ ### ratings
412
+
413
+ Retrieves the ratings for the app. Options:
414
+
415
+ * `id`: the iTunes "trackId" of the app, for example `553834731` for Candy Crush Saga. Either this or the `appId` should be provided.
416
+ * `appId`: the iTunes "bundleId" of the app, for example `com.midasplayer.apps.candycrushsaga` for Candy Crush Saga. Either this or the `id` should be provided.
417
+ * `country`: the two letter country code to get the reviews from. Defaults to `us`.
418
+
419
+ Example:
420
+
421
+ ```js
422
+ var store = require('app-store-scraper');
423
+
424
+ store.ratings({
425
+ appId: 'com.midasplayer.apps.candycrushsaga',
426
+ })
427
+ .then(console.log)
428
+ .catch(console.log);
429
+ ```
430
+
431
+ Returns:
432
+
433
+ ```js
434
+ {
435
+ ratings: 652719,
436
+ histogram: {
437
+ '1': 7012,
438
+ '2': 6655,
439
+ '3': 26876,
440
+ '4': 140680,
441
+ '5': 471496
442
+ }
443
+ }
444
+ ```
445
+
446
+ ### Memoization
447
+
448
+ Since every library call performs one or multiple requests to
449
+ an iTunes API or web page, sometimes it can be useful to cache the results
450
+ to avoid requesting the same data twice. The `memoized` function returns the
451
+ store object that caches its results:
452
+
453
+ ``` javascript
454
+ var store = require('app-store-scraper'); // regular non caching version
455
+ var memoized = require('app-store-scraper').memoized(); // cache with default options
456
+ var memoizedCustom = require('app-store-scraper').memoized({ maxAge: 1000 * 60 }); // cache with default options
457
+
458
+ memoized.app({id: 553834731}) // will make a request
459
+ .then(() => memoized.app({id: 553834731})); // will resolve to the cached value without requesting
460
+ ```
461
+
462
+ The options available are those supported by the [memoizee](https://github.com/medikoo/memoizee) module.
463
+ By default up to 1000 values are cached by each method and they expire after 5 minutes.
package/index.js ADDED
@@ -0,0 +1,30 @@
1
+ 'use strict';
2
+
3
+ const R = require('ramda');
4
+ const memoizee = require('memoizee');
5
+ const constants = require('./lib/constants');
6
+
7
+ const methods = {
8
+ app: require('./lib/app'),
9
+ list: require('./lib/list'),
10
+ search: require('./lib/search'),
11
+ developer: require('./lib/developer'),
12
+ privacy: require('./lib/privacy'),
13
+ suggest: require('./lib/suggest'),
14
+ similar: require('./lib/similar'),
15
+ reviews: require('./lib/reviews'),
16
+ ratings: require('./lib/ratings')
17
+ };
18
+
19
+ function memoized (opts) {
20
+ const cacheOpts = Object.assign({
21
+ primitive: true,
22
+ normalizer: JSON.stringify,
23
+ maxAge: 1000 * 60 * 5, // cache for 5 minutes
24
+ max: 1000 // save up to 1k results to avoid memory issues
25
+ }, opts);
26
+ const doMemoize = (fn) => memoizee(fn, cacheOpts);
27
+ return Object.assign({}, constants, R.map(doMemoize, methods));
28
+ }
29
+
30
+ module.exports = Object.assign({memoized}, constants, methods);
package/lib/app.js ADDED
@@ -0,0 +1,31 @@
1
+ 'use strict';
2
+
3
+ const common = require('./common');
4
+ const ratings = require('./ratings');
5
+
6
+ function app (opts) {
7
+ return new Promise(function (resolve) {
8
+ if (!opts.id && !opts.appId) {
9
+ throw Error('Either id or appId is required');
10
+ }
11
+ const idField = opts.id ? 'id' : 'bundleId';
12
+ const idValue = opts.id || opts.appId;
13
+ resolve(common.lookup([idValue], idField, opts.country, opts.lang, opts.requestOptions, opts.throttle));
14
+ })
15
+ .then((results) => {
16
+ if (results.length === 0) {
17
+ throw Error('App not found (404)');
18
+ }
19
+
20
+ const result = results[0];
21
+
22
+ if (opts.ratings) {
23
+ if (!opts.id) { opts.id = result.id; }
24
+ return ratings(opts).then((ratingsResult) => Object.assign({}, result, ratingsResult));
25
+ }
26
+
27
+ return result;
28
+ });
29
+ }
30
+
31
+ module.exports = app;