static void Main(string[] args) { Tumblr tumblr = new Tumblr(); bool cancel = false; // the last Posts of Dashboard Console.WriteLine("The last Post from Dashboard"); Console.WriteLine(); List <BasePost> basePosts = tumblr.GetDashBoardPostAsync().GetAwaiter().GetResult(); foreach (var basePost in basePosts) { Console.WriteLine($"Post from {basePost.BlogName} with ID {basePost.Id.ToString()}"); Console.WriteLine(); } Console.WriteLine("++++ newer posts ++++"); Console.WriteLine(); int k = 1; while (!cancel) { basePosts = tumblr.GetDashBoardPostAsync().GetAwaiter().GetResult(); if (basePosts.Count() < 1) { Console.WriteLine($"not found"); Console.WriteLine(); } foreach (var basePost in basePosts) { Console.WriteLine($"{k.ToString()}. Post from {basePost.BlogName} with ID {basePost.Id.ToString()}"); Console.WriteLine(); k++; } Console.Write("search newer posts? (*/n) "); var key = Console.ReadKey(); Console.WriteLine(); Console.WriteLine(); if (key.KeyChar == 'n') { cancel = true; } else { k = 1; } } }
static void Main(string[] args) { Tumblr tumblr = new Tumblr(); PhotoPost photoPost = tumblr.GetDrashBoardPostAsync().GetAwaiter().GetResult(); Console.WriteLine(photoPost.Photo.Caption); Console.WriteLine(photoPost.Photo.OriginalSize.ImageUrl); Console.WriteLine("Camera: " + photoPost.Photo.Exif.Camera); Console.WriteLine("Exposure: " + photoPost.Photo.Exif.Exposure); Console.WriteLine("Aperture: " + photoPost.Photo.Exif.Aperture); Console.WriteLine("Iso: " + photoPost.Photo.Exif.ISO); Console.WriteLine("FocalLength: " + photoPost.Photo.Exif.FocalLength); Console.ReadKey(); }