0.0.32 • Published 5 months 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-client
Initialization
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
5 months ago
0.0.30
8 months ago
0.0.31
6 months ago
0.0.27
11 months ago
0.0.28
8 months ago
0.0.29
8 months ago
0.0.26
11 months ago
0.0.25
1 year ago
0.0.20
1 year ago
0.0.21
1 year ago
0.0.22
1 year ago
0.0.23
1 year ago
0.0.24
1 year ago
0.0.19
1 year ago
0.0.16
1 year ago
0.0.17
1 year ago
0.0.18
1 year ago
0.0.15
2 years ago
0.0.14
2 years ago
0.0.13
2 years ago
0.0.12
2 years ago
0.0.11
2 years ago
0.0.9
2 years ago
0.0.8
2 years ago
0.0.7
2 years ago
0.0.5
2 years ago
0.0.4
2 years ago
0.0.3-0
2 years ago
0.0.2
2 years ago
0.0.2-0
2 years ago
0.0.1
2 years ago
0.0.1-3
2 years ago
0.0.1-2
2 years ago
0.0.1-1
2 years ago
0.0.1-0
2 years ago