TWSList Class Reference
Inherits from | NSObject |
---|---|
Declared in | TWSList.h |
– sid
The unique identifier for this list.
- (nonnull NSString *)sid
Return Value
The identifier.
Discussion
The unique identifier for this list.
Declared In
TWSList.h
– uniqueName
The unique name for this list.
- (nullable NSString *)uniqueName
Return Value
The unique name.
Discussion
The unique name for this list.
Declared In
TWSList.h
– addItemWithData:metadata:completion:
Adds a new item to the list with the provided data.
- (void)addItemWithData:(nonnull TWSData *)data metadata:(nullable TWSListItemMetadata *)objectMetadata completion:(nullable TWSListItemCompletion)completion
Parameters
data |
The new data. |
---|---|
objectMetadata |
Optional metadata for the added item, currently only ttl. |
completion |
Completion block that will specify the result of the operation and the newly added item. |
Discussion
Adds a new item to the list with the provided data.
Declared In
TWSList.h
– getItemAtIndex:completion:
Request the list item at the specified index.
- (void)getItemAtIndex:(TWSItemIndex)index completion:(nonnull TWSListItemCompletion)completion
Parameters
index |
The index of the item to retrieve. |
---|---|
completion |
Completion block that will specify the result of the operation and the requested item if it exists. |
Discussion
Request the list item at the specified index.
Declared In
TWSList.h
– setItemAtIndex:data:metadata:completion:
Sets the item at the specified index.
- (void)setItemAtIndex:(TWSItemIndex)index data:(nonnull TWSData *)data metadata:(nullable TWSListItemMetadata *)objectMetadata completion:(nullable TWSListItemCompletion)completion
Parameters
index |
The index of the existing item to set. |
---|---|
data |
The new data. |
objectMetadata |
Optional metadata for the updated item, currently only ttl. |
completion |
Completion block that will specify the result of the operation and the modified item. |
Discussion
Sets the item at the specified index.
Declared In
TWSList.h
– mutateItemAtIndex:mutator:metadata:completion:
Modify the ListItem’s data in a conflict-friendly way.
- (void)mutateItemAtIndex:(TWSItemIndex)index mutator:(nonnull TWSDataMutator)mutator metadata:(nullable TWSListItemMetadata *)objectMetadata completion:(nullable TWSListItemCompletion)completion
Parameters
index |
The index of the existing item to mutate. |
---|---|
mutator |
The mutator that you provide to modify the data passed in. |
objectMetadata |
Optional metadata for the mutated item, currently only ttl. |
completion |
Completion block that will specify the result of the operation and the modified item. |
Discussion
Modify the ListItem’s data in a conflict-friendly way.
Declared In
TWSList.h
– removeItemAtIndex:completion:
Removes the ListItem at the specified index.
- (void)removeItemAtIndex:(TWSItemIndex)index completion:(nullable TWSCompletion)completion
Parameters
index |
The index of the item to remove. |
---|---|
completion |
Completion block that will specify the result of the operation. |
Discussion
Removes the ListItem at the specified index.
Declared In
TWSList.h
– queryItemsWithOptions:completion:
Query the list’s items with the requested parameters.
- (void)queryItemsWithOptions:(nonnull TWSListQueryOptions *)listQueryOptions completion:(nonnull TWSListPaginatorCompletion)completion
Parameters
listQueryOptions |
The options for the list query. |
---|---|
completion |
Completion block that will specify the result of the operation and a paginator for this page of results. |
Discussion
Query the list’s items with the requested parameters.
Declared In
TWSList.h
– setTtl:completion:
Update the list’s time to live.
- (void)setTtl:(TWSDuration)ttl completion:(nullable TWSCompletion)completion
Parameters
ttl |
The new time to live for this list in seconds from now or TWSDurationInfinity to indicate no expiry. |
---|---|
completion |
Completion block that will specify the result of the operation. |
Discussion
Update the list’s time to live.
Declared In
TWSList.h
– setTtl:forItemAtIndex:completion:
Update the list item’s time to live.
- (void)setTtl:(TWSDuration)ttl forItemAtIndex:(TWSItemIndex)index completion:(nullable TWSCompletion)completion
Parameters
ttl |
The new time to live for this list item in seconds from now or TWSDurationInfinity to indicate no expiry. |
---|---|
index |
The index of the item to adjust the ttl for. |
completion |
Completion block that will specify the result of the operation. |
Discussion
Update the list item’s time to live.
Declared In
TWSList.h
– removeListWithCompletion:
Remove the list from the system, deleting it.
- (void)removeListWithCompletion:(nullable TWSCompletion)completion
Parameters
completion |
Completion block that will specify the result of the operation. |
---|
Discussion
Remove the list from the system, deleting it.
Declared In
TWSList.h