(yargs: Argv)
| 27 | const describe = 'list scenes or get information for a specific scene' |
| 28 | |
| 29 | const builder = (yargs: Argv): Argv<CommandArgs> => |
| 30 | outputItemOrListBuilder(apiCommandBuilder(yargs)) |
| 31 | .positional( |
| 32 | 'id-or-index', |
| 33 | { describe: 'the scene id or number from list', type: 'string' }, |
| 34 | ) |
| 35 | .option( |
| 36 | 'location', |
| 37 | { alias: 'l', describe: 'filter results by location', type: 'string', array: true }, |
| 38 | ) |
| 39 | .example([ |
| 40 | ['$0 scenes', 'list all scenes'], |
| 41 | [ |
| 42 | '$0 scenes 1', |
| 43 | 'display details for the first scene in the list retrieved by running' + |
| 44 | ' "smartthings scenes"', |
| 45 | ], |
| 46 | [ |
| 47 | '$0 scenes f45c2df1-9dce-4e63-85ba-c7f7fdfe9677', |
| 48 | 'display details for a scene by id', |
| 49 | ], |
| 50 | [ |
| 51 | '$0 scenes --location 2916ca34-a8c1-4bad-96b8-2d950b6619a0', |
| 52 | 'list all scenes at the specified location', |
| 53 | ], |
| 54 | ]) |
| 55 | .epilog(buildEpilog({ command, apiDocs: ['listScenes'] })) |
| 56 | |
| 57 | const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => { |
| 58 | const command = await apiCommand(argv) |
nothing calls this directly
no test coverage detected