private async void loadDataAsync() { RestfulClient <List <CalendarModel> > recommendListRest = new RestfulClient <List <CalendarModel> >("/piazza/most-subscribed"); recommendListRest.AddParameter("size", "500"); RestfulClient <List <CalendarModel> > allListRest = new RestfulClient <List <CalendarModel> >("/piazza/all"); allListRest.AddParameter("size", "500"); this.recommendListData = await recommendListRest.GetResponse(); this.allListData = await allListRest.GetResponse(); Console.Write("ended"); Console.Write(allListData[0]); for (int i = 0; i < this.recommendListData.Count; i++) { this.recommendList.Items.Add(new SqureCard(recommendListData[i])); } for (int i = 0; i < this.allListData.Count; i++) { this.allList.Items.Add(new SqureCard(allListData[i])); } }
private async void loadDataAsync() { RestfulClient <List <TodayResponse> > subListRest = new RestfulClient <List <TodayResponse> >("/calendar/subscribed"); subListRest.AddParameter("size", "500"); this.subscribeListData = await subListRest.GetResponse(); Console.WriteLine(subscribeListData.Count); for (int i = 0; i < this.subscribeListData.Count; i++) { if (subscribeListData[i].calendarPicture != null) { this.subscribeList.Items.Add(new SqureCard(subscribeListData[i])); } } }