Jema (Xema Js Agent Library)
Jema is an addon to the Xema Platform. The goal of this project is to speed up your CRM integration with Xema Platform.
Installing
Using jsDelivr CDN:
<script src="https://cdn.jsdelivr.net/npm/jema/dist/jema.min.js"></script>
Using npm:
$ npm install jema
Note
On most API calls, the library returns an Observable. This allows the client to receive continous messages from the Xema Platform about Incoming Calls, Messages etc.
Usage
HTML / Javascript
<script>
var url = 'http://192.168.29.60';
const tester = new Jema.NetworkTester();
tester.ping(url).subscribe(
(resp) => {
console.log(resp.response); // Pong
},
(err) => {
console.log(err);
}
);
</script>
Typescript
import { NetworkTester } from 'jema';
const url = 'http://192.168.29.60';
const tester = new NetworkTester();
tester.ping(url).subscribe(
(resp) => {
console.log(resp.response); // Pong
},
(err) => {
console.log(err);
}
);