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

Function builder

src/commands/edge/drivers.ts:42–65  ·  view source on GitHub ↗
(yargs: Argv)

Source from the content-addressed store, hash-verified

40const describe = 'list all drivers owned by you or retrieve a single driver'
41
42const builder = (yargs: Argv): Argv<CommandArgs> =>
43 outputItemOrListBuilder(allOrganizationsBuilder(apiOrganizationCommandBuilder(yargs)))
44 .positional(
45 'id-or-index',
46 { describe: 'the driver id or number from list', type: 'string' },
47 )
48 .positional('driver-version', { describe: 'driver version', type: 'string' })
49 .example([
50 ['$0 edge:drivers', 'list all edge drivers you own'],
51 ['$0 edge:drivers 699c7308-8c72-4363-9571-880d0f5cc725', 'display details for a driver by id'],
52 [
53 '$0 edge:drivers 3',
54 'display details for the third driver in the list retrieved by running "smartthings drivers"',
55 ],
56 [
57 '$0 edge:drivers 699c7308-8c72-4363-9571-880d0f5cc725 2021-10-25T00:48:23.295969',
58 'get information on a specific version of a driver',
59 ],
60 ])
61 .epilog(buildEpilog({
62 command,
63 apiDocs: ['listDrivers', 'getDriver', 'getDriverRevision'],
64 formattedNotes: 'Use this command to list all drivers you own, even if they are not yet assigned to a channel.\n\nSee also drivers:installed to list installed drivers and channels:drivers to list drivers that are part of a channel you own or have subscribed to.',
65 }))
66
67const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => {
68 const command = await apiOrganizationCommand(argv)

Callers

nothing calls this directly

Calls 3

allOrganizationsBuilderFunction · 0.85
buildEpilogFunction · 0.85

Tested by

no test coverage detected