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 = {
|
|
|
|
|
2017-10-13 09:39:58 +00:00
|
|
|
'getFTSE': function() {
|
2016-06-23 11:04:25 +00:00
|
|
|
return new Promise(function(resolve, reject) {
|
2017-10-13 09:39:58 +00:00
|
|
|
'use strict';
|
2016-06-23 11:04:25 +00:00
|
|
|
|
2017-10-13 09:39:58 +00:00
|
|
|
const err = 0;
|
2016-06-23 11:04:25 +00:00
|
|
|
ftse('100', 10, 'risers', function(items) {
|
2017-10-13 09:39:58 +00:00
|
|
|
if (items === err)
|
2016-06-23 11:04:25 +00:00
|
|
|
return reject(err);
|
2017-10-13 09:39:58 +00:00
|
|
|
|
2016-06-23 11:04:25 +00:00
|
|
|
return resolve(items);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
};
|