Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sweep: Update README.md to reflect new code changes #265

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ Getting a rate by `code`:
```js
import bitpayRates from 'bitpay-rates';

const code = 'ARS'; // see list of codes bellow
const code = 'ARS'; // see list of codes below

// Using promise
bitpayRates
.get(code)
.then((rate) => console.log('Promise Rate:', rate))
.catch((err) => console.error('Promise Error:', err));
.then((rate) => console.log(`[Promise][${code}] Rate:`, rate))
.catch((err) => console.error(`[Promise][${code}] Error:`, err));
```

Successful response:
Expand All @@ -43,11 +43,11 @@ Getting `all` the rates:
```js
import bitpayRates from 'bitpay-rates';

// Using callback
bitpayRates.get((err, res) => {
console.error('Callback Error:', err);
console.log('Callback Rates:', res);
});
// Using promise
bitpayRates
.get()
.then((rates) => console.log('[Promise][All] Rates:', rates))
.catch((err) => console.error('[Promise][All] Error:', err));
```

Successful response:
Expand All @@ -70,7 +70,7 @@ Successful response:

More examples [here](example/rates-example.js).

## Available Codes (updated: 2024-01-24)
## Available Codes (updated: 2023-06-09)

[Follow this link](CODES.md) to see the complete list of codes.

Expand Down