MCPcopy Index your code
hub / github.com/SmartThingsCommunity/smartthings-cli / builder

Function builder

src/commands/installedapps.ts:34–65  ·  view source on GitHub ↗
(yargs: Argv)

Source from the content-addressed store, hash-verified

32const describe = 'get a specific installed app or a list of installed apps'
33
34const builder = (yargs: Argv): Argv<CommandArgs> =>
35 outputItemOrListBuilder(apiCommandBuilder(yargs))
36 .positional(
37 'id-or-index',
38 { describe: 'the installed app name or number from list', type: 'string' },
39 )
40 .option(
41 'location',
42 { alias: 'l', describe: 'filter results by location', type: 'string', array: true },
43 )
44 .option(
45 'verbose',
46 {
47 alias: 'v',
48 describe: 'include location name in output',
49 type: 'boolean',
50 default: false,
51 },
52 )
53 .example([
54 ['$0 installedapps', 'list all installed apps'],
55 [
56 '$0 installedapps 1',
57 'display details for the first installed app in the list retrieved by running' +
58 ' "smartthings installedapps"',
59 ],
60 [
61 '$0 installedapps f45c2df1-9dce-4e63-85ba-c7f7fdfe9677',
62 'display details for an installed app by id',
63 ],
64 ])
65 .epilog(buildEpilog({ command, apiDocs: ['listInstallations', 'getInstallation'] }))
66
67const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => {
68 const command = await apiCommand(argv)

Callers

nothing calls this directly

Calls 2

apiCommandBuilderFunction · 0.85
buildEpilogFunction · 0.85

Tested by

no test coverage detected