private void TokenPage_Loaded(object sender, RoutedEventArgs e) { if (App.UserModel.UserName == ""&&App.UserModel.AccessToken!="N/A") { tokenProgress.IsIndeterminate = true; tokenProgress.Visibility = Visibility.Visible; KaApi apiCall = new KaApi(); RestRequest request = new RestRequest(Constants.UserDetails); apiCall.ExecuteAsync<User>(request, parseUser,true); } }
private void parseTopicTree(List<EntryModel> data) { if (data.Count==0) { KaApi apiCall = new KaApi(); RestRequest request = new RestRequest(Constants.TopicUrl + _Topic); apiCall.ExecuteAsync<EntryModel>(request, parseTopic); } else { ((App)App.Current).RootFrame.Dispatcher.BeginInvoke(new Action<List<EntryModel>,EntryModel>(parseTopicView), data,null); } }
public void loadSubItem(EntryModel item) { if (item.subItems.Count == 0) { KaApi apiCall = new KaApi(); RestRequest request = new RestRequest(Constants.TopicUrl + item.Id + "/videos"); //request.RootElement = "children"; apiCall.ExecuteAsync<List<EntryModel>>(request, parseTopicTree); } }
public void LoadData(string topic) { Topic = topic; if (!isDataLoaded) { KaApi apiCall = new KaApi(); RestRequest request = new RestRequest(Constants.TopicUrl+topic+"/videos"); //request.RootElement = "children"; apiCall.ExecuteAsync<List<EntryModel>>(request, parseTopicTree); } }