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

Function builder

src/commands/locations/rooms/create.ts:28–45  ·  view source on GitHub ↗
(yargs: Argv)

Source from the content-addressed store, hash-verified

26const describe = 'create a room'
27
28const builder = (yargs: Argv): Argv<CommandArgs> =>
29 inputAndOutputItemBuilder(apiCommandBuilder(yargs))
30 .option('location', {
31 alias: 'l',
32 describe: 'the location for the new room',
33 type: 'string',
34 })
35 .example([
36 [
37 '$0 locations:rooms:create -i room-info.json',
38 'create a room with the data in "room-info.json", prompting for a location',
39 ],
40 [
41 '$0 locations:rooms:create -i room-info.json --location 1e10b966-1d38-4996-bdcd-3ebd1d9dadcd',
42 'create a room in the specified location with the data in "room-info.json"',
43 ],
44 ])
45 .epilog(buildEpilog({ command, apiDocs: 'createRoom' }))
46
47const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => {
48 const command = await apiCommand(argv)

Callers

nothing calls this directly

Calls 3

apiCommandBuilderFunction · 0.85
buildEpilogFunction · 0.85

Tested by

no test coverage detected