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

Function builder

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

Source from the content-addressed store, hash-verified

34const describe = 'get history by location'
35
36const builder = (yargs: Argv): Argv<CommandArgs> =>
37 historyBuilder(buildOutputFormatterBuilder(apiCommandBuilder(yargs)))
38 .positional('id-or-index', { describe: 'the location id or number in list', type: 'string' })
39 .example([
40 ['$0 locations:history', 'prompt for a location and display history for it'],
41 ['$0 locations:history 2', 'display history for location listed second in output of locations command'],
42 ['$0 locations:history 92f9920a-7629-40e3-8fdc-14924413897f', 'display history for location 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