ciscospark
Advanced tools
Comparing version 1.49.3 to 1.49.5
@@ -43,6 +43,6 @@ 'use strict'; | ||
ciscospark: true, | ||
version: '1.49.3' | ||
version: '1.49.5' | ||
}); | ||
CiscoSpark.version = '1.49.3'; | ||
CiscoSpark.version = '1.49.5'; | ||
@@ -49,0 +49,0 @@ /** |
{ | ||
"name": "ciscospark", | ||
"version": "1.49.3", | ||
"version": "1.49.5", | ||
"description": "SDK for Cisco Webex", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -8,7 +8,11 @@ # ciscospark | ||
- [Install](#install) | ||
- [Usage](#usage) | ||
- [API](#api) | ||
- [Contribute](#contribute) | ||
- [License](#license) | ||
- [ciscospark](#ciscospark) | ||
- [Install](#install) | ||
- [Usage](#usage) | ||
- [_A note on browser usage_](#_a-note-on-browser-usage_) | ||
- [_Still using `ciscospark/env`?_](#_still-using-ciscosparkenv_) | ||
- [API](#api) | ||
- [Maintainers](#maintainers) | ||
- [Contribute](#contribute) | ||
- [License](#license) | ||
@@ -60,12 +64,6 @@ ## Install | ||
We do provide a built, minified version of the SDK that includes `window.ciscospark` which is hosted on our repo and can be used with [gitcdn.xyz](https://gitcdn.xyz/). | ||
```html | ||
<script src="https://gitcdn.xyz/repo/webex/spark-js-sdk/master/packages/node_modules/ciscospark/umd/ciscospark.min.js"></script> | ||
``` | ||
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](https://webex.github.io/spark-js-sdk/guides/browsers/) for more information. | ||
If you're already using a bundler (like [Webpack](https://webpack.js.org/) or [Rollup](https://rollupjs.org/)) you can simply import/require the package and use the above snippet and assign the initialized `team` variable to `window.webexteams`. | ||
If you're already using a bundler (like [Webpack](https://webpack.js.org/)) 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](https://parceljs.org/) to bundle the SDK for a website. For any more information and questions on how to use Parcel, please head to their [website](https://parceljs.org/). | ||
@@ -76,6 +74,6 @@ | ||
```javascript | ||
import { init as initTeams } from 'ciscospark'; | ||
import { init as initWebex } from 'ciscospark'; | ||
// Initialize the SDK and make it available to the window | ||
const teams = (window.webexteams = initTeams({ | ||
const webex = (window.webex = initWebex({ | ||
credentials: { | ||
@@ -87,3 +85,3 @@ access_token: <your webex teams access token> | ||
// Create a room with the title "My First Room" | ||
teams.rooms | ||
webex.rooms | ||
.create({ | ||
@@ -97,3 +95,3 @@ title: 'My First Room!' | ||
// Filter for "My First Room" from the last 10 rooms | ||
teams.rooms | ||
webex.rooms | ||
.list({ | ||
@@ -109,3 +107,3 @@ max: 10 | ||
// Post message "Hello World!" to "My First Room!" | ||
teams.messages.create({ | ||
webex.messages.create({ | ||
roomId, | ||
@@ -116,3 +114,3 @@ text: 'Hello World!' | ||
// Log the the room name and the message we created | ||
return teams.messages | ||
return webex.messages | ||
.list({ roomId, max: 1 }) | ||
@@ -119,0 +117,0 @@ // Destructure promised value to get the text property from the first item in items array |
Sorry, the diff of this file is too big to display
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
704354
153