variable userList

Codec for <UserList>.

Examples

Build a <UserList> for cmd 59 that adds an account

import { assertStringIncludes } from "@std/assert";
import { userList } from "@hertzg/reolink-api/protocol/params";

const xml = userList.encode({
  User: [{ userName: "viewer", userSetState: "add", password: "s3cret" }],
});

assertStringIncludes(xml, "<userSetState>add</userSetState>");

Type

XmlParam<"UserList", UserList>

Usage

import { userList } from "protocol/params/mod.ts";