// Account Informationen
    public void GetAccountInfo()
    {
        var request = new GetAccountInfoRequest();

        // Send request to PlayfabAPI
        PlayFabClientAPI.GetAccountInfo(request, OnGetAccountInfoSuccess, OnPlayFabError);
    }
    public static void GetAccountInfo(string _playfabId)
    {
        GetPlayerCombinedInfoRequestParams paramInfo = new GetPlayerCombinedInfoRequestParams()
        {
            GetTitleData           = true,
            GetUserInventory       = true,
            GetUserAccountInfo     = true,
            GetUserVirtualCurrency = true,
            GetPlayerProfile       = true,
            GetPlayerStatistics    = true,
            GetUserData            = true,
            GetUserReadOnlyData    = true
        };

        GetPlayerCombinedInfoRequest request = new GetPlayerCombinedInfoRequest()
        {
            PlayFabId             = _playfabId,
            InfoRequestParameters = paramInfo
        };

        PlayFabClientAPI.GetPlayerCombinedInfo(request, OnGotAccountInfo, OnAPIError);

        // Build the request, in this case, there are no parameters to set
        GetAccountInfoRequest req = new GetAccountInfoRequest();

        // Send the request, and provide 2 callbacks for when the request succeeds or fails
        PlayFabClientAPI.GetAccountInfo(req, OnGetAccountInfoSuccess, OnAPIError);
    }
Beispiel #3
0
    public void GetData()
    {
        GetAccountInfoRequest request = new GetAccountInfoRequest();

        PlayFabClientAPI.GetAccountInfo(request, Success,
                                        error => Debug.LogError(error.GenerateErrorReport()));
    }
Beispiel #4
0
 void NoContactEmail(string playfabID, string email = null)
 {
     Debug.Log("User doesnt have contact email");
     if (string.IsNullOrEmpty(email))
     {
         var infoRequest2 = new GetAccountInfoRequest {
             PlayFabId = playfabID
         };
         PlayFabClientAPI.GetAccountInfo(infoRequest2, InfoResult =>
         {
             if (InfoResult.AccountInfo.PrivateInfo.Email != null)
             {
                 AddOrUpdateContactEmail(InfoResult.AccountInfo.PrivateInfo.Email);
             }
             else
             {
                 ShowNoEmailAssosiated();
                 Debug.Log("There is no email");
             }
         }, InfoError => { });
     }
     else
     {
         AddOrUpdateContactEmail(email);
     }
 }
    private void OnLoginSuccess(LoginResult result)
    {
        // Get Entity Information
        entityId   = result.EntityToken.Entity.Id;
        entityType = result.EntityToken.Entity.Type;

        // Get Account info to see if user has a linked account.
        var request = new GetAccountInfoRequest {
            PlayFabId = result.PlayFabId
        };

        PlayFabClientAPI.GetAccountInfo(request,
                                        resultA => {
            // If no linked account show the link account panel.
            if (resultA.AccountInfo.Username == "" || resultA.AccountInfo.Username == null &&
                (!PlayerPrefs.HasKey("LINK_ACCOUNT_REMINDER") || PlayerPrefs.GetInt("LINK_ACCOUNT_REMINDER") == 1))
            {
                panel.SetActive(true);
            }
        },
                                        error => { Debug.LogError(error.GenerateErrorReport()); });

        // Get object of title entity.
        var getRequest = new GetObjectsRequest {
            Entity = new EntityKey {
                Id = entityId, Type = entityType
            }
        };

        PlayFabDataAPI.GetObjects(getRequest,
                                  r => {
            // If user has no pc yet, create one with the server function.
            if (!r.Objects.ContainsKey("pc1"))
            {
                var cloudscriptrequest = new ExecuteEntityCloudScriptRequest {
                    FunctionName = "createFirstComputer", GeneratePlayStreamEvent = true
                };
                PlayFabCloudScriptAPI.ExecuteEntityCloudScript(cloudscriptrequest,
                                                               re => {
                    GameManager.gm.SetComputer("cpu1", "mem1");
                },
                                                               error => { Debug.LogError(error.GenerateErrorReport()); });
            }
            else
            {
                JsonObject jsonResult = (JsonObject)r.Objects["pc1"].DataObject;

                GameManager.gm.SetComputer(jsonResult["cpu"].ToString(), jsonResult["memory"].ToString());
            }

            // A way to loop through dictionary.

            /*foreach(KeyValuePair<string, ObjectResult> obj in r.Objects)
             * {
             *  Debug.Log(obj.Key);
             *  Debug.Log(obj.Value.ObjectName);
             * }*/
        },
                                  error => { });
    }
