Client FakeAccount API Reference
Purpose: All methods of this class just help you log in quickly, and experience the functions of PGOS SDK.
API List
| API | Description |
|---|---|
| Login | Log in with the specified account. The FAS account does not need to be registered in advance, it can be any string without line breaks ('\r', '\n') and is managed by the game. |
| AutoLogin | Log in with a local historical account (if there is no historical account, one will be created automatically). |
| CurLoginedUserInfo | Get the simulated account being logged in |
API Details
Login
Log in with the specified account. The FAS account does not need to be registered in advance, it can be any string without line breaks ('\r', '\n') and is managed by the game.
/**
* Log in with the specified account.
* The FAS account does not need to be registered in advance, it can be any string without line breaks ('\r', '\n') and is managed by the game.
*
* @param account FAS account, if the account is empty, then will use a local historical account.
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void Login(
const pgos::pstring& account,
PgosDataCallback<FasLoginInfo> result_callback);
Parameters:
| Param | Type | Description |
|---|---|---|
| account | const std::string& | FAS account, if the account is empty, then will use a local historical account. |
| result_callback | PgosDataCallback<FasLoginInfo> | The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD. |
Return: void
AutoLogin
Log in with a local historical account (if there is no historical account, one will be created automatically).
/**
* Log in with a local historical account (if there is no historical account, one will be created automatically).
*
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void AutoLogin(
PgosDataCallback<FasLoginInfo> result_callback);
Parameters:
| Param | Type | Description |
|---|---|---|
| result_callback | PgosDataCallback<FasLoginInfo> | The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD. |
Return: void
CurLoginedUserInfo
Get the simulated account being logged in
/**
* Get the simulated account being logged in
*
* @return The data of the simulated account
*/
const FasLoginInfo* CurLoginedUserInfo();
Parameters:
(No parameters)
Return: const FasLoginInfo*
The data of the simulated account