public SocialMediaItem(RSSItem item) { this.Source = "YOUTUBE"; this.Id = item.Id; //this.FromUserId = item.from_id; this.FromUser = item.Authors; //this.FromUserPicture = item.picture; this.Link = item.Links; this.Title = item.Title; this.Text = item.Summary; this.PublishDate = item.PublishDate; this.LastUpdate = item.LastUpdatedTime; }
internal List<Hashtable> GetData(Context context, Expression where, ListSelect fieldNames) { List<Hashtable> list = new List<Hashtable>(); SyndicationFeed s = new SyndicationFeed(); using (XmlTextReader reader = new XmlTextReader(url)) { SyndicationFeed client = SyndicationFeed.Load(reader); foreach (SyndicationItem rItem in client.Items) { RSSItem item = new RSSItem(rItem); if (item.Filter(context, where)) { Hashtable ht = new Hashtable(); foreach (Select field in fieldNames) ht[field.Alias] = field.Field.Calculate(context);//context.Variables[fieldName]; list.Add(ht); } } return list; } }