baasday
 All Classes Functions Properties
BDAuthenticatedUser.h
1 //
2 // BDAuthenticatedUser.h
3 // baasday
4 //
5 
6 #import <Foundation/Foundation.h>
7 #import "BDUser.h"
8 #import "BDDevice.h"
9 
10 @class BDAuthenticatedUser;
11 
12 typedef void (^BDAuthenticatedUserResultBlock)(BDAuthenticatedUser *user, NSError *error);
13 
20 
26 @property (readonly) NSString *authenticationKey;
27 
35 @property (readonly) BDDevice *currentDevice;
36 
43 + (BDAuthenticatedUser *)createWithValues:(NSDictionary *)values error:(NSError **)error;
44 
50 + (BDAuthenticatedUser *)createWithValues:(NSDictionary *)values;
51 
57 + (BDAuthenticatedUser *)createWithError:(NSError **)error;
58 
64 
70 + (void)createInBackgroundWithValues:(NSDictionary *)values block:(BDAuthenticatedUserResultBlock)block;
71 
76 + (void)createInBackground:(BDAuthenticatedUserResultBlock)block;
77 
83 + (BDAuthenticatedUser *)fetchWithError:(NSError **)error;
84 
90 
95 + (void)fetchInBackground:(BDAuthenticatedUserResultBlock)block;
96 
102 - (BOOL)updateDevice:(BDDevice *)device error:(NSError **)error;
103 
108 - (BOOL)updateDevice:(BDDevice *)device;
109 
115 - (void)updateDeviceInBackground:(BDDevice *)device block:(void(^)(id object, NSError *error))block;
116 
117 @end