Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including egypt-banks-scraper with all npm packages installed. Try it out:

var egyptBanksScraper = require("egypt-banks-scraper")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

egypt-banks-scraper v2.0.0

Scrape exchange rates from Egypt banks

Egypt Banks Scraper Version MIT license airbnb code style

Scrape exchange rates from Egypt's banks

Installation

npm install --save egypt-banks-scraper

Getting Started

Require the package

var EGBScraper = require('egypt-banks-scraper');

getExchangeRates takes 3 arguments:

  • banks array: list of banks codes to get its exchange rates
  • currencies array: list of currencies iso code to get from the banks
  • callback function: called when finished with the signature (err, data)

To get all banks with all currencies

EGBScraper.getExchangeRates([], [], (err, data) => {
  // data
});

To get All banks with certain currencies

// Get only USD and EUR exchange rates from all banks
EGBScraper.getExchangeRates([], ['USD', 'EUR'], (err, data) => {
  // data
});

To get All exchange rates in certain banks

EGBScraper.getExchangeRates(['NBG', 'CIB'], [], (err, data) => {
  // data
});

To get the exchange rates for some currencies and some banks

EGBScraper.getExchangeRates(['NBG', 'CIB'], ['USD', 'EUR'], (err, data) => {
  // data
});

Banks

Supported banks

CodeBank Name
NBGNational Bank of Greece
CAECredit Agricole
CBECentral Bank of Egypt
NBENational Bank of Egypt
CIBCommercial International Bank
AAIBArab African International bank
BDCBanque Du Caire
BMBanque Misr
SCBSuez Canal Bank
ABBAl Baraka Bank
ABKAl Ahli bank of kuwait
SAIBSociété Arabe Internationale de Banque
MIDBMisr Iran Development Bank
UBEThe United Bank of Egypt
EDBEExport Development Bank of Egypt
ABAlex Bank
EGBEgyptian Gulf Bank
ADIBAbu Dhabi Islamic Bank
FIBEFaisal Islamic Bank Of Egypt
BBEBlom Bank Egypt
MASQMashreq Bank Egypt
AIBKArab Investment Bank
HDBHousing and development bank
AUDIAudi Bank
ABEAgricultural Bank of Egypt
EALBEgyptian Arab Land Bank
AIBArab international bank

To support soon

  • HSBC
  • Ahli United bank
  • AIBK
  • Emirated NBD
  • Arab Bank
  • QNB AlAhli
  • Bank Audi

Development

available predefined NPM scripts. Run them by typing this in your terminal: npm run [script]

NameDescription
lintRuns ESlint on all files from ./src and ./tests
lint:fixRuns ESlint and fixes all the inconsistencies
testRuns the tests with Mocha
test:devRe-runs the tests whenever a change occurs
buildCompiles all ES2015 files to ES5 (legacy code)
cleanRemoves the compiled files
startRun src/index.js using babel-node

NOTE: There is another script prepublish that runs before you publish the package to NPM. All it does is to run clean and build.

Contributing

Before you submit a pull request, please take the following actions.

  1. Open an issue describing the contribution you would like to make
  2. Discuss until we all agree that your idea is useful for the project
  3. Create a pull request but make sure you follow the style guide and the tests pass
  4. Voila! You've done an amazing job.

Credits

  • Andrei Canta for the work he has put into his npm-starter project
  • Airbnb for the work they've put into the javascript style guide and into the ESlint package.

License

MIT @ Mohamed Mayla

Metadata

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free