public async Task <BasePost> GetDrashBoardPostAsync() { BasePost[] result; result = await client.GetDashboardPostsAsync(0, 0, 1, PostType.Photo); return(result[0]); }
public async Task <List <BasePost> > GetDashBoardPostAsync() { List <BasePost> result = new List <BasePost>(); if (current == 0) { var basePosts = await client.GetDashboardPostsAsync(current, 0, 1); foreach (var item in basePosts) { result.Add(item); } } else { bool more = true; long k = 0; while (more) { var nextResults = await client.GetDashboardPostsAsync(current, DashboardOption.After, k); more = (nextResults.Count() == 20); foreach (var item in nextResults) { result.Add(item); } k = k + 20; } } if (result.Count() > 0 && current == 0) { current = result[0].Id; } return(result); }
public async Task <BasePost[]> GetDrashBoardPostAsync() { BasePost[] result; result = await client.GetDashboardPostsAsync(current); if (result.Count() > 0) { current = result[result.Count() - 1].Id; } return(result); }
public async Task <PhotoPost> GetDrashBoardPostAsync() { PhotoPost result = null; bool PhotoPostwithExifGefunden = false; while (!PhotoPostwithExifGefunden) { BasePost[] BasePosts = await client.GetDashboardPostsAsync(current, 0, 20, PostType.Photo); foreach (var basePost in BasePosts) { if (basePost.Type == PostType.Photo) { PhotoPost photoPost = basePost as PhotoPost; Console.Clear(); Console.WriteLine($"Search {photoPost.Id}"); if (photoPost.Photo.Exif != null) { PhotoPostwithExifGefunden = true; result = photoPost; break; } } } if (BasePosts.Count() > 0) { current = BasePosts[BasePosts.Count() - 1].Id; } } return(result); }