Skip to main content

system.kanoa.item.addItem(itemInfo, userId)

Adds an item. ItemInfo keys are required unless otherwise stated.


Parameters

itemInfo Dictionary

- enabledBooleanNot Required
- itemClassIdIntegerNone if this is an item at the root
- itemColorStringNot required. i.e '#00FF00'
- itemDescriptionStringNot required
- itemNameString

userId Integer:Id of the user executing the function


Returns

itemId Integer


Example

itemInfo = {
'itemName': 'Sausages',
'itemDescription': 'Delicious bangers',
'itemClassId': None,
'itemColor': None,
'enabled': True
}
itemId = system.kanoa.item.addItem(itemInfo, 123)