Skip to content

axsemantics/quidditch-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

8cf0d92 · Nov 2, 2023
Nov 2, 2023
Nov 2, 2023
Oct 18, 2018
Dec 20, 2021
Aug 18, 2017
Sep 22, 2017
Feb 7, 2019
Jan 15, 2018
Nov 2, 2023
Nov 2, 2023
Dec 20, 2021
Dec 20, 2021
Dec 20, 2021
Dec 20, 2021

Repository files navigation

quidditch-js Build Status Coverage Status npm

A javascript-client for the quidditch collaboration framework.

Develop / Run tests

npm test

Build / Deploy

npm run build
npm publish

API

Getting Started

import { Delta, QuidditchClient } from 'quidditch'

const client = new QuidditchClient('wss://quidditch-server.com/ws', {
  token: 'JWT TOKEN'
})

client.on('open', () => {
  client.join(531)
  client.call('a-simple-call', {payload: 3})
  client.sendDelta('colab-channel-1', new Delta({insert: 'abc'}))
})

client.on('ot:delta', (channel, delta) => {
    // delta.apply to your local text
})