Getting More Than One PageCreate a PhotosSearchOptions object to set your search settings
C#
PhotoSearchOptions options = new PhotoSearchOptions();
options.UserId = "1234567@N01"; // Your NSID
options.PerPage = 100; // 100 is the default anyway
VB.Net
Dim options As New PhotoSearchOptions()
options.UserId = "1234567@N01"
options.PerPage = 100
Then return the first, second and third pages
C#
// The following returns the first set of photos
options.Page = 1; // page 1 is the default if Page is not set
PhotoCollection firstSet = flickr.PhotosSearch(options);
options.Page = 2;
PhotoCollection secondSet = flickr.PhotosSearch(options);
options.Page = 3;
PhotoCollection thirdSet = flickr.PhotosSearch(options);
VB.Net
' The following returns the first set of photos
options.Page = 1; // page 1 is the default if Page is not set
Dim firstSet As PhotoCollection = flickr.PhotosSearch(options);
options.Page = 2;
Dim secondSet As PhotoCollection = flickr.PhotosSearch(options);
options.Page = 3;
Dim thirdSet As PhotoCollection = flickr.PhotosSearch(options);
Finally, you can merge these photos into one photo collection
C#
List<Photo> mergedCollection = new List<Photo>();
mergedCollection.AddRange(firstSet);
mergedCollection.AddRange(secondSet);
mergedCollection.AddRange(thirdSet);
// And then look through the array of photos.
foreach( Photo p in mergedCollection)
{
Console.WriteLine("Photo title is '" + p.Title + "'");
}
VB.Net
Dim mergedCollection As New List(Of Photo)()
mergedCollection.AddRange(firstSet);
mergedCollection.AddRange(secondSet);
mergedCollection.AddRange(thirdSet);
' And then look through the array of photos.
For Each p As Photo In mergedCollection)
Console.WriteLine("Photo title is '" & p.Title & "'")
Next