@engage_so/core
Advanced tools
Comparing version 1.2.0 to 1.3.0
17
index.js
@@ -15,3 +15,3 @@ const fetch = require('cross-fetch') | ||
async function request (url, params, method) { | ||
async function _request (url, params, method) { | ||
try { | ||
@@ -41,2 +41,8 @@ const response = await fetch(url, { | ||
// Alias of _request method | ||
// Same with _request for now but can later have modifications | ||
const request = (url, params, method) => { | ||
return _request(`${root}${url}`, params, method) | ||
} | ||
const init = (o) => { | ||
@@ -84,3 +90,3 @@ if (!o) { | ||
return request(`${root}/users/${o.id}`, params, 'PUT') | ||
return _request(`${root}/users/${o.id}`, params, 'PUT') | ||
} | ||
@@ -108,3 +114,3 @@ | ||
return request(`${root}/users/${uid}`, params, 'PUT') | ||
return _request(`${root}/users/${uid}`, params, 'PUT') | ||
} | ||
@@ -130,3 +136,3 @@ | ||
return request(`${root}/users/${uid}/events`, data, 'POST') | ||
return _request(`${root}/users/${uid}/events`, data, 'POST') | ||
} | ||
@@ -138,3 +144,4 @@ | ||
addAttribute, | ||
track | ||
track, | ||
request | ||
} |
{ | ||
"name": "@engage_so/core", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"description": "Event driven customer segmentation and targeted engagement.", | ||
@@ -20,3 +20,3 @@ "main": "index.js", | ||
}, | ||
"gitHead": "6f62eb5e286f70648309fc5f157edf17ef32fc36" | ||
"gitHead": "c6bcac60200eaf8bbe1da30f9888cf5e755724f4" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7389
253