variable bindCloud

Codec for <BindCloud>.

Examples

Read a <BindCloud> element

import { assertEquals } from "@std/assert";
import { parse } from "@std/xml";
import { bindCloud } from "@hertzg/reolink-api/protocol/params";

const root = parse(
  '<BindCloud version="1.1"><authToken>token-xyz789</authToken></BindCloud>',
).root;

assertEquals(bindCloud.decode(root), { authToken: "token-xyz789" });

Type

XmlParam<"BindCloud", BindCloud>

Usage

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