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

Function builder

src/commands/devices/preferences.ts:20–28  ·  view source on GitHub ↗
(yargs: Argv)

Source from the content-addressed store, hash-verified

18const describe = 'get the current preferences of a device'
19
20const builder = (yargs: Argv): Argv<CommandArgs> =>
21 formatAndWriteItemBuilder(apiCommandBuilder(yargs))
22 .positional('id-or-index', { describe: 'the device id or number in list', type: 'string' })
23 .example([
24 ['$0 devices:preferences', 'prompt for a device and display preferences for the chosen device'],
25 ['$0 devices:preferences 2', 'display preferences for device listed second in output of devices command'],
26 ['$0 devices:preferences 92f9920a-7629-40e3-8fdc-14924413897f', 'display preferences for device by id'],
27 ])
28 .epilog(buildEpilog({ command }))
29
30export const buildTableOutput = (tableGenerator: TableGenerator, data: DevicePreferenceResponse): string => {
31 let output = ''

Callers

nothing calls this directly

Calls 2

apiCommandBuilderFunction · 0.85
buildEpilogFunction · 0.85

Tested by

no test coverage detected