Skip to content

Commit

Permalink
update readme with password errors
Browse files Browse the repository at this point in the history
  • Loading branch information
eshaham authored Jul 30, 2017
1 parent 77c9797 commit b78d801
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,28 @@ Then you can simply import and use it in your node module:
const scrapers = require('israeli-bank-scrapers');

const credentials = {...}; // different for each bank
const accountData = await scrapers.discountScraper(credentials);

console.log(`account number: ${accountData.accountNumber}`);
console.log(`# transactions found: ${accountData.txns.length}`);
const scrapeResult = await scrapers.discountScraper(credentials);

if (scrapeResult.success) {
console.log(`account number: ${scrapeResult.accountNumber}`);
console.log(`# transactions found: ${scrapeResult.txns.length}`);
}
else {
console.error(`scraping failed for the following reason: ${scrapeResult.errorType}`);
}
```
The structure of the result object is as follows:
```node
{
"success": true|false
"errorType": 'invalidPassword'|'changePassword' // only on success=false
"accountNumber": string,
"txns": [{
... // currently what discount returns, will need to standardize soon
}],
}
```
For now, you can only use `discountScraper`.
Note: only `discountScraper`is available.

# Credentials per scraper
## Discount scraper
Expand Down

0 comments on commit b78d801

Please sign in to comment.