JOClient Class Reference
Inherits from | NSObject |
Declared in | JOClient.h |
Tasks
-
– initServer:andApiKey:
This method creates a client for the Joined server.
-
– registerUser:andPassword:success:failed:
This method creates a new user at the Joined server.
-
– deleteUser:success:failed:
This method deletes an existing user at the Joined server.
-
– loginUser:andPassword:success:failed:
This method enables users to login at the Joined server.
-
– logoutUser:success:failed:
This method enables users to logout at the Joined server.
-
– updatePosition:forUser:success:failed:
This methods updates the position of the user at the Joined server.
-
– updateStatus:forUser:success:failed:
This method updates the status of the user at the Joined server.
-
– searchFriendsWithNickname:forUser:success:failed:
This method searches other users at the Joined server.
-
– addFriend:forUser:success:failed:
This method sends a friends invitation to another user. If the other user accepts the invitation, the user appears at the list of friends.
-
– acceptFriend:forUser:success:failed:
This method accepts the friend invitation of another user.
-
– getFriendsForUser:success:failed:
This method get the friends of an user from the Joined server.
-
– deleteFriend:forUser:success:failed:
This method deletes a friend from the list of friends.
-
– sendMessage:fromUser:toFriend:success:failed:
This method sends a text message to a friend.
-
– getMessageForUser:success:failed:
This method returns a list of all available message from the inbox of the logged in user.
-
– deleteMessageForUser:success:failed:
This method deletes all messages in the inbox of the logged in user.
Instance Methods
acceptFriend:forUser:success:failed:
This method accepts the friend invitation of another user.
- (void)acceptFriend:(JOFriend *)friend forUser:(JOUser *)user success:(WebServiceSuccessBlock)successBlock failed:(WebServiceFailedBlock)failedBlock
Parameters
- friend
The class JOFriend object that represents the other user.
- user
The class JOUser object that represents the logged in user.
Declared In
JOClient.h
addFriend:forUser:success:failed:
This method sends a friends invitation to another user. If the other user accepts the invitation, the user appears at the list of friends.
- (void)addFriend:(JOFriend *)friend forUser:(JOUser *)user success:(WebServiceSuccessBlock)successBlock failed:(WebServiceFailedBlock)failedBlock
Parameters
- friend
The class JOFriend object that represents the other user.
- user
The class JOUser object that represents the logged in user.
Declared In
JOClient.h
deleteFriend:forUser:success:failed:
This method deletes a friend from the list of friends.
- (void)deleteFriend:(JOFriend *)friend forUser:(JOUser *)user success:(WebServiceSuccessBlock)successBlock failed:(WebServiceFailedBlock)failedBlock
Parameters
- friend
The class JOUser object that represents the other user.
- user
The class JOUser object that represents the logged in user.
Declared In
JOClient.h
deleteMessageForUser:success:failed:
This method deletes all messages in the inbox of the logged in user.
- (void)deleteMessageForUser:(JOUser *)user success:(WebServiceSuccessBlock)successBlock failed:(WebServiceFailedBlock)failedBlock
Parameters
- user
The class JOUser object that represents the logged in user.
Declared In
JOClient.h
deleteUser:success:failed:
This method deletes an existing user at the Joined server.
- (void)deleteUser:(JOUser *)user success:(WebServiceSuccessBlock)successBlock failed:(WebServiceFailedBlock)failedBlock
Parameters
- user
The class JOUser object that represents the logged in user.
Declared In
JOClient.h
getFriendsForUser:success:failed:
This method get the friends of an user from the Joined server.
- (void)getFriendsForUser:(JOUser *)user success:(FriendsWebServiceSuccessBlock)successBlock failed:(WebServiceFailedBlock)failedBlock
Parameters
- user
The class JOUser object that represents the logged in user.
Declared In
JOClient.h
getMessageForUser:success:failed:
This method returns a list of all available message from the inbox of the logged in user.
- (void)getMessageForUser:(JOUser *)user success:(MessagesWebServiceSuccessBlock)successBlock failed:(WebServiceFailedBlock)failedBlock
Parameters
- user
The class JOUser object that represents the logged in user.
Declared In
JOClient.h
initServer:andApiKey:
This method creates a client for the Joined server.
- (id)initServer:(NSString *)joinedServerUrl andApiKey:(NSString *)joinedApiKey
Parameters
- joinedServerUrl
The URL of the Joined Server.
- joinedApiKey
The API key for the Joined API for iOS.
Declared In
JOClient.h
loginUser:andPassword:success:failed:
This method enables users to login at the Joined server.
- (void)loginUser:(NSString *)username andPassword:(NSString *)password success:(UserWebServiceSuccessBlock)successBlock failed:(WebServiceFailedBlock)failedBlock
Parameters
- username
The name of the user.
- password
The password of the user.
Declared In
JOClient.h
logoutUser:success:failed:
This method enables users to logout at the Joined server.
- (void)logoutUser:(JOUser *)user success:(WebServiceSuccessBlock)successBlock failed:(WebServiceFailedBlock)failedBlock
Parameters
- user
The class JOUser object that represents the logged in user.
Declared In
JOClient.h
registerUser:andPassword:success:failed:
This method creates a new user at the Joined server.
- (void)registerUser:(NSString *)username andPassword:(NSString *)password success:(UserWebServiceSuccessBlock)successBlock failed:(WebServiceFailedBlock)failedBlock
Parameters
- username
The name for the new user.
- password
The password for the new user.
Declared In
JOClient.h
searchFriendsWithNickname:forUser:success:failed:
This method searches other users at the Joined server.
- (void)searchFriendsWithNickname:(NSString *)nickname forUser:(JOUser *)user success:(FriendsWebServiceSuccessBlock)successBlock failed:(WebServiceFailedBlock)failedBlock
Parameters
- nickname
The nickname other users.
- user
The class JOUser object that represents the logged in user.
Declared In
JOClient.h
sendMessage:fromUser:toFriend:success:failed:
This method sends a text message to a friend.
- (void)sendMessage:(NSString *)message fromUser:(JOUser *)user toFriend:(JOFriend *)friend success:(WebServiceSuccessBlock)successBlock failed:(WebServiceFailedBlock)failedBlock
Parameters
- message
The text message.
- user
The class JOUser object that represents the logged in user.
- friend
The class JOFriend object that represents the friend.
Declared In
JOClient.h
updatePosition:forUser:success:failed:
This methods updates the position of the user at the Joined server.
- (void)updatePosition:(CLLocationCoordinate2D)position forUser:(JOUser *)user success:(WebServiceSuccessBlock)successBlock failed:(WebServiceFailedBlock)failedBlock
Parameters
- position
The position of the user.
- user
The class JOUser object that represents the logged in user.
Declared In
JOClient.h
updateStatus:forUser:success:failed:
This method updates the status of the user at the Joined server.
- (void)updateStatus:(BOOL)status forUser:(JOUser *)user success:(WebServiceSuccessBlock)successBlock failed:(WebServiceFailedBlock)failedBlock
Parameters
- status
The status of the user (
true
for active and visible,false
for inactive and invisible).
- user
The class JOUser object that represents the logged in user.
Declared In
JOClient.h