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

Function listApps

src/commands/apps.ts:80–95  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

78 }
79
80 const listApps = async (): Promise<PagedApp[] | AppResponse[]> => {
81 const appListOptions: AppListOptions = {}
82 if (argv.type) {
83 appListOptions.appType = AppType[argv.type as keyof typeof AppType]
84 }
85
86 if (argv.classification) {
87 appListOptions.classification = argv.classification
88 .map(classification => AppClassification[classification as keyof typeof AppClassification])
89 }
90
91 if (argv.verbose) {
92 return verboseApps(command.client, appListOptions)
93 }
94 return command.client.apps.list(appListOptions)
95 }
96
97 await outputItemOrList(command, config, argv.idOrIndex, listApps, id => command.client.apps.get(id))
98}

Callers

nothing calls this directly

Calls 1

verboseAppsFunction · 0.85

Tested by

no test coverage detected