static DateTime GetLastVkPost(string domain) { if (domain == null) { return(DateTime.MinValue); } var t = new VKGroup(domain); t.LoadPosts(2); return(t.DTofLastTimePostedWithWall()); }
/// <summary> /// получаем дату последнего поста в вк /// TODO:доделать получение постов и другую херню /// </summary> /// <param name="urls"></param> /// <returns></returns> List <DateTime?> GetVkPostDateTime(List <string> urls) { Console.WriteLine("getting vk info:"); List <DateTime?> vkUrls = new List <DateTime?>(); int i = 1; foreach (var tmp in urls) { DateTime?dt = null; if (!string.IsNullOrEmpty(tmp)) { var vk = new VKGroup(tmp); vk.LoadPosts(2); dt = vk.DTofLastTimePostedWithWall(); Console.WriteLine(i + "/" + 25 + " " + tmp); } vkUrls.Add(dt); } Console.WriteLine("vk finish "); return(vkUrls); }