• @hertzg/routeros-api
  • protocol/command.ts

Functions

f
buildCommand(
command: string,
options?: { attributes?: Record<string, string | number | boolean>; queries?: Record<string, string | number | boolean>; }
): string[]

Builds a command sentence from structured data

f
commandToWords(cmd: Command): string[]

Builds a command sentence from a Command object

Type Aliases

T
Command = { command: string; attributes?: Record<string, string | number | boolean>; queries?: Record<string, string | number | boolean>; }

MikroTik API command structure

  • attributes: Record<string, string | number | boolean>

    Optional attributes (e.g., {".id": "ether1", "disabled": "yes"})

  • command: string

    The command path (e.g., "/interface/print", "/login")

  • queries: Record<string, string | number | boolean>

    Optional query parameters for filtering results

Usage

import * as mod from "protocol/command.ts";

Symbols

  • f
    createClient
  • T
    Client
  • T
    ClientOptions
  • T
    EncodedLength
  • T
    DecodedLength
view all 38 symbols

Document Navigation

  • Functions
    • buildCommand
    • commandToWords
  • Type Aliases
    • Command