Example #1
0
 public async Task<List<CatalogTitleModel>> RefreshNetlixMyList()
 {
   List<CatalogTitleModel> CTM = new List<CatalogTitleModel>();
   NetflixRequest request = new NetflixRequest(NetflixConfig.ConsumerKey, NetflixConfig.ConsumerSecret,
                                               _auth.Token, _auth.Secret);
   // override the default of 25 results - 100 is the max allowed
   request.AddQueryParameter("max_results", "100");
   string requestUrl = Constants.baseAPIUrl + _auth.UserID + "/queues/instant/available";
   XmlDocument xDoc;
   try
   {
     xDoc = await request.ProtectedRequestXml(requestUrl, "GET");
   }
   catch (Exception ex)
   {
    // System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Default;
    // System.Windows.Forms.MessageBox.Show("error loading queue " + ex.Message);
     return null;
   }
   QueueTitleObjectMap QTOM = new QueueTitleObjectMap();
   LinqToXmlQuery LXQ = new LinqToXmlQuery();
   var queryResults = LXQ.QueryData(xDoc);
   CTM = await Task.Run(() => QTOM.MapObject(queryResults));
   return CTM;
 }
Example #2
0
 private List<CatalogTitleModel> personRequest(string searchRequest)
 {
   List<CatalogTitleModel> CTM = new List<CatalogTitleModel>();
   CatalogTitleObjectMap CTOM = new CatalogTitleObjectMap();
   LinqToXmlQuery LXQ = new LinqToXmlQuery();
   var queryResults = LXQ.QueryData(filePath, "catalog_title", "link", "people", searchRequest, 20);
   CTM = CTOM.MapObject(queryResults);
   return CTM;
 }
Example #3
0
        public List<WeatherModel> RefreshWeatherData(string location)
        {
            List<WeatherModel> WM = new List<WeatherModel>();
              WeatherObjectMap WOM = new WeatherObjectMap();
              LinqToXmlQuery LXQ = new LinqToXmlQuery();

              var queryResults = LXQ.QueryData("http://weather.yahooapis.com/forecastrss?w=" + location);
              WM = WOM.MapObject(queryResults);
              return WM;
        }