public async Task <List <WebBook> > GetData() { var books = await _webApi.GetByKeyword("Xamarin", 6, _nextPage); if (books.Count() < 6) { _nextPage = 0; } else { _nextPage += 6; } return(books.ToList()); }
public async void WidgetPerformUpdate(Action <NCUpdateResult> completionHandler) { try { var books = await _webApi.GetByKeyword("Xamarin", 4, 0); _source.Source.Clear(); foreach (var item in books) { _source.Source.Add(item); } _tableView.ReloadData(); completionHandler(NCUpdateResult.NewData); } catch (Exception ex) { completionHandler(NCUpdateResult.Failed); } }
List <WebBook> GetData() { return(_webApi.GetByKeyword("Xamarin", 4, 0).Result.ToList()); }
public async void OnNavigatedTo(INavigationParameters parameters) { Books = new ObservableCollection <WebBook>(await _webApi.GetByKeyword("Xamarin", 30, 0)); RaisePropertyChanged(nameof(Books)); }