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

twitchbots-base

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

twitchbots-base

Generic API consumer for https://twitchbots.info. Independent of request method.

  • 1.0.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

twitchbots-base

Build Status codecov Dependency Status

This is a base-module for using the twitchbots.info API with JS. It requires a request function to be passed in. For modules with a request method built in, see jetpack-twitchbots and twitchbots-node.

Usage

To instantiate, construct the global export of the module, with one argument, an object of the following form:

{
    request: function(url) {
        return new Promise(function(resolve, reject) {
            //TODO make request. Resolve with parsed JSON on 200 status code,
            // else reject with an error that has a "code" attribute with the
            // error code.
        });
    }
}

Methods

All methods resolve to promises. The return values are explained later on.

  • getBot(username): Bot
  • getBots(usernames): array
  • getAllBots(): array
  • getAllBotsByType(typeId): array
  • getType(typeId): Type

Return Values

Bot

An object with the following properties:

  • isBot: boolean
  • username: string
  • type: typeId (number)

Type

An object with the following properties:

  • id: typeId (number)
  • name: string
  • multiChannel: boolean
  • url: string

License

This project is licensed under the MIT License.

Keywords

FAQs

Package last updated on 24 Jul 2016

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