@envoy-test/node-sdk
v1.0.1
Published
## Description
Downloads
3
Keywords
Readme
envoy-partner-node-sdk
Description
Node JS SDK available for accessing the partner APIs provided by Envoy.
Requirements
- Node.js 18 or higher
Installation
Use your preferred package manager of choice to add this package to your project:
npm install @envoy/node-sdk
yarn add @envoy/node-sdk
Getting Started
Initialization
You can access your secret access key through the Envoy dashboard, under the security settings section.
//ES5
const envoy = require('@envoy/node-sdk');
const envoyClient = new envoy.EnvoyClientApi('SECRET_ACCESS_KEY');
//ES6+
import { EnvoyClientApi } from '@envoy/node-sdk';
const envoyClient = new EnvoyClientApi('SECRET_ACCESS_KEY');
Usage
After initializing the client instance you can then call the methods available in the SDK, provided inside their containing classes to access the Envoy API:
| API | SDK accessor | Available methods |
|-----|----------------|-------------------|
| Gift Links | giftLinks
| createGiftLink(giftLinkParams)
|
| User Quota | userQuota
| getUserQuota(userId)
|
| Tracking | tracking
| createPixelEvent(pixelEvent)
|
| Rewards | rewards
| getUserRewards(userId)
getCurrentUserRewards(userId)
claimUserReward(userParams)
|
API-specific documentations
Gift Links Api User Quota Api Tracking Api Rewards Api
License
This SDK is distributed under the Apache License, Version 2.0, see LICENSE.txt for more information.