public void AddItem(ReadingListItem item, string text)
 {
     AddItem(item.Title,
         "",
         "SampleData/Images/LightGray.png",
         "",
         item.Url,
         "",
         "",
         text);
 }
예제 #2
0
        public async Task<DiffbotArticle> GetText(ReadingListItem item)
        {
            var result = await GetText(item.Url);

            return result;
        }
        public void AddItem(ReadingListItem item, DiffbotArticle article)
        {
            string url = "";

            try
            {
                foreach (var image in article.Media.Where(image => image.Primary && image.Type == "image"))
                {
                    url = image.Url;
                }

                if (String.IsNullOrEmpty(url))
                {
                    foreach (var image in article.Media.Where(image => image.Type == "image"))
                    {
                        url = image.Url;
                    }
                }

                if (String.IsNullOrEmpty(url))
                {
                    return;
                }
            } 
            catch (Exception)
            {
                Debug.WriteLine("Caught exception in AddItem()");   
            }

            AddItem(article.Title,
                "",
                "",
                url,
                article.Url,
                "",
                "",
                article.Html);
        }