public IEnumerable <string> GetRoots() { yield return("/"); // for photos not in a set int page = 1; int maxPages = 1; while (page <= maxPages) { // existing sources gives us a list of photoset ids PhotosetCollection photosets; try { photosets = _flickr.PhotosetsGetList(); maxPages = photosets.Pages; page++; } catch { photosets = new PhotosetCollection(); } foreach (var root in photosets.Select(s => s.PhotosetId + "/")) { yield return(root); } } }
public List <Album> GetAlbums() { PhotosetCollection albums = Flickr.PhotosetsGetList(); List <Album> albumlist = albums.Select(x => Album.CreateAlbum(x)).ToList(); return(albumlist); }
public Albums Convert(PhotosetCollection photosets) { var items = photosets .Select(Convert) .ToArray(); return(new Albums(items)); }
public void RemoveNonExisting(PhotosetCollection setL) { var d = db.Sets.ToList().Where(r => (setL.Select(r1 => r1.PhotosetId).Contains(r.SetsID) == false) && r.UserID == Flickr.User.UserId); db.Sets.RemoveRange(d); db.SaveChanges(); }
public Albums Convert(PhotosetCollection photosets) { var items = photosets .Select(Convert) .ToArray(); return new Albums(items); }
public void PhotosetsOrderSetsArrayTest() { PhotosetCollection mySets = AuthInstance.PhotosetsGetList(); AuthInstance.PhotosetsOrderSets(mySets.Select(myset => myset.PhotosetId)); }