MCPcopy Index your code
hub / github.com/SmartThingsCommunity/smartthings-cli / handler

Function handler

src/commands/scenes.ts:57–72  ·  view source on GitHub ↗
(argv: ArgumentsCamelCase<CommandArgs>)

Source from the content-addressed store, hash-verified

55 .epilog(buildEpilog({ command, apiDocs: ['listScenes'] }))
56
57const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => {
58 const command = await apiCommand(argv)
59
60 const config: OutputItemOrListConfig<SceneSummary> = {
61 primaryKeyName: 'sceneId',
62 sortKeyName: 'sceneName',
63 tableFieldDefinitions,
64 }
65 const options: SceneListOptions = {
66 locationId: argv.location,
67 }
68
69 await outputItemOrList<SceneSummary, SceneSummary>(command, config, argv.idOrIndex,
70 () => command.client.scenes.list(options),
71 id => command.client.scenes.get(id))
72}
73
74const cmd: CommandModule<object, CommandArgs> = { command, describe, builder, handler }
75export default cmd

Callers

nothing calls this directly

Calls 1

apiCommandFunction · 0.85

Tested by

no test coverage detected