Inherits from UPMove : UPBaseEvent : NSObject
Declared in UPWorkoutAPI.h
UPWorkoutAPI.m

Overview

A workout represents a duration within the days move where the user worked out.

Properties

image

The workout’s image.

@property (nonatomic, strong) UPImage *image

Discussion

The workout’s image.

Declared In

UPWorkoutAPI.h

imageURL

The URL for the workout’s image.

@property (nonatomic, strong) NSString *imageURL

Discussion

The URL for the workout’s image.

Declared In

UPWorkoutAPI.h

intensity

The workout intensity.

@property (nonatomic, assign) UPWorkoutIntensity intensity

Discussion

The workout intensity.

Declared In

UPWorkoutAPI.h

routeImageURL

The URL for the workout’s route image.

@property (nonatomic, strong) NSString *routeImageURL

Discussion

The URL for the workout’s route image.

Declared In

UPWorkoutAPI.h

timeCompleted

The time the workout was completed.

@property (nonatomic, strong) NSDate *timeCompleted

Discussion

The time the workout was completed.

Declared In

UPWorkoutAPI.h

type

The workout type.

@property (nonatomic, assign) UPWorkoutType type

Discussion

The workout type.

Declared In

UPWorkoutAPI.h

Class Methods

workoutWithType:startTime:endTime:intensity:caloriesBurned:

Create a new workout event.

+ (UPWorkout *)workoutWithType:(UPWorkoutType)type startTime:(NSDate *)startTime endTime:(NSDate *)endTime intensity:(UPWorkoutIntensity)intensity caloriesBurned:(NSNumber *)caloriesBurned

Parameters

type

The type of workout that is being created.

startTime

The time when the workout was started. The time must be in the past.

endTime

The time the workout had finished. The time must be in the past.

intensity

The intensity of the workout.

caloriesBurned

The number of calories burned during the workout.

Return Value

Returns a new workout event.

Discussion

Create a new workout event.

Declared In

UPWorkoutAPI.h

Instance Methods

apiType

- (NSString *)apiType

Declared In

UPBaseEventAPI.h

decodeFromDictionary:

- (void)decodeFromDictionary:(NSDictionary *)dictionary

Declared In

UPBaseEventAPI.h

encodeToDictionary

Encodes an object to a JSON dictionary.

- (NSDictionary *)encodeToDictionary

Discussion

Encodes an object to a JSON dictionary.

Declared In

UPBaseEventAPI.h