GithubHelp home page GithubHelp logo

ringcentral-wsg-ts's Introduction

Deprecated

Users should use @rc-ex/ws instead.

RingCentral WSG SDK

Code Style: Google

How does it work?

This SDK is powered by RingCentral Extensible SDK. RingCentral Extensible SDK has lots of extensions which could be combined to do various things. The following two extensions are used:

Instead of using this SDK, it is recommended to use RingCentral Extensible SDK directly.

Installation

yarn add ringcentral-wsg

Then you should be able to import the SDK like this:

import WSG from 'ringcentral-wsg';

Usage

Install RingCentral SDK v4

yarn add @ringcentral/sdk

Initialization

import {SDK} from '@ringcentral/sdk';
import WSG from 'ringcentral-wsg';

const sdk = new SDK({server, clientId, clientSecret});
await sdk.platform().login({username, extension, password});
const wsg = new WSG(sdk, {
  restOverWebSocket: true, // optional, default value: false
  debugMode: false; // optional, default value: false
  autoRecover: true; // optional, default value: true
});
await wsg.init(); // don't forget this!

Subscription

await wsg.subscribe(
  ['/restapi/v1.0/account/~/extension/~/message-store'],
  event => { console.log(event); }
);

For more detail, please check this test case.

Rest API

This WSG SDK is powered by RingCentral Extensible SDK.

You can access the extensible sdk by wsg.rc:

const extInfo = await wsg.rc.restapi().account().extension().get();

For more detail, please check this test case.

ringcentral-wsg-ts's People

Contributors

tylerlong avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.