JSPM

mi-service

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3
  • Score
    100M100P100Q16073F
  • License MIT

XiaoMi Cloud Service for mi.com This is a fork from https://github.com/Yonsm/MiService implemented in TypeScript.

Package Exports

  • mi-service
  • mi-service/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (mi-service) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

MiService

XiaoMi Cloud Service for mi.com This is a fork from https://github.com/Yonsm/MiService implemented in TypeScript.

Install

npm install mi-service

Usage

const {getService} = require("mi-service");
async function main() {
    const mina = await getService("mina");
    // 获取音响设备列表
    let list = await mina.device_list();
    console.log(list);
}
main().catch((e) => {
    console.error(e);
});