Beispiel #6
0
        private static void LoadTest()
        {
            MainServer.LoadConfig();
            int threadCount = 0;

            while (true)
            {
                for (int i = 0; i < 250; i++)
                {
                    new Thread(() =>
                    {
                        while (true)
                        {
                            ApiServer server = ApiServer.CreateDummy();
                            server.Account   = new Account
                            {
                                IsOnline = true
                            };
                            GetAccountInfoRequest request = new GetAccountInfoRequest(ApiRequestId.GetAccountInfo, "asdf");
                            request.Process(server);
                            Thread.Sleep(1000);
                        }
                    }).Start();
                    threadCount++;
                    Console.WriteLine("Simulating " + threadCount.ToString() + " users ...");
                }
                Thread.Sleep(30000);
            }
        }
    public void GetAccountInfo()
    {
        GetAccountInfoRequest request = new GetAccountInfoRequest();

        request.Username = username.text;
        PlayFabClientAPI.GetAccountInfo(request, Successs, fail);
    }
    void GetPlayerName()
    {
        playFabmanager.LoadingMessage("Loading DisplayName...");
        var request = new GetAccountInfoRequest();

        PlayFabClientAPI.GetAccountInfo(request, InfoSuccess, InfoFailed);
    }
Beispiel #9
0
    void Start()
    {
        GetAccountInfoRequest acc = new GetAccountInfoRequest();

        PlayFabClientAPI.GetAccountInfo(acc, success, fail);
        inv = Player.LocalPlayerInstance.GetComponent <Player>().inventory;
        StartCoroutine(InitializeInventory());
    }
Beispiel #10
0
        /// <summary>
        /// Get account information from server
        /// </summary>
        /// <param name="_successufulCallback"></param>
        /// <param name="_errorCallback"></param>
        public static void GetAccountInfo(Action <GetAccountInfoResult> _successufulCallback, Action <PlayFabError> _errorCallback = null)
        {
            var request = new GetAccountInfoRequest();

            PlayFabClientAPI.GetAccountInfo(request, _successufulCallback, error => {
                _errorCallback?.Invoke(error);
            });
        }
Beispiel #11
0
    private void CIDRequest(LoginResult result)
    {
        var accountRequest = new GetAccountInfoRequest {
            Username = username
        };

        PlayFabClientAPI.GetAccountInfo(accountRequest, AccountTaken, AccountAvailable);
    }
Beispiel #12
0
    private void OnLoginSuccess(LoginResult result)
    {
        Debug.Log("Logged In");
        var req = new GetAccountInfoRequest();

        PlayFabClientAPI.GetAccountInfo(req, OnGetAccountInfoSuccess, OnPlayFabCallbackError);
        DownloadData();
    }
Beispiel #13
0
    public void PullInfoFromServer()
    {
        var req = new GetAccountInfoRequest {
            PlayFabId = base.GetPlayFabId()
        };

        PlayFabClientAPI.GetAccountInfo(req, OnGetInfoSucceed, OnGetInfoFailed);
    }
Beispiel #14
0
    void GetUserName()
    {
        var request = new GetAccountInfoRequest
        {
            Email = emailInputFieldLogin.text
        };

        PlayFabClientAPI.GetAccountInfo(request, OnSuccessRetrive, OnError);
    }
Beispiel #15
0
        public void AccountInfo(UUnitTestContext testContext)
        {
            var request = new GetAccountInfoRequest
            {
                PlayFabId = PlayFabId
            };

            PlayFabClientAPI.GetAccountInfo(request, PlayFabUUnitUtils.ApiActionWrapper <GetAccountInfoResult>(testContext, AcctInfoCallback), PlayFabUUnitUtils.ApiActionWrapper <PlayFabError>(testContext, SharedErrorCallback), testContext, testTitleData.extraHeaders);
        }
Beispiel #16
0
        public void AccountInfo(UUnitTestContext testContext)
        {
            var request = new GetAccountInfoRequest
            {
                PlayFabId = PlayFabId
            };

            clientInstance.GetAccountInfo(request, PlayFabUUnitUtils.ApiActionWrapper <GetAccountInfoResult>(testContext, AcctInfoCallback), PlayFabUUnitUtils.ApiActionWrapper <PlayFabError>(testContext, SharedErrorCallback), testContext);
        }
Beispiel #17
0
    public void GetPlayerAccount(string playfabId)
    {
        var request = new GetAccountInfoRequest
        {
            PlayFabId = playfabId
        };

        PlayFabClientAPI.GetAccountInfo(request, OnGetAccountInfoSuccess, OnError);
    }
Beispiel #18
0
        public void AccountInfo(UUnitTestContext testContext)
        {
            var request = new GetAccountInfoRequest {
                PlayFabId = PlayFabSettings.staticPlayer.PlayFabId
            };
            var accountTask = clientApi.GetAccountInfoAsync(request, null, testTitleData.extraHeaders);

            ContinueWithContext(accountTask, testContext, LeaderBoardContinued, true, "Failed to get accountInfo", true);
        }
