Socket
Book a DemoInstallSign in
Socket

@getevy/js-sdk

Package Overview
Dependencies
Maintainers
4
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@getevy/js-sdk

The Javascript SDK to create and manage Evy components

latest
npmnpm
Version
0.0.32
Version published
Maintainers
4
Created
Source

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

Keywords

sdk

FAQs

Package last updated on 06 Dec 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts