Frequently Asked Questions

Where do I get a Flickr API Key from

http://www.flickr.com/services/api/keys should get you started.

Why can't I use foreach (For Each in VB.Net) with the Photos object

The Photos class contains a property called PhotoCollection. The PhotoCollection class inherits from CollectionBase and can be used in foreach statements. It can also be implicitly converted to an array of photos.

Photos photos = flickr.PhotosSearch(options);
foreach(Photo photo in photos.PhotoCollection ) // photos.PhotoCollection, NOT just photos
{
    Console.WriteLine(photo.Title);
}


Photo[] photoArray = photos.PhotoCollection;


Why is Photos.TotalPhotos and Photos.PhotoCollection.Length not the same?

Imagine you perform a search on Flickr (say using PhotosSearch method), returning a list of your own photos. If you have 525 photos in your photostream then Photos.TotalPhotos will equal 525. However Flickr will by default only return the first 100 photos into the Photos.PhotoCollection so Photos.PhotoCollection.Length will be 100.

See the ExampleGettingMoreThanOnePage for an further example.

Last edited Aug 23, 2006 at 2:55 PM by samjudson, version 9

Comments

No comments yet.