public void AddItem(ReadingListItem item, string text)
 {
     AddItem(item.Title,
             "",
             "SampleData/Images/LightGray.png",
             "",
             item.Url,
             "",
             "",
             text);
 }
        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);
        }
Example #3
0
        public async Task <DiffbotArticle> GetText(ReadingListItem item)
        {
            var result = await GetText(item.Url);

            return(result);
        }