forked from msimerson/node-finance-statement-scraper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
33 lines (26 loc) · 788 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
'use strict';
var util = require('util');
var jsdom = require('jsdom');
var htmlparser = require('htmlparser2');
var yahoo = require('./lib/yahoo');
exports.getIojs = function (done) {
jsdom.env(
'https://iojs.org/dist/',
['http://code.jquery.com/jquery.js'],
function (err, window) {
if (err) { console.error(err); }
done(err, window.$('a').length - 4);
}
);
};
exports.getIncomeStatement = function (args, done) {
// choose a provider, dispatch to provider
// via config file, or switch after a provider faults?
yahoo.getIncomeStatement(args, done);
};
exports.getBalanceSheet = function (args, done) {
yahoo.getBalanceSheet(args, done);
};
exports.getCashFlow = function (args, done) {
yahoo.getCashFlow(args, done);
};