Ejemplo n.º 1
0
    public void CalculateExchangeAllForCoins(IBaseNetworkErrorHandler errorHandler)
    {
        APICall <CalculateExchangeForCoinsOperation> aPICall = clubPenguinClient.RewardApi.CalculateExchangeAllForCoins();

        aPICall.OnResponse += onCalculateExchangeAllForCoins;
        aPICall.OnError    += delegate(CalculateExchangeForCoinsOperation o, HttpResponse response)
        {
            NetworkErrorService.OnError(response, errorHandler);
        };
        aPICall.Execute();
    }
    public void GetLocalPlayerData(IBaseNetworkErrorHandler errorHandler)
    {
        APICall <GetLocalPlayerDataOperation> localPlayerData = clubPenguinClient.PlayerApi.GetLocalPlayerData();

        localPlayerData.OnResponse += localPlayerDataReturned;
        localPlayerData.OnError    += delegate(GetLocalPlayerDataOperation o, HttpResponse response)
        {
            Service.Get <EventDispatcher>().DispatchEvent(default(PlayerStateServiceErrors.PlayerProfileError));
            NetworkErrorService.OnError(response, errorHandler);
        };
        localPlayerData.Execute();
    }