//We probably don't need this at all. No need to track IDs -- we can just blast away with wholesale updates for changes public void UpdatePostIds(IEnumerable <BlogPost> blogPosts, string range = "Current!A2:T") { var cells = _plannedPostsSheet.GetCells(range).Pad(20); foreach (var row in cells) { var matchingBlogPost = blogPosts.FirstOrDefault(p => p.Title == row[1].ToString()); row[19] = matchingBlogPost?.Id; } _plannedPostsSheet.UpdateSpreadsheet(range, cells); }
public void AddPosts(IEnumerable <BlogPost> posts) { IList <IList <object> > rows = new List <IList <object> >(); foreach (var post in posts) { IList <object> columnValues = new List <object>() { post.Title, string.Empty, string.Empty, post.Mission, post.TargetPublicationDate }; rows.Add(columnValues); } _clientSheet.UpdateSpreadsheet("asdf", rows); }