Browse Source

Improve update wording

pull/3/merge
Luke Childs 7 years ago
parent
commit
6604c22f14
  1. 4
      README.md
  2. 2
      update/index.js

4
README.md

@ -63,11 +63,11 @@ coins.filter(coin => coin.maxSupply > 10000000000).map(coin => coin.name);
const coinsJson = require('coinlist/src/coins.json'); const coinsJson = require('coinlist/src/coins.json');
``` ```
## Update ## Update Coins
```shell ```shell
$ yarn update $ yarn update
Fetching data... Fetching latest currencies from the coinmarketcap.com API...
Written 1567 coins to src/coins.json Written 1567 coins to src/coins.json
✨ Done in 0.52s. ✨ Done in 0.52s.
``` ```

2
update/index.js

@ -6,7 +6,7 @@ const writeJsonFile = require('write-json-file');
const jsonFile = 'src/coins.json'; const jsonFile = 'src/coins.json';
(async () => { (async () => {
console.log(`Fetching data...`); console.log(`Fetching latest currencies from the coinmarketcap.com API...`);
const response = await got('https://api.coinmarketcap.com/v1/ticker/?limit=0', { json: true }); const response = await got('https://api.coinmarketcap.com/v1/ticker/?limit=0', { json: true });
const coins = response.body const coins = response.body
.map(coin => ({ .map(coin => ({

Loading…
Cancel
Save