Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cisco-ce/jsxapi
JavaScript bindings for Cisco Collaboration Endpoint XAPI
https://github.com/cisco-ce/jsxapi
Last synced: about 1 month ago
JSON representation
JavaScript bindings for Cisco Collaboration Endpoint XAPI
- Host: GitHub
- URL: https://github.com/cisco-ce/jsxapi
- Owner: cisco-ce
- License: mit
- Created: 2018-01-25T14:20:57.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-07-31T10:12:37.000Z (over 1 year ago)
- Last Synced: 2024-10-29T03:38:55.552Z (about 2 months ago)
- Language: TypeScript
- Homepage: https://cisco-ce.github.io/jsxapi/
- Size: 3.09 MB
- Stars: 43
- Watchers: 8
- Forks: 20
- Open Issues: 19
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-xapi - jsxapi - JavaScript bindings for Cisco Collaboration Endpoint XAPI (by Cisco CE). (Building Blocks)
README
# JSXAPI
[![Build Status](https://travis-ci.com/cisco-ce/jsxapi.svg?branch=master)](https://app.travis-ci.com/github/cisco-ce/jsxapi)
[API Documentation](https://cisco-ce.github.io/jsxapi/)
A set of tools to integrate with the Cisco Telepresence Endpoint APIs in
JavaScript.## Quick start examples
### Connecting using WebSockets
``` javascript
const jsxapi = require('jsxapi');jsxapi
.connect('wss://host.example.com', {
username: 'admin',
password: 'password',
})
.on('error', console.error)
.on('ready', async (xapi) => {
const volume = await xapi.status.get('Audio Volume');
console.log(`volume is: ${volume}`);
xapi.close();
});
```### Connecting using SSH
``` javascript
const jsxapi = require('jsxapi');jsxapi
.connect('ssh://host.example.com', {
username: 'admin',
password: 'password',
})
.on('error', console.error)
.on('ready', async (xapi) => {
const volume = await xapi.status.get('Audio Volume');
console.log(`volume is: ${volume}`);
xapi.close();
});
```### New style API
The aim of the new style API is to improve readability, while also being more
suited towards automatic type generation and auto-completion.```javascript
// Set up a call
xapi.Command.Dial({ Number: '[email protected]' });// Fetch volume and print it
xapi.Status.Audio.Volume
.get()
.then((volume) => { console.log(volume); });// Set a configuration
xapi.Config.SystemUnit.Name.set('My System');// Listen to feedback
const off = xapi.Event.Standby.on((event) => {
// ...
});// De-register feedback
off();
```### Old style API
```javascript
// Set up a call
xapi.command('Dial', { Number: '[email protected]' });// Fetch volume and print it
xapi.status
.get('Audio Volume')
.then((volume) => { console.log(volume); });// Set a configuration
xapi.config.set('SystemUnit Name', 'My System');// Listen to feedback
const off = xapi.event.on('Standby', (event) => {
// ...
});// De-register feedback
off();
```## Documentation
The full API documentation can be built by running `npm install` in a `jsxapi`
module directory. Documentation will be located under `docs/` can then be opened
in a browser.More specifically:
```
mkdir tmp
cd tmp
npm install jsxapi
cd node_modules/jsxapi
npm install
```Then open `./docs/index.html`.
## Questions and support?
Find more information regarding Cisco's Room Devices over at
[developer.cisco.com](https://developer.cisco.com/site/roomdevices/) or the
[TelePresence and Video](https://supportforums.cisco.com/t5/telepresence/bd-p/5886-discussions-telepresence)
support forums.Questions about the xAPI, integrations and customizations? Using
[Webex Teams](https://www.webex.com/team-collaboration.html) join the xAPI Devs
space community for realtime support by [clicking this link](https://eurl.io/#rkp76XDrG)
and entering your Webex Teams-registered e-mail address at the prompt.## Development & Contribution
### Release procedure
Making a release is quite simple:
* Perform all changes/commits.
* Determine the version change (`npm help semver`).
* Update "CHANGELOG.md" with version number, date and change summary.
* Run `npm version` with the appropriate version bump.
* Run `npm publish` to push the package version to the registry.