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-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
2 years ago
0.0.30
2 years ago
0.0.31
2 years ago
0.0.27
2 years ago
0.0.28
2 years ago
0.0.29
2 years ago
0.0.26
2 years ago
0.0.25
2 years ago
0.0.20
2 years ago
0.0.21
2 years ago
0.0.22
2 years ago
0.0.23
2 years ago
0.0.24
2 years ago
0.0.19
2 years ago
0.0.16
3 years ago
0.0.17
3 years ago
0.0.18
2 years ago
0.0.15
3 years ago
0.0.14
3 years ago
0.0.13
3 years ago
0.0.12
3 years ago
0.0.11
3 years ago
0.0.9
3 years ago
0.0.8
3 years ago
0.0.7
3 years ago
0.0.5
3 years ago
0.0.4
3 years ago
0.0.3-0
3 years ago
0.0.2
3 years ago
0.0.2-0
3 years ago
0.0.1
3 years ago
0.0.1-3
3 years ago
0.0.1-2
3 years ago
0.0.1-1
3 years ago
0.0.1-0
3 years ago