TWSList Class Reference

Inherits from NSObject
Declared in TWSList.h

Overview

An ordered list of data within Sync.

– 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:flowId:completion:

Adds a new item to the list with the provided data.

- (void)addItemWithData:(nonnull TWSData *)data flowId:(NSUInteger)flowId completion:(nullable TWSListItemIndexCompletion)completion

Parameters

data

The new data.

flowId

A developer specified identifier for this remote request.

completion

Completion block that will specify the result of the operation and the index of the newly added item.

Discussion

Adds a new item to the list with the provided data.

Declared In

TWSList.h

– getItemAtIndex:flowId:completion:

Request the list item at the specified index.

- (void)getItemAtIndex:(TWSItemIndex)index flowId:(NSUInteger)flowId completion:(nonnull TWSListItemCompletion)completion

Parameters

index

The index of the item to retrieve.

flowId

A developer specified identifier for this remote request.

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:flowId:completion:

Sets the item at the specified index.

- (void)setItemAtIndex:(TWSItemIndex)index data:(nonnull TWSData *)data flowId:(NSUInteger)flowId completion:(nullable TWSCompletion)completion

Parameters

index

The index of the existing item to set.

data

The new data.

flowId

A developer specified identifier for this remote request.

completion

Completion block that will specify the result of the operation.

Discussion

Sets the item at the specified index.

Declared In

TWSList.h

– mutateItemAtIndex:mutator:flowId:completion:

Modify the ListItem’s data in a conflict-friendly way.

- (void)mutateItemAtIndex:(TWSItemIndex)index mutator:(nonnull TWSDataMutator)mutator flowId:(NSUInteger)flowId 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.

flowId

A developer specified identifier for this remote request.

completion

Completion block that will specify the result of the operation.

Discussion

Modify the ListItem’s data in a conflict-friendly way.

Declared In

TWSList.h

– removeItemAtIndex:flowId:completion:

Removes the ListItem at the specified index.

- (void)removeItemAtIndex:(TWSItemIndex)index flowId:(NSUInteger)flowId completion:(nullable TWSCompletion)completion

Parameters

index

The index of the item to remove.

flowId

A developer specified identifier for this remote request.

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

– removeListWithFlowId:completion:

Remove the list from the system, deleting it.

- (void)removeListWithFlowId:(NSUInteger)flowId completion:(nullable TWSCompletion)completion

Parameters

flowId

A developer specified identifier for this remote request.

completion

Completion block that will specify the result of the operation.

Discussion

Remove the list from the system, deleting it.

Declared In

TWSList.h