itemchannellink

items.metadata. Namespace

Description:
  • Item channel link namespace. This namespace provides access to Item channel links.

Source:

Methods

Description:
  • Gets a channel link of from an Item.

Source:
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
Description:
  • Removes a channel link from an Item.

Source:
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}

Description:
  • Removes all channel links from the given Item.

Source:
Parameters:
Name Type Description
itemName string

the name of the Item

Returns:

number of links removed

Type
number
Description:
  • Removes all orphaned (Item or channel missing) links.

Source:
Returns:

number of links removed

Type
number
Description:
  • Adds or updates a channel link of an Item.

Source:
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