Socket
Socket
Sign inDemoInstall

aitum.js

Package Overview
Dependencies
9
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    aitum.js

API Documentation


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Install size
2.35 MB
Created
Weekly downloads
 

Readme

Source

aitum.js

API Documentation
npm

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
npm i -s aitum.js

# yarn
yarn add aitum.js

Getting Started

To get started, import and instantiate the library.


import { AitumAPIClient } from 'aitum.js';

// Instantiate the library
// You can optionally provide an IP address to the machine running Aitum. It will default to 127.0.0.1
const client = new AitumAPIClient(); 

// Example: Trigger an Aitum rule using its ID
client.aitum.triggerRule('R07MKX77BAxGkcuL');

Methods

The methods in this library correspond to the methods listed in the Public API documentation.

  • getRules() - Get all Aitum rules
  • triggerRule(rule: IRule | string) - Trigger an Aitum rule
  • getGlobalVariables() - Get all global variables
  • getHypeTrain() - Get the current Hype Train
  • getPoll() - 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/.

Keywords

FAQs

Last updated on 22 Nov 2022

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc