Skip to content

Commit

Permalink
Simplify callbacks & error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
bob6664569 committed May 21, 2018
1 parent 07e27d4 commit ab5e7e5
Show file tree
Hide file tree
Showing 3 changed files with 105 additions and 165 deletions.
15 changes: 8 additions & 7 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@

const Blockfolio = require("./lib/blockfolio");

const PLATFORM = "APIClient",
API_URL = "https://api-v0.blockfolio.com/rest/",
SIGNAL_API = "https://signal-api.blockfolio.com/",
MAGIC_TOKEN = "edtopjhgn2345piuty89whqejfiobh89-2q453", // Common token to pseudo-authenticate API Client
LOCALE = "en-US",
FIAT_CURRENCY = "usd";
const PLATFORM = "APIClient",
API_URL = "https://api-v0.blockfolio.com/rest/",
SIGNAL_API = "https://signal-api.blockfolio.com/",
MAGIC_TOKEN = "edtopjhgn2345piuty89whqejfiobh89-2q453", // Common token to pseudo-authenticate API Client
LOCALE = "en-US",
FIAT_CURRENCY = "usd",
PER_SECOND_RATE_LIMIT = 10; // Throttle for the old school API

module.exports = new Blockfolio(FIAT_CURRENCY, API_URL, MAGIC_TOKEN, LOCALE, PLATFORM, SIGNAL_API);
module.exports = new Blockfolio(FIAT_CURRENCY, API_URL, MAGIC_TOKEN, LOCALE, PLATFORM, SIGNAL_API, PER_SECOND_RATE_LIMIT);

})();
Loading

0 comments on commit ab5e7e5

Please sign in to comment.