elierotenberg / mindlogger-node

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MindLogger Node Client

Installation

npm i mindlogger-node

Local development

  • Fork / clone
  • Run npm install
  • Create config.test.json similar to config.test.sample.json:
{
  "username": "____________",
  "password": "____________",
  "applets": [
    {
      "appletId": "____________",
      "appletPassword": "____________"
    }
  ]
}
  • Run npm test

Usage

CLI

Commands:
  cli.js authentication  Get authentication results
  cli.js applet-info     Get applet info
  cli.js applet-data     Get applet data

Options:
      --version   Show version number                                  [boolean]
  -u, --username  User name                                  [string] [required]
  -p, --password  Password                                   [string] [required]
  -o, --outFile   Optional output file                                  [string]
      --help      Show help                                            [boolean]

Library

Client

import { Client } from "mindlgoger-node";

const client = await Client.createClient("<username>", "<password>");

const appletInfo = await client.getAppletInfo("<appletId>");
const appletData = await client.getAppletData("<appletId>");
const responses = decryptAppletResponses(
  appletInfo,
  appletData,
  "<appletPassword>"
);

See the generated docs.

Data flow

Applet creation

Applet creation

Applet response

Applet creation

About


Languages

Language:TypeScript 78.0%Language:JavaScript 21.5%Language:Shell 0.5%