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

Function builder

src/commands/deviceprofiles/presentation.ts:30–59  ·  view source on GitHub ↗
(yargs: Argv)

Source from the content-addressed store, hash-verified

28const describe = 'get the presentation associated with a device profile'
29
30export const builder = (yargs: Argv): Argv<CommandArgs> =>
31 formatAndWriteItemBuilder(apiOrganizationCommandBuilder(yargs))
32 .positional('id-or-index', { describe: 'device profile id or number from list', type: 'string' })
33 .example([
34 [
35 '$0 deviceprofiles:presentation',
36 'prompt for a device profile and display its presentation information',
37 ],
38 [
39 '$0 deviceprofiles:presentation 2',
40 'display presentation information for the second device profile listed when running' +
41 ' "smartthings deviceprofiles"',
42 ],
43 [
44 '$0 deviceprofiles:presentation fd4adb7f-4a23-4134-9b39-05ed889a03cf',
45 'display presentation information for the specified device profile',
46 ],
47 [
48 '$0 deviceprofiles:presentation fd4adb7f-4a23-4134-9b39-05ed889a03cf --language ko',
49 'display presentation information for the specified device profile and language',
50 ],
51 ])
52 .epilog(buildEpilog({
53 command,
54 apiDocs: ['getDeviceProfile', 'getDevicePresentation'],
55 notes: 'Specifying only the presentationId defaults to the language set for the' +
56 ' computer\'s operating system. The language can be overridden by specifying an ISO' +
57 ' language code. If "NONE" is specified for the language' +
58 ' flag then no language header is specified in the API request.',
59 }))
60
61const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => {
62 const command = await apiOrganizationCommand(argv)

Callers

nothing calls this directly

Calls 2

buildEpilogFunction · 0.85

Tested by

no test coverage detected