add Item With Ttl
inline suspend fun <T : Any> SyncList.addItemWithTtl(itemData: T, ttl: <Error class: unknown class>): 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 with a specified TTL.
Type T must be annotated with @Serializable.
Return
SyncList.Item which has been added.
Parameters
item Data
Item data to add.
ttl
Time to live from now or Duration.INFINITE to indicate no expiry.
Throws
Serialization Exception
If the itemData cannot be serialized to JSON object.
Twilio Exception
When error occurred while adding the item.