## section-commons

section-commons

## Functions

void | flickcurl_free_institution ()
void | flickcurl_free_institutions ()
const char * | flickcurl_get_institution_url_type_label ()
flickcurl_institution ** | flickcurl_commons_getInstitutions ()

## Types and Values

| flickcurl_institution
enum | flickcurl_institution_url_type

## Description

## Functions

### flickcurl_free_institution ()

    void
    flickcurl_free_institution (flickcurl_institution *institution);

Destructor for institution object

#### Parameters

institution | institution object |

### flickcurl_free_institutions ()

    void
    flickcurl_free_institutions (flickcurl_institution **institutions_object);

Destructor for array of institution object

#### Parameters

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

#### Parameters

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)

#### Parameters

fc | flickcurl context |

#### Returns

non-0 on failure

## Types and Values

### flickcurl_institution

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

Flickr Commons institution

#### Members

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

Institution URL type

#### Members

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 |