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

Function builder

src/commands/locations/rooms/update.ts:29–43  ·  view source on GitHub ↗
(yargs: Argv)

Source from the content-addressed store, hash-verified

27const describe = 'update a room'
28
29const builder = (yargs: Argv): Argv<CommandArgs> =>
30 inputAndOutputItemBuilder(apiCommandBuilder(yargs))
31 .positional('id', { describe: 'room id', type: 'string' })
32 .option('location', { alias: 'l', describe: 'a specific location to query', type: 'string' })
33 .example([
34 [
35 '$0 locations:rooms:update -i my-room.json',
36 'prompt for a room and update it using the data in "my-room.json"',
37 ],
38 [
39 '$0 locations:rooms:update 392bcb11-e251-44f3-b58b-17f93015f3aa -i my-room.json',
40 'update the room with the given id using the data in "my-room.json"',
41 ],
42 ])
43 .epilog(buildEpilog({ command, apiDocs: 'updateRoom' }))
44
45const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => {
46 const command = await apiCommand(argv)

Callers

nothing calls this directly

Calls 3

apiCommandBuilderFunction · 0.85
buildEpilogFunction · 0.85

Tested by

no test coverage detected