/nodecg-tiltify

NodeCG Tiltify Replicant for other bundles to access

Primary LanguageJavaScriptOtherNOASSERTION

nodecg-tiltify is a NodeCG bundle. It works with NodeCG versions which satisfy this semver range: ^1.1.1

You will need to have an appropriate version of NodeCG installed to use it.

Setup

  1. Add nodecg-tiltify to your nodecg.dependencies in your bundle's package.json
  2. Create an application for your Tiltify account
  3. Take the Access Token from your application and add the following to nodecg/cfg/nodecg-tiltify.json:
{
	"tiltify_api_key": "KEY_HERE",
	"tiltify_campaign_id": "CAMPAIGN_HERE"
}

Details

This bundle sets up NodeCG.Replicant objects in the nodecg-tiltify namespace.

Available Replicants from the Tiltify API:

  • donations*
  • alldonations**
  • total
  • donationpolls
  • schedule
  • donations
  • challenges
  • rewards
  • campaign: (Coming soon)

The replicants convert results from the Tiltify API into objects, and more information on the exact format of the data from these replicants can be found in the Tiltify API docs.

*donations objects contain the additional properties read and shown which can be used to indicate if something was read in the dashboard or shown in a graphic. donations also only collects donations from the most recent 'page' of the Tiltify API.

**alldonations contains all donations that have been made.

This bundle also has 3 messages that it listens for that can be sent using nodecg.sendMessageToBundle

  • clear-donations - Marks all donations as read
  • mark-donation-as-read - marks a specific donation as read
  • mark-donation-as-shown - marks a specific donation as shown

Note: this should be done in the form of nodecg.sendMessageToBundle('clear-donation', 'nodecg-tiltify') or nodecg.sendMessageToBundle('mark-donation-as-read', 'nodecg-tiltify', donationObject. The donation object sent to shown or read needs to at least have the donation ID so that the back end can find and mark.