Inherits from NSObject
Declared in UPMealAPI.h
UPMealAPI.m

Overview

Provides an interface for interacting with the user’s meals.

Class Methods

deleteMeal:completion:

Delete a meal event that’s currently on the user’s timeline.

+ (void)deleteMeal:(UPMeal *)meal completion:(UPBaseEventAPICompletion)completion

Parameters

meal

New meal event.

completion

Block to be executed upon completion. The block is passed a result array.

Discussion

Delete a meal event that’s currently on the user’s timeline.

Declared In

UPMealAPI.h

getMealDetails:completion:

Request details about a meal event on the currently authenticated user’s feed.

+ (void)getMealDetails:(UPMeal *)meal completion:(UPMealAPICompletion)completion

Parameters

meal

New meal event.

completion

Block to be executed upon completion. The block is passed a result array.

Discussion

Request details about a meal event on the currently authenticated user’s feed.

Declared In

UPMealAPI.h

getMealsFromStartDate:toEndDate:completion:

Request meal events between two points in time for the currently authenticated user.

+ (void)getMealsFromStartDate:(NSDate *)startDate toEndDate:(NSDate *)endDate completion:(UPBaseEventAPIArrayCompletion)completion

Parameters

completion

Block to be executed upon completion. The block is passed a result array.

Discussion

Request meal events between two points in time for the currently authenticated user.

@param startDate @param endDate

Declared In

UPMealAPI.h

getMealsWithLimit:completion:

Request most recent meal events for the currently authenticated user. The request is made asynchronously.

+ (void)getMealsWithLimit:(NSUInteger)limit completion:(UPBaseEventAPIArrayCompletion)completion

Parameters

limit

Maximum number of meals to be retrieved.

completion

Block to be executed upon completion. The block is passed a result array.

Discussion

Request most recent meal events for the currently authenticated user. The request is made asynchronously.

Declared In

UPMealAPI.h

postMeal:completion:

Post a meal event to the feed of the currently authenticated user.

+ (void)postMeal:(UPMeal *)meal completion:(UPMealAPICompletion)completion

Parameters

meal

New meal event.

completion

Block to be executed upon completion. The block is passed a result array.

Discussion

Post a meal event to the feed of the currently authenticated user.

Declared In

UPMealAPI.h