@webex/internal-plugin-devices

Plugin for device management

Usage no npm install needed!

<script type="module">
  import webexInternalPluginDevices from 'https://cdn.skypack.dev/@webex/internal-plugin-devices';
</script>

README

@webex/internal-plugin-devices

standard-readme compliant

Plugin for device management

This is an internal Cisco Webex plugin. As such, it does not strictly adhere to semantic versioning. Use at your own risk. If you're not working on one of our first party clients, please look at our developer api and stick to our public plugins.

Install

npm install --save @webex/internal-plugin-devices

Usage

import '@webex/internal-plugin-devices';

import WebexCore from '@webex/webex-core';

const webex = new WebexCore();

// Namespace.
webex.internal.devices

// Register the device.
webex.internal.devices.register()
  .then(() => {}) // On successful registration.
  .catch(() => {}); // On failed registration.

// Refresh the device.
webex.internal.devices.refresh()
  .then(() => {}) // On successful refresh.
  .catch(() => {}); // On failed refresh.

// Unregister the device.
webex.internal.devices.unregister()
  .then(() => {}) // On successful unregistration.
  .catch(() => {}); // On failed unregistration.

// Get the current web socket url. Accepts a boolean to enable waiting for the
// url to populate.
webex.internal.devices.getWebSocketUrl(true)
  .then((url) => {}) // Resolves to the url when it is retrievable.
  .catch(() => {}) // Rejects when the url is not available.

// Commonly referenced properties.

// The device's url once registered.
webex.internal.devices.url;

// The registered device's user uuid.
webex.internal.devices.userId;

// Determines if the device is registered.
webex.internal.devices.registered;

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.