addItem

inline suspend fun <T : Any> SyncList.addItem(itemData: T): SyncList.Item

Serializes the given value into an equivalent JsonObject using a serializer retrieved from reified type parameter and adds it as a new item to the end of the SyncList.

Type T must be annotated with @Serializable.

Return

SyncList.Item which has been added.

Parameters

itemData

Item data to add.

Throws

SerializationException

If the itemData cannot be serialized to JSON object.

TwilioException

When error occurred while adding the item.