Diffusion Apple API 6.12.1
Unified Client Library for iOS, tvOS and OS X / macOS
Loading...
Searching...
No Matches
PTDiffusionTimeSeriesFeature(PTDiffusionBinary) Category Reference

Extension adding support to the Time Series feature for appending and editing events using binary values. More...

#include <PTDiffusionBinary.h>

Instance Methods

(void) - appendToTopicPath:binaryValue:completionHandler:
(void) - appendToTopicPath:binaryValue:timestamp:completionHandler:
(void) - editAtTopicPath:originalSequence:binaryValue:completionHandler:
(void) - evaluateQuery:atTopicPath:binaryCompletionHandler:

Detailed Description

Extension adding support to the Time Series feature for appending and editing events using binary values.

Since
6.0

Method Documentation

◆ appendToTopicPath:binaryValue:completionHandler:

- (void) appendToTopicPath: (NSString *) topicPath
binaryValue: (PTDiffusionBinary *) value
completionHandler: (void(^)(PTDiffusionTimeSeriesEventMetadata *_Nullable eventMetadata, NSError *_Nullable error)) completionHandler 

Update a time series topic by appending a new binary value.

The server will add an event to the end of the time series based on the supplied value, with a new sequence number, timestamp, and the author set to the authenticated principal of the session.

Parameters
topicPathThe path of the time series topic to update.
valueThe event value.
completionHandlerBlock to be called asynchronously on success or failure. If the operation was successful, the error argument passed to the block will be nil. The completion handler will be called asynchronously on the main dispatch queue.
Exceptions
NSInvalidArgumentExceptionRaised if any supplied arguments are `nil`.
Since
6.0

Extends class PTDiffusionTimeSeriesFeature.

◆ appendToTopicPath:binaryValue:timestamp:completionHandler:

- (void) appendToTopicPath: (NSString *) topicPath
binaryValue: (PTDiffusionBinary *) value
timestamp: (NSDate *) timestamp
completionHandler: (void(^)(PTDiffusionTimeSeriesEventMetadata *_Nullable eventMetadata, NSError *_Nullable error)) completionHandler 

Update a time series topic by appending a new binary value with a supplied timestamp.

The server will add an event to the end of the time series based on the supplied value and timestamp, with a new sequence number, and the author set to the authenticated principal of the session.

Parameters
topicPathThe path of the time series topic to update.
valueThe event value.
timestampThe supplied timestamp, must be greater or equal to that of the most recent event appended to the topic.
completionHandlerBlock to be called asynchronously on success or failure. If the operation was successful, the error argument passed to the block will be nil. The completion handler will be called asynchronously on the main dispatch queue.
Exceptions
NSInvalidArgumentExceptionRaised if any supplied arguments are `nil`.
Since
6.6

Extends class PTDiffusionTimeSeriesFeature.

◆ editAtTopicPath:originalSequence:binaryValue:completionHandler:

- (void) editAtTopicPath: (NSString *) topicPath
originalSequence: (UInt64) originalSequence
binaryValue: (PTDiffusionBinary *) value
completionHandler: (void(^)(PTDiffusionTimeSeriesEventMetadata *_Nullable eventMetadata, NSError *_Nullable error)) completionHandler 

Update a time series topic by appending a new binary value that overrides the value of an existing event.

The existing event is identified by its sequence number and must be an original event.

The server will add an edit event to the end of the time series based on the supplied value, with a new sequence number, timestamp, and the author set to the authenticated principal of the session.

Parameters
topicPathThe path of the time series topic to update.
originalSequenceThe sequence number of the original event to edit.
valueThe event value.
completionHandlerBlock to be called asynchronously on success or failure. If the operation was successful, the error argument passed to the block will be nil. The completion handler will be called asynchronously on the main dispatch queue.
Exceptions
NSInvalidArgumentExceptionRaised if any of the topicPath, value or completionHandler arguments are nil. Also raised if the originalSequence argument exceeds INT64_MAX.
Since
6.0

Extends class PTDiffusionTimeSeriesFeature.

◆ evaluateQuery:atTopicPath:binaryCompletionHandler:

- (void) evaluateQuery: (PTDiffusionTimeSeriesRangeQuery *) query
atTopicPath: (NSString *) topicPath
binaryCompletionHandler: (void(^)(PTDiffusionBinaryTimeSeriesQueryResult *_Nullable result, NSError *_Nullable error)) completionHandler 

Evaluate a query for a time series topic where events have binary values.

Parameters
queryThe configured query.
topicPathThe path of the time series topic to query.
completionHandlerBlock to be called asynchronously on success or failure. If the operation was successful, the error argument passed to the block will be nil. The completion handler will be called asynchronously on the main dispatch queue.
Exceptions
NSInvalidArgumentExceptionRaised if any supplied arguments are `nil`.
Since
6.0

Extends class PTDiffusionTimeSeriesFeature.