flickr.people.getInfo and gender

Topics: Developer Forum
Oct 21, 2009 at 10:17 AM

Hi Folks,

I'm perplexed by flickr.people.getInfo.

In the documentation at http://www.flickr.com/services/api/flickr.people.getInfo.html the example response does not contain the attribute "gender", and nor does the returned FlickrNet api type 'person'. But the actual response (sometimes?) does. Here's an example response:

<person id="10973297@N00" nsid="10973297@N00" isadmin="0" ispro="1" iconserver="48" iconfarm="1" path_alias="ndybisz" gender="F" ignored="0" contact="1" friend="1" family="0" revcontact="0" revfriend="0" revfamily="0">
  <username>Miss Aniela</username> 
  <realname>N. A. Dybisz</realname> 
  <location>Brighton, UK</location> 
  <photosurl>http://www.flickr.com/photos/ndybisz/</photosurl> 
  <profileurl>http://www.flickr.com/people/ndybisz/</profileurl> 
  <mobileurl>http://m.flickr.com/photostream.gne?id=3052550</mobileurl> 
  <photos>
  <firstdatetaken>2004-09-01 12:52:02</firstdatetaken> 
  <firstdate>1146490467</firstdate> 
  <count>524</count> 
  </photos>
</person>

Can I access a persons gender attribute within the FlickrNet API? How? If not where would I add code to enhance the person class?

Cheers,

Tim.

Coordinator
Oct 21, 2009 at 11:30 AM

It always hard to keep up with these changes, especially when they are effectively undocumented.

I've added support for the Gender property to the Person object - although it is only returned for an authenticated call, and I couldn't get it to work for my own account (although the one you detail above works fine).

Sam

 

Oct 22, 2009 at 7:04 AM

Thanks Sam - that's perfect. In the field's comment you wrote:

No idea what purpose this field serve

Isn't it just to record the gender declared by the user when setting up their flickr account?

Cheers,

Tim.

 

Coordinator
Oct 22, 2009 at 7:07 AM

Cut and paste error.

Oct 22, 2009 at 7:11 AM

That makes sense. I've just noticed that the field "Count" (which records the number of photos a user has uploaded) is also missing from Person.cs.

Cheers,

Tim.

Coordinator
Oct 22, 2009 at 7:17 AM

No, it's there, its just hidden very well. Person.PhotosSummary.PhotoCount.