Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-streamelements

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-streamelements

An unofficial wrapper for the StreamElements API.

  • 0.1.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

node-streamelements

An unofficial wrapper for the StreamElements API.

Official StreamElements API Documentation

Install

Install the node-streamelements package from the NPM repository, using --save to update your package.json:

npm install node-streamelements --save

API Reference

Some calls require few, specific options and are required method arguments. More complex calls, such as create or update operations require more detailed options. Reference the official documentation for type requirements and object structure.

Usage

Import the package, create a new instance using your Account ID and JWT Token (found in your account profile), and call methods which return promises.

const StreamElements = require('node-streamelements');

const myInstance = new StreamElements({
  token: 'YourJWTToken',
  accountId: 'YourAccountID'
});

// Get current song in queue.
myInstance
  .getCurrentSong()
  .then((response) => {
    console.log(`Current song is ${response.title}.`);
  })
  .catch((error) => {
    console.log(error);
  });

Using Unimplemented Endpoints

In the event the API sees a non-major version bump which introduces new functionality, you may call makeRequest() directly until a new node-streamelements package version is available.

Updating Third-party Channels

Even though your current instance may be tied to a specific channel, you may optionally override the channel being requested upon by passing its ID into methods. For example:

myInstance
  .getCurrentSong('CHANNELID')
  .then((response) => {
    console.log(`Current song is ${response.title}.`);
  })
  .catch((error) => {
    console.log(error);
  });

NOTE: In order for this to work, you must be given Manager permissions for the target channel.

Contributing

To contribute to the package, please follow the forking model:

  1. Fork the repository to your own account.
  2. Create a branch off master.
  3. Apply your changes and commit to your branch.
  4. Open a pull request against the central develop branch.

Your pull request will be reviewed by Maintainers, feedback will be provided if necessary, and then merged. Please, do not bump the package version in your pull request.

Disclaimer

This package was created to help reduce the amount of code manually written for each project wishing to work with the StreamElements API. In no way is this project officially endorsed, maintained, or approved by StreamElements.

Keywords

FAQs

Package last updated on 17 Apr 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc