12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- module.exports.name = 'calls_statistics'
- module.exports.description = 'Get statistics about all calls'
- module.exports.requiresBackup = true
- module.exports.usesPromises = true
- module.exports.functions = {
- '>=9.0': function (program, backup, resolve, reject) {
-
- backup.getCallsStatistics()
- .then((items) => {
- var result = program.formatter.format(Object.entries(items[0]), {
- program: program,
- columns: {
- 'Key': el => el[0] + '',
- 'Value': el => el[1] + ''
- }
- })
- resolve(result)
- })
- .catch(reject)
- },
- '>=1.0,<9.0': function (program, backup, resolve, reject) {
-
- backup.getCallsStatisticsiOS7()
- .then((items) => {
- var result = program.formatter.format(items, {
- program: program,
- columns: {
- 'Key': el => el.key + '',
- 'Value': el => el.value + ''
- }
- })
- resolve(result)
- })
- .catch(reject)
- }
- }
|