(yargs: Argv)
| 21 | const describe = 'query device presentation by presentation id' |
| 22 | |
| 23 | const builder = (yargs: Argv): Argv<CommandArgs> => |
| 24 | outputItemBuilder(apiCommandBuilder(yargs)) |
| 25 | .positional( |
| 26 | 'presentation-id', |
| 27 | { |
| 28 | describe: 'system generated identifier that corresponds to a device presentation', |
| 29 | type: 'string', |
| 30 | required: true, |
| 31 | }, |
| 32 | ) |
| 33 | .positional( |
| 34 | 'manufacturer-name', |
| 35 | { |
| 36 | describe: 'manufacturer name, defaults to SmartThingsCommunity', |
| 37 | type: 'string', |
| 38 | }, |
| 39 | ) |
| 40 | .example([ |
| 41 | [ |
| 42 | '$0 presentation fd4adb7f-4a23-4134-9b39-05ed889a03cf', |
| 43 | 'display the specified presentation, which is associated with the SmartThingsCommunity manufacturer id'], |
| 44 | [ |
| 45 | '$0 devices presentation 4ea31e30-2aba-41c7-a3ec-8f97423d565a DoodadsInc', |
| 46 | 'display the specified presentation, which is associated with the DoodadsInc manufacturer id', |
| 47 | ], |
| 48 | ]) |
| 49 | .epilog(buildEpilog({ |
| 50 | command, |
| 51 | apiDocs: ['getDevicePresentation'], |
| 52 | notes: |
| 53 | 'The language can be overridden by specifying an ISO language code with the "--language" option. ' + |
| 54 | 'If "NONE" is specified for the language code then no language header is specified in the API request.', |
| 55 | })) |
| 56 | |
| 57 | const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => { |
| 58 | const command = await apiCommand(argv) |
nothing calls this directly
no test coverage detected