0.0.10 • Published 7 years ago

@scrbbl/scribblelive-toolkit-commenting v0.0.10

Weekly downloads
2
License
ISC
Repository
-
Last release
7 years ago

ScribbleLive Toolkit Commenting Module

The ScribbleLive Toolkit Commenting Module allows you to post text and image comments on ScribbleLive streams.

Installing Node and NPM

Install Node and NPM from https://nodejs.org/en/download/

Setup

From the project directory run:

npm install

Then to setup the test project:

npm run build-test-project

Now you can open /test-project/dist/index.html in your browser and post some comments!

Using the Commenting module

To create an instance of the commenting module:

import Commenting from '@scrbbl/scribblelive-toolkit-commenting';

const commentingModule = new Commenting({ token: 'my-token' });

Post a text comment:

commentingModule.addTextComment({
  auth: 'my-auth',
  threadId: 123456,
  content: 'This is a comment!',
})

Post an image comment:

commentingModule.addImageComment({
  auth: 'my-auth',
  threadId: 123456,
  image: { }, // Image file
  caption: 'This is an image caption!',
})

Methods

Commenting constructor({ string token, string baseUrl (optional) })

The constructor takes an object containing the API key token and an optional base URL (the default is https://apigateway.scribblelive.com) and returns a new instance of Commenting (the commenting module).

Promise addTextComment({ string auth, string threadId, string content })

Adds a new text comment to the stream with the given threadId.

Promise addImageComment({ string auth string threadId, File image, string caption (optional) })

Adds a new image comment to the stream with the given threadId. The caption is optional.

0.0.10

7 years ago

0.0.9

8 years ago

0.0.8

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago