itemchannellink

items.metadata. itemchannellink

Source:

Item channel link namespace. This namespace provides access to Item channel links.

Methods

Source:

Gets a channel link of from an Item.

Parameters:
Name Type Description
itemOrName Item | string

Item or the name of the Item

channelUID string
Returns:

the ItemChannelLink or null if none exists

Type
Object | null
Source:

Adds or updates a channel link of an Item.

Parameters:
Name Type Attributes Description
itemOrName Item | string

Item or the name of the Item

channelUID string
conf object <optional>

channel configuration

Returns:

the old ItemChannelLink or null if it did not exist

Type
Object | null
Source:

Removes a channel link from an Item.

Parameters:
Name Type Description
itemOrName Item | string

Item or the name of the Item

channelUID string
Returns:

the removed ItemChannelLink or null if none exists

Type
Object | null

(static) removeLinksForItem(itemName) → {number}

Source:

Removes all channel links from the given Item.

Parameters:
Name Type Description
itemName string

the name of the Item

Returns:

number of links removed

Type
number
Source:

Removes all orphaned (Item or channel missing) links.

Returns:

number of links removed

Type
number