Flickr Commons

Flickr Commons — Flickr Commons and institutions

Synopsis

                    flickcurl_institution;
enum                flickcurl_institution_url_type;
void                flickcurl_free_institution          (flickcurl_institution *institution);
void                flickcurl_free_institutions         (flickcurl_institution **institutions_object);
const char *        flickcurl_get_institution_url_type_label
                                                        (flickcurl_institution_url_type url_type);
flickcurl_institution ** flickcurl_commons_getInstitutions
                                                        (flickcurl *fc);

Description

Flickr Commons and institutions

Details

flickcurl_institution

typedef struct {
  char *nsid;
  int date_launch;
  char *name;
  char **urls;
} flickcurl_institution;

Flickr Commons institution

char *nsid;

NSID

int date_launch;

Date launched in unix timestamp format

char *name;

Institution name

char **urls;

Array of related urls.

enum flickcurl_institution_url_type

typedef enum {
  FLICKCURL_INSTITUTION_URL_NONE = 0,
  FLICKCURL_INSTITUTION_URL_SITE,
  FLICKCURL_INSTITUTION_URL_LICENSE,
  FLICKCURL_INSTITUTION_URL_FLICKR,
  FLICKCURL_INSTITUTION_URL_LAST = FLICKCURL_INSTITUTION_URL_FLICKR
} flickcurl_institution_url_type;

Institution URL type

FLICKCURL_INSTITUTION_URL_NONE

internal

FLICKCURL_INSTITUTION_URL_SITE

site URL

FLICKCURL_INSTITUTION_URL_LICENSE

license URL

FLICKCURL_INSTITUTION_URL_FLICKR

flickr photos page URL

FLICKCURL_INSTITUTION_URL_LAST

internal offset to last in enum list

flickcurl_free_institution ()

void                flickcurl_free_institution          (flickcurl_institution *institution);

Destructor for institution object

institution :

institution object

flickcurl_free_institutions ()

void                flickcurl_free_institutions         (flickcurl_institution **institutions_object);

Destructor for array of institution object

institutions_object :

institution object array

flickcurl_get_institution_url_type_label ()

const char *        flickcurl_get_institution_url_type_label
                                                        (flickcurl_institution_url_type url_type);

Get label for institution url type

url_type :

institution url enum

Returns :

label string or NULL if none valid

flickcurl_commons_getInstitutions ()

flickcurl_institution ** flickcurl_commons_getInstitutions
                                                        (flickcurl *fc);

Retrieves a list of the current Commons institutions.

Implements flickr.commons.getInstitutions (1.8)

fc :

flickcurl context

Returns :

non-0 on failure