1.0.6 • Published 2 years ago

mildom-api v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

mildom-api

npm version workflow Coverage:lines Coverage:functions Coverage:branches Coverage:statements Licence

Simple Wrapper Module for making API calls to mildom.

You can also read the module docs for a list of supported calls.

Install the Module

npm install mildom-api

Example API Calls

Get user profile by user id.

import { Mildom } from "mildom-api";

const mildom = new Mildom();

const profile = mildom.getUserProfile(100000);
console.log(progile);

Get Live Streaming Chat.

import { ChatListener } from "mildom-api";

const onChat = async (chat) => {
  console.log(chat.userName);
  console.log(chat.msg);
};

const listener = new ChatListener(13650940);
listener.on("onChat", onChat);
await listener.startListener();

License

MIT