## Reflection

Reflection — Flickr introspection API.

## Synopsis

                        flickcurl_arg;
                        flickcurl_method;
    void                flickcurl_free_method               (flickcurl_method *method);
    flickcurl_method *  flickcurl_reflection_getMethodInfo  (flickcurl *fc,
                                                             const char *name);
    char **             flickcurl_reflection_getMethods     (flickcurl *fc);

## Description

Flickr introspection API.

## Details

### flickcurl_arg

    typedef struct {
      char* name;
      int optional;
      char *description;
    } flickcurl_arg;

An API method argument.

char *`name`; | Argument name
int `optional`; | boolean flag (non-0 true) if argument is optional
char *`description`; | description of argument (HTML)

### flickcurl_method

    typedef struct {
      char *name;
      int   needslogin;
      char *description;
      char *response;
      char *explanation;

      /* argument list */
      flickcurl_arg** args;
      int args_count;
    } flickcurl_method;

An API method

char *`name`; | Method name
int `needslogin`; | boolean flag (non-0 true) if method requires login
char *`description`; | description of method
char *`response`; | example response (HTML)
char *`explanation`; | explanation of example response or NULL if missing
flickcurl_arg **`args`; | method arguments
int `args_count`; | number of arguments, may be 0

### flickcurl_free_method ()

    void                flickcurl_free_method               (flickcurl_method *method);

Destructor for method object

`method` : | method object

### flickcurl_reflection_getMethodInfo ()

    flickcurl_method *  flickcurl_reflection_getMethodInfo  (flickcurl *fc,
                                                             const char *name);

Get information about an API method

Implements flickr.reflection.getMethodInfo (0.10)

`fc` : | flickcurl context
`name` : | method name
Returns : | flickcurl_method or NULL on failure

### flickcurl_reflection_getMethods ()

    char **             flickcurl_reflection_getMethods     (flickcurl *fc);

Get the list of available API method names

Implements flickr.reflection.getMethods (0.10)

`fc` : | flickcurl context
Returns : | arry of names or NULL on failure