silvrgit/lib/today/todayftse.js

26 lines
417 B
JavaScript
Raw Normal View History

2016-06-23 11:04:25 +00:00
/**
*
* User: Martin Donnelly
* Date: 2016-06-23
* Time: 11:45
*
*/
2017-03-22 15:48:36 +00:00
const ftse = require('ftse');
2016-06-23 11:04:25 +00:00
module.exports = {
'getFTSE': function() {
2016-06-23 11:04:25 +00:00
return new Promise(function(resolve, reject) {
'use strict';
2016-06-23 11:04:25 +00:00
const err = 0;
2016-06-23 11:04:25 +00:00
ftse('100', 10, 'risers', function(items) {
if (items === err)
2016-06-23 11:04:25 +00:00
return reject(err);
2016-06-23 11:04:25 +00:00
return resolve(items);
});
});
}
};