0.0.32 • Published 2 years ago
@getevy/api-client v0.0.32
JS Evy API Client
An extended JS/TS client for Evy API.
Works in browsers and node.
Add the dependency to your project
npm i @getevy/api-clientInitialization
import EvyApi from '@getevy/api-client';
const apiClient = new EvyApi({ apiKey: 'your_api_key' });Configuration object
| Key | Required | Description |
|---|---|---|
| apiKey | yes | your API key |
| apiURL | no | the URL of the API to target |
| language | no | the prefered language of the user, only en and fr are supported for now |
Usage
Get offers
Usage
const offers = await apiClient.offers.get('product_id', 1000, 'en');Interface
apiClient.offers.get(product_id: string, price: number, language?: string) => Promise<IOffersData>Parameters (from left to right)
| Name | Required | Description |
|---|---|---|
| product_id | yes | The product for which we want insurance offers |
| price | yes | The current price of the product |
| language | no | The locale (overrides the initial configuration) |
Result: IOffersData
| Key | Description |
|---|---|
| offers | The offers attachable on the product |
| locales | The translations of the wording to use with the offer |
See the types or the API documentation for further descriptions.
License
The MIT License (MIT). Please see the License File for more information.
0.0.32
2 years ago
0.0.30
2 years ago
0.0.31
2 years ago
0.0.27
3 years ago
0.0.28
2 years ago
0.0.29
2 years ago
0.0.26
3 years ago
0.0.25
3 years ago
0.0.20
3 years ago
0.0.21
3 years ago
0.0.22
3 years ago
0.0.23
3 years ago
0.0.24
3 years ago
0.0.19
3 years ago
0.0.16
3 years ago
0.0.17
3 years ago
0.0.18
3 years ago
0.0.15
3 years ago
0.0.14
4 years ago
0.0.13
4 years ago
0.0.12
4 years ago
0.0.11
4 years ago
0.0.9
4 years ago
0.0.8
4 years ago
0.0.7
4 years ago
0.0.5
4 years ago
0.0.4
4 years ago
0.0.3-0
4 years ago
0.0.2
4 years ago
0.0.2-0
4 years ago
0.0.1
4 years ago
0.0.1-3
4 years ago
0.0.1-2
4 years ago
0.0.1-1
4 years ago
0.0.1-0
4 years ago