ciscospark
The Cisco Webex JS SDK
Install
npm install --save ciscospark
Usage
To use the SDK, you will need Cisco Webex credentials. If you do not already have a Cisco Webex account, visit Cisco Webex for Developers to create your account and retrieve your access token.
See the detailed docs for more usage examples.
const ciscospark = ;const teams = ciscospark; // Create a room with the title "My First Room"// Add Alice and Bob to the room// Send a **Hi Everyone** message to the roomteamsrooms;
A note on browser usage
We do not provide a built version of the SDK that includes window.ciscospark
.
In-browser usage is almost the same as Node.js, but it handles the user authentication flow for you. See the browser guide for more information.
If you're already using a bundler (like Webpack) you can simply import/require the package and use the above snippet and assign the initialized team
variable to window.webex
.
For a quick example, we'll use Parcel to bundle the SDK for a website. For any more information and questions on how to use Parcel, please head to their website.
- Create
index.js
.
; // Initialize the SDK and make it available to the windowconst webex = windowwebex = ; // Create a room with the title "My First Room"webexrooms ; // Filter for "My First Room" from the last 10 roomswebexrooms ;
- Create
index.html
.
Webex SDK for Browsers
- Run
parcel index.html
in your terminal. - Go to http://localhost:1234 and open the developer console to see the output.
Still using ciscospark/env
?
API
Full API docs are published at the docs site.
Maintainers
This package is maintained by Cisco Webex for Developers.
Contribute
Pull requests welcome. Please see CONTRIBUTING.md for more details.
License
© 2016-2019 Cisco and/or its affiliates. All Rights Reserved.