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

Function builder

src/commands/capabilities/presentation.ts:34–61  ·  view source on GitHub ↗
(yargs: Argv)

Source from the content-addressed store, hash-verified

32const describe = 'get presentation information for a specific capability'
33
34export const builder = (yargs: Argv): Argv<CommandArgs> =>
35 formatAndWriteItemBuilder(capabilityIdOrIndexBuilder(apiOrganizationCommandBuilder(yargs)))
36 .option('namespace', {
37 alias: 'n',
38 description: 'a specific namespace to query; will use all by default',
39 type: 'string',
40 })
41 .example([
42 [
43 '$0 capabilities:presentation',
44 'prompt for a capability and display its presentation information',
45 ],
46 [
47 '$0 capabilities:presentation --namespace cathappy12345',
48 'prompt for a capability from the specified namespace and display its' +
49 ' presentation information',
50 ],
51 [
52 '$0 capabilities:presentation cathappy12345.myCapability',
53 'display details for a capability by id',
54 ],
55 [
56 '$0 capabilities:presentation 1',
57 'display presentation information for the first capability in the list retrieved' +
58 ' by running "smartthings capabilities"',
59 ],
60 ])
61 .epilog(buildEpilog({ command, apiDocs: 'getCapabilityPresentation' }))
62
63const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => {
64 const command = await apiOrganizationCommand(argv)

Callers

nothing calls this directly

Calls 3

buildEpilogFunction · 0.85

Tested by

no test coverage detected