section-gallery

section-gallery — Galleries of photos.

Synopsis

                    flickcurl_gallery;
void                flickcurl_free_galleries            (flickcurl_gallery **galleries_object);
int                 flickcurl_galleries_addPhoto        (flickcurl *fc,
                                                         const char *gallery_id,
                                                         const char *photo_id,
                                                         const char *comment_text);
flickcurl_gallery** flickcurl_galleries_getList         (flickcurl *fc,
                                                         const char *user_id,
                                                         int per_page,
                                                         int page);
flickcurl_gallery** flickcurl_galleries_getListForPhoto (flickcurl *fc,
                                                         const char *photo_id,
                                                         int per_page,
                                                         int page);

Description

Galleries of photos.

Details

flickcurl_gallery

typedef struct {
  char *id;
  char *url;
  char *owner;
  int date_create;
  int date_update;
  flickcurl_photo* primary_photo;
  int count_photos;
  int count_videos;
  char *title;
  char *description;
} flickcurl_gallery;

A photo gallery.

The list of photos in the gallery is not curently available via the API. It should be flickr.galleries.getInfo() but that is does not exist at this date 2010-01-21.

char *id;

gallery ID

char *url;

URL of gallery

char *owner;

owner NSID

int date_create;

creation date of gallery

int date_update;

update / last modified date of gallery

flickcurl_photo *primary_photo;

primary photo for the gallery

int count_photos;

number of photos in the gallery

int count_videos;

number of photos in the gallery

char *title;

Gallery title

char *description;

Gallery description

flickcurl_free_galleries ()

void                flickcurl_free_galleries            (flickcurl_gallery **galleries_object);

Destructor for array of gallery objects

galleries_object :

gallery object array

flickcurl_galleries_addPhoto ()

int                 flickcurl_galleries_addPhoto        (flickcurl *fc,
                                                         const char *gallery_id,
                                                         const char *photo_id,
                                                         const char *comment_text);

Add a photo to a gallery.

Implements flickr.galleries.addPhoto (1.17)

fc :

flickcurl context

gallery_id :

The ID of the gallery to add a photo to as returned by flickcurl_galleries_getList() and flickcurl_galleries_getListForPhoto().

photo_id :

The photo ID to add to the gallery.

comment_text :

A short comment or story to accompany the photo (or NULL).

Returns :

non-0 on failure

flickcurl_galleries_getList ()

flickcurl_gallery** flickcurl_galleries_getList         (flickcurl *fc,
                                                         const char *user_id,
                                                         int per_page,
                                                         int page);

Return the list of galleries created by a user.

Galleries are returned sorted from newest to oldest.

Implements flickr.galleries.getList (1.17)

fc :

flickcurl context

user_id :

The NSID of the user to get a galleries list for. If none is specified, the calling user is assumed.

per_page :

Number of galleries to return per page. If this argument is omitted, it defaults to 100. The maximum allowed value is 500. (or < 0)

page :

The page of results to return. If this argument is omitted, it defaults to 1. (or < 0)

Returns :

array of galleries or NULL on failure

flickcurl_galleries_getListForPhoto ()

flickcurl_gallery** flickcurl_galleries_getListForPhoto (flickcurl *fc,
                                                         const char *photo_id,
                                                         int per_page,
                                                         int page);

Return the list of galleries to which a photo has been added.

Galleries are returned sorted by date which the photo was added to the gallery.

Implements flickr.galleries.getListForPhoto (1.17)

fc :

flickcurl context

photo_id :

The ID of the photo to fetch a list of galleries for.

per_page :

Number of galleries to return per page. If this argument is omitted, it defaults to 100. The maximum allowed value is 500. (or < 0)

page :

The page of results to return. If this argument is omitted, it defaults to 1. (or < 0)

Returns :

array of galleries or NULL on failure