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

Function listItems

src/commands/capabilities.ts:102–111  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

100 buildTableOutput: (data: Capability) => buildTableOutput(command.tableGenerator, data),
101 }
102 const listItems = (): Promise<(CapabilitySummaryWithNamespace & WithOrganization)[]> => {
103 if (argv.standard) {
104 return getStandard(command.client)
105 } else if (argv.allOrganizations) {
106 config.listTableFieldDefinitions.push('organization')
107 return forAllOrganizations(command.client, orgClient =>
108 getCustomByNamespace(orgClient, argv.namespace))
109 }
110 return getCustomByNamespace(command.client, argv.namespace)
111 }
112 await outputItemOrListGeneric(command, config, idOrIndex,
113 listItems,
114 (id: CapabilityId) => command.client.capabilities.get(id.id, id.version),

Calls 3

getStandardFunction · 0.85
forAllOrganizationsFunction · 0.85
getCustomByNamespaceFunction · 0.85

Tested by

no test coverage detected