コード例 #1
0
        public async Task <Answer> NetworkRequest(TaskType type, AuthData authData, Dictionary <string, object> filterparams)
        {
            if (!Initialized)
            {
                Init(baseUrl);
            }
            Answer answer = null;

            switch (type)
            {
            //case TaskType.Login:
            //    //TODO Login
            //    break;
            case TaskType.Getdashboard:
                answer = await api.Getdashboard(authData);

                break;

            case TaskType.Cards:
                answer = await api.Cards(filterparams, authData);

                break;

            case TaskType.Transactions:
                answer = await api.Transactions(filterparams, authData);

                break;

            case TaskType.Settlements:
                answer = await api.Settlements(filterparams, authData);

                break;

            case TaskType.ArchiveLimits:
                answer = await api.ArchiveLimits(filterparams, authData);

                break;

            case TaskType.ARchiveCardBlock:
                answer = await api.ARchiveCardBlock(filterparams, authData);

                break;

            case TaskType.ArchiveCards:
                answer = await api.ArchiveCards(filterparams, authData);

                break;

            case TaskType.DictionaryLimits:
                answer = await api.DictionaryLimits(authData);

                break;

            //case TaskType.CheckUserCredentials:
            //    answer = await api.CheckUserCredentials(authData);
            //    break;
            case TaskType.OrderKeys:
                answer = await api.OrderKeys(filterparams, authData);

                break;

            case TaskType.MobileAppCode:
                answer = await api.MobileAppCode(authData);

                break;
            }
            return(answer);
        }