CotC C# SDK for Unity  v1.4.0.1
Making social games is easy !
Public Member Functions | List of all members

Description

API functions acting on an user account (convert, etc.).

Public Member Functions

Promise< DoneChangeEmailAddress (string newEmailAddress)
 Changes the e-mail address of the current user. Works for e-mail type accounts. More...
 
Promise< DoneChangePassword (string newPassword)
 Changes the password of the current user. Works for e-mail type accounts. More...
 
Promise< DoneConvert (string network, string networkId, string networkSecret, Bundle options=null)
 Converts the account to sign in through another network. For instance, you might have created an anonymous account, that you later want to convert to an account logged on through a facebook account. Or, should you later want to convert this account to simply use an e-mail address, this is the method that you will want to call. In order to convert the account successfully, the provided network credentials need to be acceptable, just as when calling CotcSdk.Cloud.Login. More...
 
Promise< DoneConvert (LoginNetwork network, string networkId, string networkSecret)
 
Promise< DoneLink (string network, string networkId, string networkSecret, Bundle options=null)
 Links the account with another social network. Note that unlike Convert, this doesn't change the way the user would then sign in (the credentials remain the same). For instance, one may want to link their facebook account while keeping e-mail credentials in order to be able to share and play against gamers from their facebook social circle. In order to link the account successfully, the provided network credentials need to be acceptable, just as when calling CotcSdk.Cloud.Login. More...
 
Promise< DoneLink (LoginNetwork network, string networkId, string networkSecret)
 
Promise< DoneUnlink (string network)
 Unlinks the account with a social network. More...
 
Promise< DoneUnlink (LoginNetwork network)
 
Promise< DoneRegisterDevice (string os, string token)
 Meant to be called for push notifications. More...
 
Promise< DoneUnregisterDevice (string os, string token)
 Unregisters a previously registered device (see RegisterDevice). More...
 

Member Function Documentation

◆ ChangeEmailAddress()

Promise<Done> CotcSdk.GamerAccountMethods.ChangeEmailAddress ( string  newEmailAddress)

Changes the e-mail address of the current user. Works for e-mail type accounts.

Returns
Promise resolved when the operation has completed.
Parameters
newEmailAddressThe new e-mail address to be used for signing in.

◆ ChangePassword()

Promise<Done> CotcSdk.GamerAccountMethods.ChangePassword ( string  newPassword)

Changes the password of the current user. Works for e-mail type accounts.

Returns
Promise resolved when the operation has completed.
Parameters
newPasswordThe new password to be used for signing in.

◆ Convert()

Promise<Done> CotcSdk.GamerAccountMethods.Convert ( string  network,
string  networkId,
string  networkSecret,
Bundle  options = null 
)

Converts the account to sign in through another network. For instance, you might have created an anonymous account, that you later want to convert to an account logged on through a facebook account. Or, should you later want to convert this account to simply use an e-mail address, this is the method that you will want to call. In order to convert the account successfully, the provided network credentials need to be acceptable, just as when calling CotcSdk.Cloud.Login.

Returns
Promise resolved when the operation has completed.
Parameters
networkThe target network to connect with later on.
networkIdThe ID on the network. For example, with the facebook network, this would be the User ID. On e-mail accounts e-mail then, this would be the e-mail address.
networkSecretThe secret for the network. For e-mail accounts, this would be the passord. For facebook or other SNS accounts, this would be the user token.
optionsAn optional JSON to customize the convert process.

◆ Link()

Promise<Done> CotcSdk.GamerAccountMethods.Link ( string  network,
string  networkId,
string  networkSecret,
Bundle  options = null 
)

Links the account with another social network. Note that unlike Convert, this doesn't change the way the user would then sign in (the credentials remain the same). For instance, one may want to link their facebook account while keeping e-mail credentials in order to be able to share and play against gamers from their facebook social circle. In order to link the account successfully, the provided network credentials need to be acceptable, just as when calling CotcSdk.Cloud.Login.

Returns
Promise resolved when the operation has completed.
Parameters
networkThe target network to link the account with.
networkIdThe ID on the network. For example, with the facebook network, this would be the User ID. On e-mail accounts e-mail then, this would be the e-mail address.
networkSecretThe secret for the network. For e-mail accounts, this would be the passord. For facebook or other SNS accounts, this would be the user token.
optionsAn optional JSON to customize the convert process.

◆ RegisterDevice()

Promise<Done> CotcSdk.GamerAccountMethods.RegisterDevice ( string  os,
string  token 
)

Meant to be called for push notifications.

Parameters
osOperating system (should be determined by the native implementation: "ios", "android", "macos", …).
tokenPush notification token (device specific).

◆ Unlink()

Promise<Done> CotcSdk.GamerAccountMethods.Unlink ( string  network)

Unlinks the account with a social network.

Returns
Promise resolved when the operation has completed.
Parameters
networkThe target network to unlink the account from.

◆ UnregisterDevice()

Promise<Done> CotcSdk.GamerAccountMethods.UnregisterDevice ( string  os,
string  token 
)

Unregisters a previously registered device (see RegisterDevice).

Parameters
osOperating system (should be determined by the native implementation: "ios", "android", "macos", …).
tokenPush notification token (device specific).