Inherits from NSObject
Conforms to UPBaseObject
Declared in UPMealAPI.h
UPMealAPI.m

Overview

A single item making up a portion of a meal.

Properties

amount

The amount of this meal item in the overall meal.

@property (nonatomic, strong) NSNumber *amount

Discussion

The amount of this meal item in the overall meal.

Declared In

UPMealAPI.h

category

The category of the meal item.

@property (nonatomic, strong) NSString *category

Discussion

The category of the meal item.

Declared In

UPMealAPI.h

foodType

The food type of the meal item.

@property (nonatomic, assign) UPMealItemFoodType foodType

Discussion

The food type of the meal item.

Declared In

UPMealAPI.h

itemDescription

The description of the meal item.

@property (nonatomic, strong) NSString *itemDescription

Discussion

The description of the meal item.

Declared In

UPMealAPI.h

measurementUnits

The unit of measurement that the amount represents.

@property (nonatomic, strong) NSString *measurementUnits

Discussion

The unit of measurement that the amount represents.

Declared In

UPMealAPI.h

name

The name of the meal item.

@property (nonatomic, strong) NSString *name

Discussion

The name of the meal item.

Declared In

UPMealAPI.h

nutritionInfo

The nutrition information of the meal item.

@property (nonatomic, strong) UPMealNutritionInfo *nutritionInfo

Discussion

The nutrition information of the meal item.

Declared In

UPMealAPI.h

servingType

The serving type of the meal item.

@property (nonatomic, assign) UPMealItemServingType servingType

Discussion

The serving type of the meal item.

Declared In

UPMealAPI.h

Class Methods

mealItemWithName:description:amount:measurementUnits:servingType:foodType:nutritionInfo:

Create a new meal item that can be used inside a meal event.

+ (UPMealItem *)mealItemWithName:(NSString *)name description:(NSString *)description amount:(NSNumber *)amount measurementUnits:(NSString *)measurementUnits servingType:(UPMealItemServingType)servingType foodType:(UPMealItemFoodType)foodType nutritionInfo:(UPMealNutritionInfo *)nutritionInfo

Parameters

name

The name of the new meal item.

description

The description of the new meal item.

amount

The amount or quantity of the new meal item.

measurementUnits

The unit of measurement for the new meal item.

servingType

The serving type of the new meal item.

foodType

The food type of the new meal item.

nutritionInfo

The nutrition information for the new item.

Discussion

Create a new meal item that can be used inside a meal event.

Declared In

UPMealAPI.h

Instance Methods

decodeFromDictionary:

Decodes an object from a JSON dictionary.

- (void)decodeFromDictionary:(NSDictionary *)dictionary

Discussion

Decodes an object from a JSON 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