예제 #1
0
 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);
     }
 }
예제 #2
0
 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);
     }
 }
예제 #3
0
 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);
     }
 }
예제 #4
0
 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);
     }
 }