snapshotXml(request: SnapshotRequest): string
Builds the body of a snapshot request.
Snapshot the sub stream of channel 0
Snapshot the sub stream of channel 0
import { assertStringIncludes } from "@std/assert"; import { snapshotXml } from "@hertzg/reolink-api/protocol/snapshot"; const xml = snapshotXml({ channel: 0, stream: "sub" }); assertStringIncludes(xml, "<channelId>0</channelId>"); assertStringIncludes(xml, "<streamType>sub</streamType>");
request: SnapshotRequest
The channel and stream to snapshot.