MCPcopy Create free account
hub / github.com/SmartThingsCommunity/smartthings-cli / builder

Function builder

src/commands/devices/history.ts:36–44  ·  view source on GitHub ↗
(yargs: Argv)

Source from the content-addressed store, hash-verified

34const describe = 'get device history by device'
35
36const builder = (yargs: Argv): Argv<CommandArgs> =>
37 historyBuilder(buildOutputFormatterBuilder(apiCommandBuilder(yargs)))
38 .positional('id-or-index', { describe: 'the device id or number in list', type: 'string' })
39 .example([
40 ['$0 devices:history', 'prompt for a device and display history for the chosen device'],
41 ['$0 devices:history 2', 'display history for device listed second in output of devices command'],
42 ['$0 devices:history 92f9920a-7629-40e3-8fdc-14924413897f', 'display history for device by id'],
43 ])
44 .epilog(buildEpilog({ command }))
45
46const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => {
47 const command = await apiCommand(argv)

Callers

nothing calls this directly

Calls 4

historyBuilderFunction · 0.85
apiCommandBuilderFunction · 0.85
buildEpilogFunction · 0.85

Tested by

no test coverage detected