public void MigrateLegacy(CPIDCredentials cpidCreds)
    {
        APICall <MigrateLegacyAccountOperation> aPICall = clubPenguinClient.PlayerApi.MigrateLegacyAccount(cpidCreds);

        aPICall.OnResponse += migrationSuccessful;
        aPICall.OnError    += handleCPResponseError;
        aPICall.OnError    += migrationError;
        aPICall.Execute();
    }
Esempio n. 2
0
    public void Login(DLoginPayload payload)
    {
        CPIDCredentials cpidCreds = default(CPIDCredentials);

        cpidCreds.username = payload.Username;
        cpidCreds.password = payload.Password;
        Service.Get <EventDispatcher>().AddListener <PlayerStateServiceEvents.MigrationDataRecieved>(onLoginSuccess);
        Service.Get <EventDispatcher>().AddListener <PlayerStateServiceErrors.LegacyAccountMigrationError>(onLoginFailed);
        if (networkServiceManager != null)
        {
            if (networkServiceManager.PlayerStateService != null)
            {
                networkServiceManager.PlayerStateService.MigrateLegacy(cpidCreds);
            }
            else
            {
                Log.LogError(this, "networkServiceManager.PlayerStateService not initialized for classic migration login");
            }
        }
        else
        {
            Log.LogError(this, "NetworkServiceManager not initialized for classic migration login");
        }
    }
Esempio n. 3
0
    public APICall <MigrateLegacyAccountOperation> MigrateLegacyAccount(CPIDCredentials cpidCreds)
    {
        MigrateLegacyAccountOperation operation = new MigrateLegacyAccountOperation(cpidCreds);

        return(new APICall <MigrateLegacyAccountOperation>(clubPenguinClient, operation));
    }
 public MigrateLegacyAccountOperation(CPIDCredentials cpidCreds)
 {
     RequestBody = cpidCreds;
 }