# mix-it-up-api

> Package to call the devAPI of Mix It Up Chatbot

Latest version **1.0.1** (published 2020-04-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install mix-it-up-api
pnpm add mix-it-up-api
yarn add mix-it-up-api
bun add mix-it-up-api
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2020-04-01 |
| First published | 2020-04-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 33.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | D4ddy-LiLd4rk |
| Maintainers | d4ddy-lild4rk |
| Keywords | mix it up |

## Links

- npm: https://www.npmjs.com/package/mix-it-up-api
- Repository: https://github.com/D4ddy-LiLd4rk/mix-it-up-api
- Homepage: https://github.com/D4ddy-LiLd4rk/mix-it-up-api#readme
- Issues: https://github.com/D4ddy-LiLd4rk/mix-it-up-api/issues
- npm.io page: https://npm.io/package/mix-it-up-api

## Dependencies (2)

- [@types/node](https://npm.io/package/@types/node.md) ^13.7.2
- [web-request](https://npm.io/package/web-request.md) ^1.0.7

## Recent versions

- 1.0.1 (latest) — 2020-04-01
- 1.0.0 — 2020-04-01

## README

# mix-it-up-api

![npm](https://img.shields.io/npm/v/mix-it-up-api)
![npm bundle size](https://img.shields.io/bundlephobia/min/mix-it-up-api)
![npm](https://img.shields.io/npm/dt/mix-it-up-api)
![NPM](https://img.shields.io/npm/l/mix-it-up-api)

> Simplifies calling the devAPI of Mix It Up with TypeScript

This package makes it easier to call the devAPI of Mix It Up such as running a command using [TypeScript](http://www.typescriptlang.org/). It wraps the popular [web-request](https://www.npmjs.com/package/web-request) package, extending it with an interface for [Mix It Up](https://mixitupapp.com/).

## Examples

Get user data by username...
```js
const client = new MixItUpClient();

client.users.getUserByName("D4ddy-LiLd4rk")
  .then(user => {
    console.log(user);
  })
  .catch(err => {
    console.log(err);
  });
```

Send a message to the chat...
```js
const client = new MixItUpClient();

client.chat.sendChatMessage("Greetings to the chat!", false)
  .catch(err => {
    console.log(err);
  });
```

Run the requested command...
```js
const client = new MixItUpClient();

client.commands.runCommandByID("YOUR-COMMAND-ID")
  .catch(err => {
    console.log(err);
  });
```

## Getting Started

Make sure you're running Node v13 and TypeScript 3.7 or higher...
```
$ node -v
v13.11.0
$ npm install -g typescript tsd
$ tsc -v
Version 3.7.5
```

Install the *mix-it-up-api* package and the typings definitions for Node.js...
```
$ npm install mix-it-up-api
$ tsd install node
```

Write some code...
```js
import * as MixItUpClient from "mix-it-up-api";

const client = new MixItUpClient();

client.users.getUserByName("D4ddy-LiLd4rk")
  .then(user => {
    console.log(user);
  })
  .catch(err => {
    console.log(err);
  });
```

Save the above to a file (index.ts), build and run it!
```
$ tsc index.ts typings/node/node.d.ts --target es6 --module commonjs
$ node index.js
<!doctype html><html ...
```

To use the sample with your own account, do the following steps:

* Head over to Streamloots: https://mixitupapp.com/#download

* Install Mix it Up

* Log in with your Mixer Account

* Go to Services

  ![Services](https://i.imgur.com/Xza5kPr.png)

* Open the Developer API Panel and hit that "Enable" Button.

  ![Enable devAPI](https://i.imgur.com/6Bx4XH0.png)

* Call the devAPI from your code!

Special Thanks to [SaviorXTanren](https://saviorxtanren.github.io/mixer-mixitup/#section/Introduction) for his work on the Chatbot and his Documentation of this devAPI over on GitHub.

---
_Source: https://npm.io/package/mix-it-up-api · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
