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

Function builder

src/commands/devices/presentation.ts:29–43  ·  view source on GitHub ↗
(yargs: Argv)

Source from the content-addressed store, hash-verified

27const describe = 'get a device presentation'
28
29const builder = (yargs: Argv): Argv<CommandArgs> =>
30 formatAndWriteItemBuilder(apiCommandBuilder(yargs))
31 .positional('id-or-index', { describe: 'device id or number from list', type: 'string' })
32 .example([
33 ['$0 devices:presentation', 'choose a device from a list and display its presentation'],
34 [
35 '$0 devices:presentation 3',
36 'display the presentation for the third device listed when running "smartthings devices"',
37 ],
38 [
39 '$0 devices:presentation a13a3fbb-2b97-4c73-978d-ae7c2fca3ea8',
40 'display the presentation for the specified device',
41 ],
42 ])
43 .epilog(buildEpilog({ command, apiDocs: ['getDevicePresentation'] }))
44
45
46const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => {

Callers

nothing calls this directly

Calls 2

apiCommandBuilderFunction · 0.85
buildEpilogFunction · 0.85

Tested by

no test coverage detected