0.0.14 • Published 7 years ago

xperience v0.0.14

Weekly downloads
1
License
ISC
Repository
-
Last release
7 years ago

npm.io

This is the Node.js API for Altitude Xperience: Outstanding contact center functionality on the cloud at the level of the best on-premise solutions.

##Installation

> npm install --save xperience

##Usage

var xperience = require('xperience')
//create instance
var instance = new xperience.instance()

//connect
instance.connect()
//login
.then(() => instance.login({user:'admin_username',pass:'password',domain:'domain_name'}))
//get campaigns
.then(() => instance.getCampaigns())
.then(cps => console.log(cps))
//fetch a specific recording from a specific service
.then(() => {
	var serviceId = 1
	var recordingId = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
	return instance.fetchRecordingByService(serviceId,recordingId)
})
//write recording to file
.then(data => new Promise(resolve => data.body
    .pipe(require('fs').createWriteStream('./my_recording.mp3'))
    .on('close', () => { 
    	console.log('recording saved to file!'); 
    	resolve(); 
})))
//logout
.then(() => instance.logout())
.catch(err => {
    console.log('Something went wrong!', err)
})
0.0.14

7 years ago

0.0.13

7 years ago

0.0.12

7 years ago

0.0.11

7 years ago

0.0.10

7 years ago

0.0.9

7 years ago