tnovas / streamlabs

This module is a implementation of Streamlabs API https://dev.streamlabs.com/

Home Page:https://www.npmjs.com/package/streamlabs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

StreamLabs

Build Status Coverage Status

This module is a implementation of Streamlabs API https://dev.streamlabs.com/

You need nodejs version > 8x because this module was made with ES6.

node --version

Installation:

Add the latest version of streamlabs to your package.json:

npm install streamlabs --save

Usage:

const StreamlabsApi = require('streamlabs');

Give the credentials of the StreamLabs to the constructor

Params Description Optional Type
clientId The Client Id false string
clientSecret The Client Secret false string
redirectUrl The RedirectUrl with format 'http://yourdomain/callback' false string
scopes They are 4 scopes: donations.read donations.create alerts.create socket.token false string
socketToken The socket token true string
accessToken The access token if you have one true string
const streamlabs = new StreamlabsApi({
  clientId: 'clientId',
  clientSecret: 'clientSecret',
  redirectUrl: 'http://yourdomain/yourrequest',
  scopes: 'donations.read donations.create alerts.create socket.token alerts.write points.write points.read credits.write jar.write wheel.write',
});




Test Integration:

You can test the module with your productive credentials. First change the clientId and clientSecret in tests/integration/streamlabs.js with yours credentials, open a console and run npm start, open browser and type http://localhost:8080/

WARNING Always when you run npm start, the first link you click should be Authorization

About

This module is a implementation of Streamlabs API https://dev.streamlabs.com/

https://www.npmjs.com/package/streamlabs

License:MIT License


Languages

Language:JavaScript 100.0%