NetmeraUser Class Reference
| Inherits from | NSObject |
| Declared in | NetmeraUser.h NetmeraUser.m |
Overview
NetmeraUser object is for managing users of the application. You can register, update, login users with this class.
Tasks
-
+ getCurrentUserReturns the current logged user. If no user logged in then it returns nil.
-
– serializeObjectSerialize version of calling the user
-
– registerWithError:Registers new user. Before calling this method email,password and nickname fields of the NetmeraUser should be setted. Those are the compulsory fields. There are also optional name and surname fields.
-
– registerInBackgroundWithTarget:selector:Registers new user. Before calling this method email,password and nickname fields of the NetmeraUser should be setted. Those are the compulsory fields. There are also optional name and surname fields.
-
– registerInBackgroundWithBlock:Registers new user in the background thread and executes the given callback block. Before calling this method email,password and nickname fields of the NetmeraUser should be setted. Those are the compulsory fields. There are also optional name and surname fields.
-
– update:Updates user info. Before calling this method email,password and nickname fields of the NetmeraUser should be setted. Those are the compulsory fields.
-
– updateInBackgroundWithTarget:selector:Updates user info. Before calling this method email,password and nickname fields of the NetmeraUser should be setted. Those are the compulsory fields.
-
– updateInBackgroundWithBlock:Updates user info. Before calling this method email,password and nickname fields of the NetmeraUser should be setted. Those are the compulsory fields.
-
+ loginWithEmail:andPassword:withError:Logs a user into the registered application. Email and password fields of user is used for this operation.
-
+ loginInBackgroundWithTarget:selector:withEmail:andPassword:Logs a user into the registered application. Email and password fields of user is used for this operation.
-
+ loginAsGuestWithError:Logs a guest into the registered application.
-
+ loginAsGuestInBackgroundWithTarget:selector:Logs a guest into the application in the background thread.
-
+ logoutUser logged out from the application.
-
– activateUserWithEmail:andError:Activates the registered User.
-
– deactivateUserWithEmail:andError:Deactivates the registered User
Class Methods
getCurrentUser
Returns the current logged user. If no user logged in then it returns nil.
+ (NetmeraUser *)getCurrentUserReturn Value
current user
Discussion
Returns the current logged user. If no user logged in then it returns nil.
Declared In
NetmeraUser.hloginAsGuestInBackgroundWithTarget:selector:
Logs a guest into the application in the background thread.
+ (void)loginAsGuestInBackgroundWithTarget:(id)target selector:(SEL)selectorParameters
- selector
The selector to call. It should have the following signature: (void) callBackLoginAsGuestWithError:(NSError )error withNetmeraUser:(NetmeraUser )user. error will be nil on success and set if there was an error.
Discussion
Logs a guest into the application in the background thread.
@params target The object to call selector on.
Declared In
NetmeraUser.hloginAsGuestWithError:
Logs a guest into the registered application.
+ (NetmeraUser *)loginAsGuestWithError:(NSError **)errorParameters
- error
if it cannot access server
Return Value
the guest user
Discussion
Logs a guest into the registered application.
Declared In
NetmeraUser.hloginInBackgroundWithTarget:selector:withEmail:andPassword:
Logs a user into the registered application. Email and password fields of user is used for this operation.
+ (void)loginInBackgroundWithTarget:(id)target selector:(SEL)selector withEmail:(NSString *)email andPassword:(NSString *)passwordParameters
- target
The object to call selector on.
- selector
The selector to call. It should have the following signature: (void) callBackLoginWithError:(NSError )error withNetmeraUser:(NetmeraUser )user. error will be nil on success and set if there was an error.
of the user
- password
of the user
Discussion
Logs a user into the registered application. Email and password fields of user is used for this operation.
Declared In
NetmeraUser.hloginWithEmail:andPassword:withError:
Logs a user into the registered application. Email and password fields of user is used for this operation.
+ (NetmeraUser *)loginWithEmail:(NSString *)email andPassword:(NSString *)password withError:(NSError **)errorParameters
of the user
- password
of the user
- error
if it cannot access server
Return Value
the logged User
Discussion
Logs a user into the registered application. Email and password fields of user is used for this operation.
Declared In
NetmeraUser.hInstance Methods
activateUserWithEmail:andError:
Activates the registered User.
- (BOOL)activateUserWithEmail:(NSString *)email andError:(NSError **)errorParameters
of the user
- error
if it cannot access server
Discussion
Activates the registered User.
Declared In
NetmeraUser.hdeactivateUserWithEmail:andError:
Deactivates the registered User
- (BOOL)deactivateUserWithEmail:(NSString *)email andError:(NSError **)errorParameters
of the user
- error
if it cannot access server
Discussion
Deactivates the registered User
Declared In
NetmeraUser.hregisterInBackgroundWithBlock:
Registers new user in the background thread and executes the given callback block. Before calling this method email,password and nickname fields of the NetmeraUser should be setted. Those are the compulsory fields. There are also optional name and surname fields.
- (void)registerInBackgroundWithBlock:(void ( ^ ) ( NSError *error ))blockParameters
- block
The block to execute. The block should have the following argument signature: (NSError *error)
Discussion
Registers new user in the background thread and executes the given callback block. Before calling this method email,password and nickname fields of the NetmeraUser should be setted. Those are the compulsory fields. There are also optional name and surname fields.
Declared In
NetmeraUser.hregisterInBackgroundWithTarget:selector:
Registers new user. Before calling this method email,password and nickname fields of the NetmeraUser should be setted. Those are the compulsory fields. There are also optional name and surname fields.
- (void)registerInBackgroundWithTarget:(id)target selector:(SEL)selectorParameters
- target
The object to call selector on.
- selector
The selector to call. It should have the following signature: (void) callBackRegisterWithError:(NSError *)error. error will be nil on success and set if there was an error.
Discussion
Registers new user. Before calling this method email,password and nickname fields of the NetmeraUser should be setted. Those are the compulsory fields. There are also optional name and surname fields.
Declared In
NetmeraUser.hregisterWithError:
Registers new user. Before calling this method email,password and nickname fields of the NetmeraUser should be setted. Those are the compulsory fields. There are also optional name and surname fields.
- (BOOL)registerWithError:(NSError **)errorParameters
- error
if it cannot access server
Discussion
Registers new user. Before calling this method email,password and nickname fields of the NetmeraUser should be setted. Those are the compulsory fields. There are also optional name and surname fields.
NetmeraUser user = [[NetmeraUser alloc] init];
user.email = @“test@test.com”;
user.password = @“12345”;
user.nickname = @“test”;
NSError err = nil;
BOOL isregistered = [user registerWithError:&err];
Declared In
NetmeraUser.hserializeObject
Serialize version of calling the user
- (NSDictionary *)serializeObjectReturn Value
dictionary of the NetmeraUser object
Discussion
Serialize version of calling the user
Declared In
NetmeraUser.hupdate:
Updates user info. Before calling this method email,password and nickname fields of the NetmeraUser should be setted. Those are the compulsory fields.
- (BOOL)update:(NSError **)errorParameters
- error
if it cannot access server
Discussion
Updates user info. Before calling this method email,password and nickname fields of the NetmeraUser should be setted. Those are the compulsory fields.
Declared In
NetmeraUser.hupdateInBackgroundWithBlock:
Updates user info. Before calling this method email,password and nickname fields of the NetmeraUser should be setted. Those are the compulsory fields.
- (void)updateInBackgroundWithBlock:(void ( ^ ) ( NSError *error ))blockParameters
- block
The block to execute. The block should have the following argument signature: (NSError *error)
Discussion
Updates user info. Before calling this method email,password and nickname fields of the NetmeraUser should be setted. Those are the compulsory fields.
Declared In
NetmeraUser.hupdateInBackgroundWithTarget:selector:
Updates user info. Before calling this method email,password and nickname fields of the NetmeraUser should be setted. Those are the compulsory fields.
- (void)updateInBackgroundWithTarget:(id)target selector:(SEL)selectorParameters
- target
The object to call selector on.
- selector
The selector to call. It should have the following signature: (void) callBackUpdateWithError:(NSError *)error. error will be nil on success and set if there was an error.
Discussion
Updates user info. Before calling this method email,password and nickname fields of the NetmeraUser should be setted. Those are the compulsory fields.
Declared In
NetmeraUser.h