AWSPinpointEvent Class Reference

Inherits from NSObject
Declared in AWSPinpointEvent.h
AWSPinpointEvent.m

Overview

Represents an analytics event. An event must have an event type.

  eventType

Returns the name/type of this AWSPinpointEvent.

@property (nonatomic, readonly) NSString *eventType

Return Value

the name/type of this AWSPinpointEvent.

Declared In

AWSPinpointEvent.h

  eventTimestamp

Returns the timestamp of the event.

@property (nonatomic, readonly) UTCTimeMillis eventTimestamp

Return Value

the timestamp of this AWSPinpointEvent.

Declared In

AWSPinpointEvent.h

  session

Returns the sesion of the event. The session should be populated with the current session in AWSPinpointSessionClient. If no session exists a session is started.

@property (nonatomic, readonly) AWSPinpointSession *session

Return Value

the session of this AWSPinpointEvent.

Declared In

AWSPinpointEvent.h

– initWithEventType:session:

Initializes an event object with specified type and the current timestamp.

- (instancetype)initWithEventType:(NSString *)theEventType session:(AWSPinpointSession *)session

Parameters

theEventType

The name/type of the event.

session

The session object. Should be retrieved from AWSPinpointSessionClient

Declared In

AWSPinpointEvent.h

– initWithEventType:eventTimestamp:session:

Initializes an event object with specified type and timestamp.

- (instancetype)initWithEventType:(NSString *)theEventType eventTimestamp:(UTCTimeMillis)theEventTimestamp session:(AWSPinpointSession *)session

Parameters

theEventType

The name/type of the event.

theEventTimestamp

The timestamp of the event.

session

The session object. Should be retrieved from AWSPinpointSessionClient

Declared In

AWSPinpointEvent.h

– addAttribute:forKey:

Adds an attribute to this AWSPinpointEvent with the specified key. Only 50 attributes/metrics. are allowed to be added to an AWSPinpointEvent. If 50 attributes/metrics already exist on this AWSPinpointEvent, the call is ignored.

- (void)addAttribute:(NSString *)theValue forKey:(NSString *)theKey

Parameters

theValue

The value of the attribute. The value will be truncated if it exceeds 200 characters.

theKey

The key of the attribute. The key will be truncated if it exceeds 50 characters.

Declared In

AWSPinpointEvent.h

– addMetric:forKey:

Adds a metric to this AWSPinpointEvent with the specified key. Only 50 attributes/metrics. are allowed to be added to an AWSPinpointEvent. If 50 attribute/metrics already exist on this AWSPinpointEvent, the call is ignored.

- (void)addMetric:(NSNumber *)theValue forKey:(NSString *)theKey

Parameters

theValue

The value of the metric.

theKey

The key of the metric. The key will be truncated if it exceeds 50 characters.

Declared In

AWSPinpointEvent.h

– attributeForKey:

Returns the value of the attribute with the specified key.

- (NSString *)attributeForKey:(NSString *)theKey

Parameters

theKey

The key of the attribute to return.

Return Value

The attribute with the specified key, or null if attribute does not exist.

Declared In

AWSPinpointEvent.h

– metricForKey:

Returns the value of the metric with the specified key.

- (NSNumber *)metricForKey:(NSString *)theKey

Parameters

theKey

The key of the metric to return.

Return Value

The metric with the specified key, or null if metric does not exist.

Declared In

AWSPinpointEvent.h

– hasAttributeForKey:

Determines if this AWSPinpointEvent contains a specific attribute.

- (BOOL)hasAttributeForKey:(NSString *)theKey

Parameters

theKey

The key of the attribute

Return Value

YES if this AWSPinpointEvent has an attribute with the specified key, NO otherwise.

Declared In

AWSPinpointEvent.h

– hasMetricForKey:

Determines if this AWSPinpointEvent contains a specific metric.

- (BOOL)hasMetricForKey:(NSString *)theKey

Parameters

theKey

The key of the metric

Return Value

YES if this AWSPinpointEvent has a metric with the specified key, NO otherwise.

Declared In

AWSPinpointEvent.h

– allAttributes

Returns an NSDictionary of all attributes contained within this AWSPinpointEvent.

- (NSDictionary *)allAttributes

Return Value

an NSDictionary of all attributes, where the attribute keys are the keys and the attribute values are the values.

Declared In

AWSPinpointEvent.h

– allMetrics

Returns an NSDictionary of all metrics contained within this AWSPinpointEvent.

- (NSDictionary *)allMetrics

Return Value

an NSDictionary of all metrics, where the metric keys are the keys and the metric values are the values.

Declared In

AWSPinpointEvent.h

– toDictionary

Returns an NSDictionary representation of this object.

- (NSDictionary *)toDictionary

Return Value

an NSDictionary representation of this AWSPinpointEvent object.

Declared In

AWSPinpointEvent.h