Topics: Developer Forum, Project Management Forum, User Forum
Mar 27, 2010 at 12:52 PM



I am using this API call, but the results are impredictable ! In fact when you parse the result from Flickr, you try to get the description element of the Photo entity.

But in this case, this data is only present  if you put the extra_search info to 'description'. This is also true for any optional data (if any) of this request, or for all flickr api.




Mar 27, 2010 at 1:06 PM


When you say 'unpredictable' what do you mean? You are correct that certain properties of the Photo instance will only have a value if you ask for them, but this is therefore predicable - i.e. if you ask for it it will be there, if you don't it wont.

If you think the FlickrNet library could do something to better handle this situation then please let me know.


Mar 29, 2010 at 7:46 PM



'Unpredictable' means some items but not all the items, in any order. In fact, in this request I don't ask for the value 'description' which is not in the response. But as , in your code, you try to parse this element that consumes the next xml token which may be is a <Photo> node ...

Hope I am enough clear ?




Mar 29, 2010 at 8:54 PM

All of the code that parses the response from Flickr is conditional.

The code that sets the description reads as follows:


if (reader.LocalName == "description")
    Description = reader.ReadElementContentAsString();

This only moves the XmlReader on if the current element is a description element. Otherwise it leaves it where it is and is processed for this Photo instances ends.

There are numerous unit tests that double check this is working correctly (i.e. if you ask for 10 photos you get 10 back) as it did take me a while to get it right, but as such I can guarantee you that it does not 'skip' photo elements at all.



Mar 30, 2010 at 9:21 PM



I ve downloaded the last version and everything works fine !


Thanks !