## Favorites

Favorites — Favorite photos.

## Synopsis

    int                 flickcurl_favorites_add             (flickcurl *fc,
                                                             const char *photo_id);
    flickcurl_photos_list ** flickcurl_favorites_getContext (flickcurl *fc,
                                                             const char *photo_id,
                                                             const char *user_id,
                                                             int num_prev,
                                                             int num_next,
                                                             const char *extras);
    flickcurl_photo **  flickcurl_favorites_getList         (flickcurl *fc,
                                                             const char *user_id,
                                                             const char *extras,
                                                             int per_page,
                                                             int page);
    flickcurl_photos_list * flickcurl_favorites_getList_params
                                                            (flickcurl *fc,
                                                             const char *user_id,
                                                             flickcurl_photos_list_params *list_params);
    flickcurl_photo **  flickcurl_favorites_getPublicList   (flickcurl *fc,
                                                             const char *user_id,
                                                             const char *extras,
                                                             int per_page,
                                                             int page);
    flickcurl_photos_list * flickcurl_favorites_getPublicList_params
                                                            (flickcurl *fc,
                                                             const char *user_id,
                                                             flickcurl_photos_list_params *list_params);
    int                 flickcurl_favorites_remove          (flickcurl *fc,
                                                             const char *photo_id);

## Description

Favorite photos.

## Details

### flickcurl_favorites_add ()

    int                 flickcurl_favorites_add             (flickcurl *fc,
                                                             const char *photo_id);

Adds a photo to a user's favorites list.

Implements flickr.favorites.add (1.0)

`fc` : | flickcurl context
`photo_id` : | The id of the photo to add to the user's favorites.
Returns : | non-0 on failure

### flickcurl_favorites_getContext ()

    flickcurl_photos_list ** flickcurl_favorites_getContext (flickcurl *fc,
                                                             const char *photo_id,
                                                             const char *user_id,
                                                             int num_prev,
                                                             int num_next,
                                                             const char *extras);

Returns next and previous favorites for a photo in a user's favorites.

Implements flickr.favorites.getContext (1.22)

`fc` : | flickcurl context
`photo_id` : | The id of the photo to fetch the context for.
`user_id` : | The user who counts the photo as a favorite.
`num_prev` : | number of previous photos to return (?) (or < 0)
`num_next` : | number of next photos to return (?) (or < 0)
`extras` : | A comma-delimited list of extra information to fetch for each returned record. Currently supported fields are: description, license, date_upload, date_taken, owner_name, icon_server, original_format, last_update, geo, tags, machine_tags, o_dims, views, media, path_alias, url_sq, url_t, url_s, url_m, url_z, url_l, url_o (or NULL)
Returns : | NULL-terminated array of photo lists (prev, next) or non-0 on failure

### flickcurl_favorites_getList ()

    flickcurl_photo **  flickcurl_favorites_getList         (flickcurl *fc,
                                                             const char *user_id,
                                                             const char *extras,
                                                             int per_page,
                                                             int page);

Returns a list of the user's favorite photos.

See `flickcurl_favorites_getList_params()` for details of parameters.

Implements flickr.favorites.getList (1.0)

`fc` : | flickcurl context
`user_id` : | The NSID of the user to fetch the favorites list for. If this argument is omitted, the favorites list for the calling user is returned. (or NULL)
`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. (or NULL)
`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 NULL)
`page` : | The page of results to return. If this argument is omitted, it defaults to 1. (or NULL)
Returns : | non-0 on failure

### flickcurl_favorites_getList_params ()

    flickcurl_photos_list * flickcurl_favorites_getList_params
                                                            (flickcurl *fc,
                                                             const char *user_id,
                                                             flickcurl_photos_list_params *list_params);

Returns a list of the user's favorite photos.

Flickcurl 1.6: Added `list_params` beyond `flickcurl_favorites_getList()` to allow returning raw content if `list_params` is present and field `format` is not NULL as announced 2008-08-25 http://code.flickr.com/blog/2008/08/25/api-responses-as-feeds/

Only photos which the calling user has permission to see are returned.

Optional extra type 'media' that will return an extra media = VALUE for VALUE "photo" or "video". API addition 2008-04-07.

`fc` : | flickcurl context
`user_id` : | The NSID of the user to fetch the favorites list for. If this argument is omitted, the favorites list for the calling user is returned. (or NULL)
`list_params` : | flickcurl_photos_list_params result parameters (or NULL)
Returns : | non-0 on failure

### flickcurl_favorites_getPublicList ()

    flickcurl_photo **  flickcurl_favorites_getPublicList   (flickcurl *fc,
                                                             const char *user_id,
                                                             const char *extras,
                                                             int per_page,
                                                             int page);

Returns a list of favorite public photos for the given user.

See `flickcurl_favorites_getPublicList_params()` for details of parameters.

Implements flickr.favorites.getPublicList (1.0)

`fc` : | flickcurl context
`user_id` : | The user to fetch the favorites list for.
`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. (or NULL)
`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 NULL)
`page` : | The page of results to return. If this argument is omitted, it defaults to 1. (or NULL)
Returns : | non-0 on failure

### flickcurl_favorites_getPublicList_params ()

    flickcurl_photos_list * flickcurl_favorites_getPublicList_params
                                                            (flickcurl *fc,
                                                             const char *user_id,
                                                             flickcurl_photos_list_params *list_params);

Returns a list of favorite public photos for the given user.

Optional extra type 'media' that will return an extra media = VALUE for VALUE "photo" or "video". API addition 2008-04-07.

`fc` : | flickcurl context
`user_id` : | The user to fetch the favorites list for.
`list_params` : | flickcurl_photos_list_params result parameters (or NULL)
Returns : | non-0 on failure

### flickcurl_favorites_remove ()

    int                 flickcurl_favorites_remove          (flickcurl *fc,
                                                             const char *photo_id);

Removes a photo from a user's favorites list.

Implements flickr.favorites.remove (1.0)

`fc` : | flickcurl context
`photo_id` : | The id of the photo to remove from the user's favorites.
Returns : | non-0 on failure