Skip to content

Commit

Permalink
Merge pull request #8 from ozgurg/dev
Browse files Browse the repository at this point in the history
release: v1.2.1
  • Loading branch information
ozgurg authored Sep 10, 2022
2 parents ef9abea + 861e5f1 commit 1d47591
Show file tree
Hide file tree
Showing 4 changed files with 558 additions and 518 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 Özgür Görgülü
Copyright (c) 2022 Özgür Görgülü <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
28 changes: 17 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ Scrape extremely up-to-date exchange rates from Google fast and free.
npm install google-currency-scraper
```

## Usage
_This package is a [pure ESM package](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c)._

_First response might be slow._
## Usage

```javascript
import googleCurrencyScraper, { CurrencyCode } from "google-currency-scraper";
Expand All @@ -22,7 +22,6 @@ const currency = await googleCurrencyScraper({
from: CurrencyCode.USD, // You can use "USD" as well
to: CurrencyCode.TRY // You can use "TRY" as well
});
// Returns:
// {
// from: "USD",
// to: "TRY",
Expand All @@ -31,18 +30,25 @@ const currency = await googleCurrencyScraper({
// }
```

_This package is a [pure ESM package](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c)._

## API

### googleCurrencyScraper({ from, to })
### googleCurrencyScraper(params) : object

#### params

Default: <code>{}</code>\
Type: <code>object</code>\
Required: Yes

#### params.from

Type: <code>CurrencyCode | string</code>\
Required: Yes

All params are required.
#### params.to

| Param | Type |
|-------|-----------------------------------------|
| from | <code>CurrencyCode &#124; string</code> |
| to | <code>CurrencyCode &#124; string</code> |
Type: <code>CurrencyCode | string</code>\
Required: Yes

### CurrencyCode

Expand Down
Loading

0 comments on commit 1d47591

Please sign in to comment.