cce-unified-config
Advanced tools
Comparing version 0.7.2 to 0.8.0
12
index.js
@@ -76,2 +76,13 @@ const axios = require('axios') | ||
async modify(type, body, q) { | ||
// pass params from input | ||
const params = {q} | ||
try { | ||
const response = await axios.put(this.url + type.toLowerCase() + body.refURL, body, {auth: this.auth, params}) | ||
return response | ||
} catch (e) { | ||
throw e | ||
} | ||
} | ||
async create(type, body, q) { | ||
@@ -105,2 +116,3 @@ // pass params from input | ||
} else { | ||
// console.log('response.data', response.data) | ||
// 1 or more results | ||
@@ -107,0 +119,0 @@ let data = response.data[`${type}s`][0][`${type}`] |
{ | ||
"name": "cce-unified-config", | ||
"version": "0.7.2", | ||
"version": "0.8.0", | ||
"description": "JavaScript library for Cisco Contact Center Enterprise APIs", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
32
test.js
const client = require('./index.js') | ||
const util = require('util') | ||
@@ -30,13 +31,4 @@ let cce = new client({ | ||
let q = 'ccondry' | ||
cce.list('agentTeam', q) | ||
.then(results => { | ||
console.log(results) | ||
}) | ||
.catch(error => { | ||
console.error(error) | ||
}) | ||
// let q = '41377' | ||
// cce.list('agent', q) | ||
// let q = 'ccondry' | ||
// cce.list('agentTeam', q) | ||
// .then(results => { | ||
@@ -49,2 +41,11 @@ // console.log(results) | ||
let q = '41377' | ||
cce.list('agent', q) | ||
.then(results => { | ||
console.log(util.inspect(results, false, null)) | ||
}) | ||
.catch(error => { | ||
console.error(error) | ||
}) | ||
// let body = { | ||
@@ -61,1 +62,10 @@ // name: 'bogus', | ||
// }) | ||
// let q = 'Cumulus_Chat_ECE' | ||
// cce.list('skillGroup', q) | ||
// .then(results => { | ||
// console.log(results) | ||
// }) | ||
// .catch(error => { | ||
// console.error(error) | ||
// }) |
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
9216
7
282