0.0.32 • Published 2 years ago

@getevy/js-sdk v0.0.32

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

Evy SDK

Evy SDK is a vanilla JS / TS library that provides widgets for your Evy integration.

Evy is not meant to be used directly with frameworks or UI libraries (eg. React/Vue.js/Angular/Ember...). Instead, you should use Evy stately.

Installation

npm i @getevy/js-sdk

Alternatively, you can link the library in your HTML page, like that:

<head>
  <script src="https://cdn.jsdelivr.net/npm/@getevy/js-sdk@latest/dist/bundle.js"></script>
  ...
</head>

Initialization

import { init as initEvySdk, components as evyComponents } from '@getevy/js-sdk';

const evySdk = initEvySdk({ apiKey: 'your_api_key' });

evySdk.addComponents([
  evyComponents.inlineOffer({
    container: '#inlineOffer-container',
    product: 'my-product-id',
  }),
]);

Configuration object

KeyRequiredDescription
apiKeyyesyour API key
apiURLnothe URL of the API to target
operatornoAn object containing the nameand logoUrl of the operator

Components

cartOffer

Component to use in the cart to display the currently selected offer or add one there.

Parameters object

KeyRequiredDescription
containeryesThe selector of the container of the component (for example an empty div)
productyesThe product ID

inlineOffer

Component to use in a product description page.

Parameters object

KeyRequiredDescription
containeryesThe selector of the container of the component (for example an empty div)
productyesThe product ID

modalOffer

A variation of the inline offer with a modal.

Parameters object

KeyRequiredDescription
productyesThe product ID
modalTypenoThe placement of the modal. Can be either left, right. center. Defaults to center
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.3-0

3 years ago

0.0.11

3 years ago

0.0.12

3 years ago

0.0.13

3 years ago

0.0.14

3 years ago

0.0.2

3 years ago

0.0.15

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.7

3 years ago

0.0.1-5

3 years ago

0.0.1-4

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