UPSleepAPI Class Reference
| Inherits from | NSObject |
| Declared in | UPSleepAPI.h UPSleepAPI.m |
Class Methods
deleteSleep:completion:
Delete a sleep event. The event must belong to the currently authenticated user.
+ (void)deleteSleep:(UPSleep *)sleep completion:(UPBaseEventAPICompletion)completionParameters
- sleep
The sleep event to be deleted.
- completion
Block to be executed upon completion. The block is passed a completion object.
Discussion
Delete a sleep event. The event must belong to the currently authenticated user.
Declared In
UPSleepAPI.hgetSleepGraphImage:completion:
Request an image containing a graph for the sleep event. The event must be visible to the currently authenticated user.
+ (void)getSleepGraphImage:(UPSleep *)sleep completion:(UPBaseEventAPIImageCompletion)completionParameters
- sleep
The sleep event to request.
- completion
Block to be executed upon completion. The block is passed the result.
Discussion
Request an image containing a graph for the sleep event. The event must be visible to the currently authenticated user.
Declared In
UPSleepAPI.hgetSleepTicks:completion:
Requests ticks of the sleep. The ticks provide finer detail about the sleep.
+ (void)getSleepTicks:(UPSleep *)sleep completion:(UPBaseEventAPIArrayCompletion)completionParameters
- sleep
The sleep event to request the snapshot for.
- completion
Block to be executed upon completion. The block is passed the result.
Discussion
Requests ticks of the sleep. The ticks provide finer detail about the sleep.
Declared In
UPSleepAPI.hgetSleepsFromStartDate:toEndDate:completion:
Request sleep events between two points in time for the currently authenticated user.
+ (void)getSleepsFromStartDate:(NSDate *)startDate toEndDate:(NSDate *)endDate completion:(UPBaseEventAPIArrayCompletion)completionParameters
- completion
Block to be executed upon completion. The block is passed the results.
Discussion
Request sleep events between two points in time for the currently authenticated user.
Declared In
UPSleepAPI.hgetSleepsWithLimit:completion:
Request recent sleep sleep for the currently authenticated user.
+ (void)getSleepsWithLimit:(NSUInteger)limit completion:(UPBaseEventAPIArrayCompletion)completionParameters
- limit
The maximum number of events that will be returned.
- completion
Block to be executed upon completion. The block is passed the results.
Discussion
Request recent sleep sleep for the currently authenticated user.
Declared In
UPSleepAPI.hpostSleep:completion:
Post a new sleep event to the user’s timeline.
+ (void)postSleep:(UPSleep *)sleep completion:(UPSleepAPICompletion)completionParameters
- sleep
A new sleep event.
- completion
Block to be executed upon completion. The block is passed the results.
Discussion
Post a new sleep event to the user’s timeline.
Declared In
UPSleepAPI.hrefreshSleep:completion:
Request sleep recent sleep events for the currently authenticated user.
+ (void)refreshSleep:(UPSleep *)sleep completion:(UPSleepAPICompletion)completionParameters
- completion
Block to be executed upon completion. The block is passed the results.
Discussion
Request sleep recent sleep events for the currently authenticated user.
@param limit
Declared In
UPSleepAPI.h