Combu
2.1.14
Unity API Documentation
|
User class implementing the Unity built-in Social interfaces (specialized IUserProfile, ILocalUser). More...
Public Member Functions | |
User (bool authenticated) | |
User (string jsonString) | |
User (Hashtable hash) | |
virtual void | FromUser (User source) |
virtual void | Authenticate (System.Action< bool > callback) |
Authenticate the user. More... | |
virtual void | Authenticate (System.Action< bool, string > callback) |
Authenticate the user. More... | |
virtual void | Authenticate (string password, System.Action< bool, string > callback) |
Authenticate the user with the specified password. More... | |
virtual void | CreateGuest (System.Action< bool, string > callback) |
virtual void | LoadFriends (System.Action< bool > callback) |
Loads the friends of the current logged user. More... | |
virtual void | LoadFriends (eContactType contactType, System.Action< bool > callback) |
Loads the friends of the current logged user. More... | |
virtual void | LoadFriends< T > (eContactType contactType, System.Action< bool > callback) |
Loads the friends of the current logged user. More... | |
virtual void | Update (System.Action< bool, string > callback) |
Update or Create this user to server, whether id is positive and greater than zero. More... | |
virtual void | Delete (System.Action< bool, string > callback) |
Delete this instance from the server. More... | |
void | Load (System.Action< bool > callback) |
Load of the current user from server. More... | |
virtual void | ResetPassword (System.Action< bool, string > callback) |
Resets the password of this user. More... | |
virtual void | ChangePassword (string newPassword, System.Action< bool, string > callback) |
Changes the password of this user. More... | |
virtual void | AuthenticatePlatform (string platformKey, string platformId, System.Action< bool, string > callback) |
Authenticates the user from an external platform (like Facebook, Game Center, GooglePlay etc). Note you are the only responsible for the external authentication, Combu only stores the info that you send. More... | |
virtual void | AuthenticatePlatform< T > (string platformKey, string platformId, System.Action< bool, string > callback) |
virtual void | LinkAccount (string username, string password, System.Action< bool, string > callback) |
Links the currently logged account to another: all the platforms Ids of the current user will be transferred to the new account and the current account will be deleted. More... | |
virtual void | LinkPlatform (string platformKey, string platformId, System.Action< bool, string > callback) |
Links a new platform Id to the logged account. More... | |
void | AddContact (string otherUsername, eContactType contactType, System.Action< bool, string > callback) |
Adds the contact. More... | |
void | AddContact (Profile otherUser, eContactType contactType, System.Action< bool, string > callback) |
Adds the contact. More... | |
void | RemoveContact (string otherUsername, System.Action< bool, string > callback) |
Removes the contact. More... | |
void | RemoveContact (Profile otherUser, System.Action< bool, string > callback) |
Removes the contact. More... | |
Public Member Functions inherited from Combu.Profile | |
Profile (string jsonString) | |
Initializes a new instance of the CBUser class from a JSON formatted string. More... | |
Profile (Hashtable hash) | |
Initializes a new instance of the CBUser class from a Hashtable. More... | |
virtual void | FromJson (string jsonString) |
Initialize the object from a JSON formatted string. More... | |
virtual void | FromHashtable (Hashtable hash) |
Initialize the object from a hashtable. More... | |
Static Public Member Functions | |
static void | AuthenticateSession (long userId, string token, System.Action< bool, string > callback) |
static void | Delete (string username, string password, System.Action< bool, string > callback) |
Delete a user from the server. More... | |
static void | Load (User[] updateUsers, System.Action< bool > callback) |
Reload the specified users from server (by Id). More... | |
static void | Load (long userId, System.Action< User > callback) |
Loads a user by Id. More... | |
static void | Load (string userName, System.Action< User > callback) |
Loads a user by userName. More... | |
static void | Load (long[] userIds, System.Action< User[]> callback) |
Loads the users by Id. More... | |
static void | Load (string[] userNames, System.Action< User[]> callback) |
Loads the users by userName. More... | |
static void | Load< T > (string username, string email, SearchCustomData[] customData, bool isOnline, int pageNumber, int limit, System.Action< T[], int, int > callback) |
Loads the users by searching for the specified parameters. More... | |
static void | Random< T > (SearchCustomData[] customData, int count, System.Action< T[]> callback) |
Loads a specified count of random users. More... | |
static void | Exists (string username, string email, System.Action< bool, string > callback) |
Verify if it exists an account with the specified username and email. More... | |
static void | ResetPassword (long idUser, System.Action< bool, string > callback) |
Resets the password of a user by Id Account. More... | |
static void | ResetPassword (string username, System.Action< bool, string > callback) |
Resets the password of a user by Username. More... | |
static void | ChangePassword (long idUser, string username, string resetCode, string newPassword, System.Action< bool, string > callback) |
Changes the password of a user. More... | |
Public Attributes | |
string | password |
Public Attributes inherited from Combu.Profile | |
string | |
The email address. More... | |
Hashtable | customData = new Hashtable() |
The custom data. More... | |
Properties | |
IUserProfile[] | friends [get] |
IUserProfile[] | ignored [get] |
IUserProfile[] | requests [get] |
bool | authenticated [get] |
virtual bool | underage [get] |
Properties inherited from Combu.Profile | |
List< ProfilePlatform > | platforms [get] |
string | id [get] |
Gets the identifier value as string. More... | |
long | idLong [get] |
Gets the identifier value as long. id is just a ToString() of idLong, since Ids are stored as long in the database. More... | |
string | userName [get, set] |
Gets or sets the name of the user. More... | |
bool | isFriend [get] |
Gets a value indicating whether this Combu.Profile is a friend of the local user. More... | |
virtual UserState | state [get] |
Gets the online state. More... | |
Texture2D | image [get, set] |
Gets or sets the image. More... | |
string | sessionToken [get] |
Gets the session token. More... | |
System.DateTime | lastSeen [get] |
Gets the last seen date/time. More... | |
Additional Inherited Members | |
Protected Attributes inherited from Combu.Profile | |
long | _id = 0 |
string | _userName = "" |
Texture2D | _image |
string | _sessionToken = "" |
System.DateTime | _lastSeen |
User class implementing the Unity built-in Social interfaces (specialized IUserProfile, ILocalUser).
void Combu.User.AddContact | ( | string | otherUsername, |
eContactType | contactType, | ||
System.Action< bool, string > | callback | ||
) |
Adds the contact.
otherUsername | Other username. |
contactType | Contact type. |
callback | Callback. |
void Combu.User.AddContact | ( | Profile | otherUser, |
eContactType | contactType, | ||
System.Action< bool, string > | callback | ||
) |
Adds the contact.
otherUser | Other user. |
contactType | Contact type. |
callback | Callback. |
|
virtual |
Authenticate the user.
callback | Callback. |
|
virtual |
Authenticate the user.
callback | Callback. |
|
virtual |
Authenticate the user with the specified password.
password | Password. |
callback | Callback. |
T | Type for User. |
|
virtual |
Authenticates the user from an external platform (like Facebook, Game Center, GooglePlay etc). Note you are the only responsible for the external authentication, Combu only stores the info that you send.
platformKey | Platform key. |
platformId | Platform identifier. |
callback | Callback. |
|
virtual |
Changes the password of this user.
newPassword | New password. |
callback | Callback. |
|
static |
Changes the password of a user.
idUser | Identifier user. |
username | Username. |
resetCode | Reset code. |
newPassword | New password. |
callback | Callback. |
|
virtual |
Delete this instance from the server.
callback | Callback. |
|
static |
Delete a user from the server.
username | Username. |
password | Password. |
callback | Callback. |
|
static |
Verify if it exists an account with the specified username and email.
username | Username. |
Email. | |
callback | Callback. |
|
virtual |
Links the currently logged account to another: all the platforms Ids of the current user will be transferred to the new account and the current account will be deleted.
username | Username. |
password | Password. |
callback | Callback. |
|
virtual |
Links a new platform Id to the logged account.
platformKey | Platform key. |
platformId | Platform identifier. |
callback | Callback. |
|
static |
Reload the specified users from server (by Id).
updateUsers | List of users. |
callback | Callback. |
void Combu.User.Load | ( | System.Action< bool > | callback | ) |
Load of the current user from server.
callback | Callback. |
|
static |
Loads a user by Id.
userId | User Id. |
callback | Callback. |
|
static |
Loads a user by userName.
userName | User Name. |
callback | Callback. |
|
static |
Loads the users by Id.
userIds | User Ids. |
callback | Callback. |
updateUser | If passed its data will be replaced with the server result. |
|
static |
Loads the users by userName.
userNames | User Names. |
callback | Callback. |
|
static |
Loads the users by searching for the specified parameters.
username | Username. |
Email. | |
customData | Custom data. |
pageNumber | Page number. |
limit | Limit. |
callback | Callback. |
T | : | User | |
T | : | new() |
|
virtual |
Loads the friends of the current logged user.
callback | Callback. |
|
virtual |
Loads the friends of the current logged user.
contactType | Contact type. |
callback | Callback. |
|
virtual |
Loads the friends of the current logged user.
contactType | Contact type. |
callback | Callback. |
T | Type for User. |
T | : | User | |
T | : | new() |
|
static |
Loads a specified count of random users.
customData | Custom data. |
count | Count. |
callback | Callback. |
T | : | User | |
T | : | new() |
void Combu.User.RemoveContact | ( | string | otherUsername, |
System.Action< bool, string > | callback | ||
) |
Removes the contact.
otherUsername | Other username. |
callback | Callback. |
void Combu.User.RemoveContact | ( | Profile | otherUser, |
System.Action< bool, string > | callback | ||
) |
Removes the contact.
otherUser | Other user. |
callback | Callback. |
|
virtual |
Resets the password of this user.
callback | Callback. |
|
static |
Resets the password of a user by Id Account.
idUser | Identifier user. |
callback | Callback. |
|
static |
Resets the password of a user by Username.
username | Username. |
callback | Callback. |
|
virtual |
Update or Create this user to server, whether id is positive and greater than zero.
callback | Callback. |