aitum.js
API Documentation
JS/TS library for Aitum's Public API. This library requires Aitum to be installed and running. You can read the API documentation here.
The main goal of this library is to provide an easy-to-use wrapper for using Aitum's public API, instead of having to spend the time implementing your own logic to make requests.
Installation
To install this module, please follow the steps below for your package manager of choice:
npm i -s aitum.js
yarn add aitum.js
Getting Started
To get started, import and instantiate the library.
import { AitumAPIClient } from 'aitum.js';
const client = new AitumAPIClient();
client.aitum.triggerRule('R07MKX77BAxGkcuL');
Methods
The methods in this library correspond to the methods listed in the Public API documentation.
AitumAPIClient.aitum
- Aitum-related methods
getRules()
- Get all Aitum rulestriggerRule(rule: IRule | string)
- Trigger an Aitum rulegetGlobalVariables()
- Get all global variables
AitumAPIClient.twitch
- Twitch-related methods
getHypeTrain()
- Get the current Hype TraingetPoll()
- Get the current poll
TypeScript support
This library is designed with TypeScript in mind, so provides various TypeScript interface definitions for objects returned by methods in this library. You can import them from ./interfaces/
.