Beispiel #19
0
    public void GetAccountInfo()
    {
        var request = new GetAccountInfoRequest()
        {
            Email = userEmail
        };

        PlayFabClientAPI.GetAccountInfo(request, GetAccountInfoSuccess, GetAccountInfoFailure);
    }
Beispiel #20
0
        public void AccountInfo(UUnitTestContext testContext)
        {
            var request = new GetAccountInfoRequest {
                PlayFabId = PlayFabId
            };
            var accountTask = PlayFabClientAPI.GetAccountInfoAsync(request);

            ContinueWithContext(accountTask, testContext, LeaderBoardContinued, true, "Failed to get accountInfo", true);
        }
        public void AccountInfo()
        {
            GetAccountInfoRequest request = new GetAccountInfoRequest();

            request.PlayFabId = playFabId;
            PlayFabClientAPI.GetAccountInfo(request, AcctInfoCallback, SharedErrorCallback);
            WaitForApiCalls();

            UUnitAssert.Equals("Enums tested", lastReceivedMessage);
        }
Beispiel #22
0
    void Start()
    {
        PhotonNetwork.AutomaticallySyncScene = true;
        playerName    = PlayerPrefs.GetString("Email");
        roomName.text = "abc";

        GetAccountInfoRequest acc = new GetAccountInfoRequest();

        PlayFabClientAPI.GetAccountInfo(acc, success, fail);
    }
Beispiel #23
0
        public void AccountInfo()
        {
            GetAccountInfoRequest request = new GetAccountInfoRequest();

            request.PlayFabId = playFabId;
            var task = PlayFabClientAPI.GetAccountInfoAsync(request);

            WaitForResultSuccess(task, "Failed to get accountInfo");
            UUnitAssert.True(Enum.IsDefined(typeof(UserOrigination), task.Result.Result.AccountInfo.TitleInfo.Origination.Value), "Origination Enum not valid");
        }
Beispiel #24
0
    private void OnLoginSuccess(LoginResult result)
    {
        Debug.Log("Congratulations, you made your first successful API call!");
        loginPanel.SetActive(false);

        PlayerPrefs.SetString("EMAIL", userEmail);
        PlayerPrefs.SetString("PASSWORD", userPassword);
        PhotonNetwork.JoinLobby();
        PlayFab.ClientModels.GetAccountInfoRequest getAccountInfoRequest = new GetAccountInfoRequest();
        PlayFab.PlayFabClientAPI.GetAccountInfo(getAccountInfoRequest, resultCallback, OnRegisterFailure, null, null);
    }
Beispiel #25
0
    private void OnLoginSuccess(LoginResult result)
    {
        myID = result.PlayFabId;
        print("로그인 성공");
        //var request = new GetAccountInfoRequest { Email = EmailInput.text };
        var request = new GetAccountInfoRequest {
            Username = LoginUsernameInput.text
        };

        PlayFabClientAPI.GetAccountInfo(request, GetAccountSuccess, (error) => print("실패"));
    }
Beispiel #26
0
        public async Task <L2Response> GetAccountInfo(string username)
        {
            var loginRequest = new GetAccountInfoRequest
            {
                Username = username
            };

            var responseObject = await loginRequest.SendPostRequest <GetAccountInfoResponse>();

            return(responseObject);
        }
Beispiel #27
0
    private void OnLoginSuccessPlayfab(LoginResult result)
    {
        Debug.Log("Sucessfull Login to Playfab");
        playfabToken = result.EntityToken;
        var request = new GetAccountInfoRequest {
            PlayFabId = result.PlayFabId
        };

        PlayFabClientAPI.GetAccountInfo(request, OnAccountInfoSucess, OnAPIFailure);
        Debug.Log("f");
    }
Beispiel #28
0
    public override void Execute()
    {
        if (_args is GetAccountInfoCommandArgs getAccountInfoArgs)
        {
            var request = new GetAccountInfoRequest
            {
                PlayFabId = getAccountInfoArgs.PlayFabId
            };

            PlayFabClientAPI.GetAccountInfo(request, OnGotAccountInfo, OnHttpError);
        }
    }
Beispiel #29
0
    //###########################################################################################################
    //Check if user email password are stored
    //###########################################################################################################
    public void onCheckUserDetails(string sPlayFabID)
    {
        //NEED TO CHECK IF WE ARE CONNECTED FIRST

        var request = new GetAccountInfoRequest {
            PlayFabId = sPlayFabID
        };

        PlayFabClientAPI.GetAccountInfo(request, OnUserDetailsResult, OnUserDetailsResultError);

        uxPlayFab.HideAllPopups();
    }
Beispiel #30
0
    private void OnLoginSuccess(LoginResult result)
    {
        Debug.Log("로그인 성공");
        PlayerPrefs.SetString("Username", username);

        // 계정정보 받아옴
        var request = new GetAccountInfoRequest {
            Username = username
        };

        PlayFabClientAPI.GetAccountInfo(request, GetAccountSuccess, GetAccountFailure);
    }