Photos List

## Photos List Photos List — Photos List. |

## Synopsis

                        flickcurl_photos_list;
                        flickcurl_photos_list_params;
    int                 flickcurl_photos_list_params_init   (flickcurl_photos_list_params *list_params);
    void                flickcurl_free_photos_list          (flickcurl_photos_list *photos_list);

## Description

Photos List.

## Details

### flickcurl_photos_list

    typedef struct {
      char *format;
      flickcurl_photo** photos;
      int photos_count;
      char* content;
      size_t content_length;
    } flickcurl_photos_list;

Photos List result.

char *`format`; | requested content format or NULL if a list of photos was wanted. On the result from API calls this is set to the requested feed format or "xml" if none was given.
flickcurl_photo **`photos`; | list of photos if `format` is NULL. Also may be NULL on failure.
int `photos_count`; | number of photos in `photos` array if `format` is NULL. Undefined on failure
char *`content`; | raw content if `format` is not NULL. Also may be NULL on failure.
size_t `content_length`; | size of `content` if `format` is not NULL. Undefined on failure

### flickcurl_photos_list_params

    typedef struct {
      /* NOTE: Bump @version and update
       * flickcurl_photos_list_params_init() when adding fields
       */
      int version; /* 1 */
      const char* format;
      const char* extras;
      int per_page;
      int page;
    } flickcurl_photos_list_params;

Photos List API parameters for multiple functions that return a flickcurl_photos_list

Use `flickcurl_get_extras_format_info()` to enumerate the list of known extra values and `flickcurl_get_feed_format_info()` to enumerate the list of known format values.

int `version`; | structure version (currently 1)
const char *`format`; | Feed format. If given, the photos list result will return raw content. This paramter is EXPERIMENTAL as annouced 2008-08-25 http://code.flickr.com/blog/2008/08/25/api-responses-as-feeds/ The current formats are `feed-rss_100` for RSS 1.0, `feed-rss_200` for RSS 2.0, `feed-atom_10` for Atom 1.0, `feed-georss` for RSS 2.0 with GeoRSS and W3C Geo for geotagged photos, `feed-geoatom` for Atom 1.0 with GeoRSS and W3C Geo for geotagged photos, `feed-geordf` for RSS 1.0 with GeoRSS and W3C Geo for geotagged photos, `feed-kml` for KML 2.1, `feed-kml_nl` for KML 2.1 network link (or NULL)
const char *`extras`; | A comma-delimited list of extra information to fetch for each returned record. Currently supported fields are: `license`, `date_upload`, `date_taken`, `owner_name`, `icon_server`, `original_format`, `last_update`, `geo`, `tags`, `machine_tags`. `'media` will return an extra media=VALUE for VALUE "photo" or "video". API addition 2008-04-07. (or NULL)
int `per_page`; | Number of photos to return per page. If this argument is omitted, it defaults to 100. The maximum allowed value is 500. (or < 0)
int `page`; | The page of results to return. If this argument is omitted, it defaults to 1. (or < 0)

### flickcurl_photos_list_params_init ()

    int                 flickcurl_photos_list_params_init   (flickcurl_photos_list_params *list_params);

Initialise an existing photos list parameter structure

`list_params` : | photos list params to init
Returns : | non-0 on failure

### flickcurl_free_photos_list ()

    void                flickcurl_free_photos_list          (flickcurl_photos_list *photos_list);

Destructor for photos list

`photos_list` : | photos list object