TWSMap Class Reference

Inherits from NSObject
Declared in TWSMap.h

Overview

A map stores unordered JSON objects accessible via a developer defined key.

– sid

The unique identifier for this map.

- (nonnull NSString *)sid

Return Value

The identifier.

Discussion

The unique identifier for this map.

Declared In

TWSMap.h

– uniqueName

The unique name for this map.

- (nullable NSString *)uniqueName

Return Value

The unique name.

Discussion

The unique name for this map.

Declared In

TWSMap.h

– getItemWithKey:flowId:completion:

Request the map item with the specified key.

- (void)getItemWithKey:(nonnull NSString *)key flowId:(NSUInteger)flowId completion:(nonnull TWSMapItemCompletion)completion

Parameters

key

The key 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 map item with the specified key.

Declared In

TWSMap.h

– setItemWithKey:data:flowId:completion:

Sets the item for the specified key.

- (void)setItemWithKey:(nonnull NSString *)key data:(nonnull TWSData *)data flowId:(NSUInteger)flowId completion:(nullable TWSCompletion)completion

Parameters

key

The key of the 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 for the specified key.

Declared In

TWSMap.h

– mutateItemWithKey:mutator:flowId:completion:

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

- (void)mutateItemWithKey:(nonnull NSString *)key mutator:(nonnull TWSDataMutator)mutator flowId:(NSUInteger)flowId completion:(nullable TWSMapItemCompletion)completion

Parameters

key

The key of the 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 MapItem’s data in a conflict-friendly way.

Declared In

TWSMap.h

– removeItemWithKey:flowId:completion:

Removes the MapItem with the specified key.

- (void)removeItemWithKey:(nonnull NSString *)key flowId:(NSUInteger)flowId completion:(nullable TWSCompletion)completion

Parameters

key

The key 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 MapItem with the specified key.

Declared In

TWSMap.h

– queryItemsWithOptions:completion:

Query the map’s items with the requested parameters.

- (void)queryItemsWithOptions:(nonnull TWSMapQueryOptions *)mapQueryOptions completion:(nonnull TWSMapPaginatorCompletion)completion

Parameters

mapQueryOptions

The options for the map query.

completion

Completion block that will specify the result of the operation and a paginator for this page of results.

Discussion

Query the map’s items with the requested parameters.

Declared In

TWSMap.h

– removeMapWithFlowId:completion:

Remove the map from the system, deleting it.

- (void)removeMapWithFlowId:(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 map from the system, deleting it.

Declared In

TWSMap.h