Exemplo n.º 1
0
        public async Task <object> Get(DataSourceLoadOptions loadOptions)
        {
            List <Stock> _result = new List <Stock>();

            apiClient.DeveiceType  = device.Desktop;
            apiClient.DeveiceType  = device.Desktop;
            apiClient.ApiKey       = "B538F53B-37F7-4564-B7C5-56AFF399252B";
            apiClient.ClientSecret = "8132ED0B-8F0B-4841-8BF4-CE8438AC0F3E";

            _result = await apiClient.GetStockFromApi(apiClient.ApiKey, apiClient.ClientSecret);

            return(DataSourceLoader.Load(_result, loadOptions));
        }
        public async Task <IActionResult> ReadStock([DataSourceRequest] DataSourceRequest request)
        {
            List <Stock> _result = new List <Stock>();

            _result = await apiClient.GetStockFromApi();

            return(Json(_result.ToDataSourceResult(request)));
        }