(yargs: Argv)
| 30 | const describe = 'list modes or get information for a specific mode' |
| 31 | |
| 32 | const builder = (yargs: Argv): Argv<CommandArgs> => |
| 33 | outputItemOrListBuilder(apiCommandBuilder(yargs)) |
| 34 | .positional('id-or-index', { describe: 'the mode id or number in list', type: 'string' }) |
| 35 | .option('location', { |
| 36 | alias: 'l', |
| 37 | describe: 'a specific location to query', |
| 38 | type: 'string', |
| 39 | }) |
| 40 | .option('verbose', |
| 41 | { alias: 'v', describe: 'include location name in output', type: 'boolean', default: false }) |
| 42 | .example([ |
| 43 | ['$0 locations:modes', 'list all modes in your location(s)'], |
| 44 | [ |
| 45 | '$0 locations:modes 3', |
| 46 | 'display details of the third mode in the list retrieved by running "smartthings locations:modes"', |
| 47 | ], |
| 48 | ['$0 locations:modes 636169e4-8b9f-4438-a941-953b0d617231', 'display details of a mode by its id'], |
| 49 | ['$0 locations:modes --verbose', 'include location info in the output'], |
| 50 | ['$0 locations:modes --location=5dfd6626-ab1d-42da-bb76-90def3153998', 'list all modes in a particular location'], |
| 51 | ]) |
| 52 | .epilog(buildEpilog({ command, apiDocs: ['getModes', 'getMode'] })) |
| 53 | |
| 54 | const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => { |
| 55 | const command = await apiCommand(argv) |
nothing calls this directly
no test coverage detected