## Person class.

Person class. — Person class.

## Synopsis

    void                flickcurl_free_person               (flickcurl_person *person);
    void                flickcurl_free_persons              (flickcurl_person **persons);
    const char *        flickcurl_get_person_field_label    (flickcurl_person_field_type field);
                        flickcurl_person;
                        flickcurl_person_field;
    enum                flickcurl_person_field_type;

## Description

Person class.

## Details

### flickcurl_free_person ()

    void                flickcurl_free_person               (flickcurl_person *person);

Destructor for person object

`person` : | person object

### flickcurl_free_persons ()

    void                flickcurl_free_persons              (flickcurl_person **persons);

Destructor for array of person object

`persons` : | person object array

### flickcurl_get_person_field_label ()

    const char *        flickcurl_get_person_field_label    (flickcurl_person_field_type field);

Get label for person field

`field` : | field enum
Returns : | label string or NULL if none valid

### flickcurl_person

    typedef struct {
      char *nsid;

      flickcurl_person_field fields[PERSON_FIELD_LAST + 1];
    } flickcurl_person;

A user.

char *`nsid`; | user NSID
flickcurl_person_field `fields`[PERSON_FIELD_LAST + 1]; | person fields

### flickcurl_person_field

    typedef struct {
      char* string;
      flickcurl_person_field_type integer;
      flickcurl_field_value_type type;
    } flickcurl_person_field;

Field of a person structure

char *`string`; | string field value
flickcurl_person_field_type `integer`; | integer field value
flickcurl_field_value_type `type`; | field type

### enum flickcurl_person_field_type

    typedef enum {
      PERSON_FIELD_none,
      PERSON_FIELD_isadmin,               /* boolean */
      PERSON_FIELD_ispro,                 /* boolean */
      PERSON_FIELD_iconserver,            /* integer */
      PERSON_FIELD_iconfarm,              /* integer - not in API docs */
      PERSON_FIELD_username,              /* string */
      PERSON_FIELD_realname,              /* string */
      PERSON_FIELD_mbox_sha1sum,          /* string */
      PERSON_FIELD_location,              /* string */
      PERSON_FIELD_photosurl,             /* string */
      PERSON_FIELD_profileurl,            /* string */
      PERSON_FIELD_mobileurl,             /* string - not in API docs */
      PERSON_FIELD_photos_firstdate,      /* dateTime */
      PERSON_FIELD_photos_firstdatetaken, /* dateTime */
      PERSON_FIELD_photos_count,          /* integer */
      PERSON_FIELD_photos_views,          /* integer - not in API docs */
      PERSON_FIELD_favedate,              /* dateTime - flickr.photos.getFavorites() */
      PERSON_FIELD_FIRST = PERSON_FIELD_isadmin,
      PERSON_FIELD_LAST = PERSON_FIELD_favedate
    } flickcurl_person_field_type;

Fields of a flickcurl_person*

`PERSON_FIELD_none` | internal
`PERSON_FIELD_isadmin` | is admin field boolean
`PERSON_FIELD_ispro` | is pro field boolean
`PERSON_FIELD_iconserver` | icon server integer
`PERSON_FIELD_iconfarm` | icon farm integer
`PERSON_FIELD_username` | username
`PERSON_FIELD_realname` | real name
`PERSON_FIELD_mbox_sha1sum` | Email SHA1 sum
`PERSON_FIELD_location` | location
`PERSON_FIELD_photosurl` | photos URL
`PERSON_FIELD_profileurl` | profile URL
`PERSON_FIELD_mobileurl` | mobile URL
`PERSON_FIELD_photos_firstdate` | photos first date
`PERSON_FIELD_photos_firstdatetaken` | photos first date taken
`PERSON_FIELD_photos_count` | photos count
`PERSON_FIELD_photos_views` | photos views
`PERSON_FIELD_favedate` | favorite date
`PERSON_FIELD_FIRST` | internal offset to first in enum list
`PERSON_FIELD_LAST` | internal offset to last in enum list