Machine tag

Machine tag — Machine tags.

Synopsis

                    flickcurl_tag_namespace;
                    flickcurl_tag_predicate_value;
void                flickcurl_free_tag_namespace        (flickcurl_tag_namespace *tag_nspace);
void                flickcurl_free_tag_namespaces       (flickcurl_tag_namespace **tag_nspaces);
void                flickcurl_free_tag_predicate_value  (flickcurl_tag_predicate_value *tag_pv);
void                flickcurl_free_tag_predicate_values (flickcurl_tag_predicate_value **tag_pvs);
flickcurl_tag_namespace ** flickcurl_machinetags_getNamespaces
                                                        (flickcurl *fc,
                                                         const char *predicate,
                                                         int per_page,
                                                         int page);
flickcurl_tag_predicate_value ** flickcurl_machinetags_getPairs
                                                        (flickcurl *fc,
                                                         const char *nspace,
                                                         const char *predicate,
                                                         int per_page,
                                                         int page);
flickcurl_tag_predicate_value ** flickcurl_machinetags_getPredicates
                                                        (flickcurl *fc,
                                                         const char *nspace,
                                                         int per_page,
                                                         int page);
flickcurl_tag_predicate_value ** flickcurl_machinetags_getRecentValues
                                                        (flickcurl *fc,
                                                         const char *nspace,
                                                         const char *predicate,
                                                         int added_since);
flickcurl_tag_predicate_value ** flickcurl_machinetags_getValues
                                                        (flickcurl *fc,
                                                         const char *nspace,
                                                         const char *predicate,
                                                         int per_page,
                                                         int page);

Description

Machine tags.

Details

flickcurl_tag_namespace

typedef struct {
  char *name;
  int usage_count;
  int predicates_count;
} flickcurl_tag_namespace;

A machine tags namespace

char *name;

Name

int usage_count;

Number of uses of this namespace

int predicates_count;

Number of predicates for this namespace

flickcurl_tag_predicate_value

typedef struct {
  int usage_count;
  char *predicate;
  int used_in_namespace_count;
  char *value;
} flickcurl_tag_predicate_value;

A machine tag predicate-value pair

int usage_count;

Number of uses of this predicate-value pair

char *predicate;

Predicate name or NULL

int used_in_namespace_count;

number of namespaces this pair is used in

char *value;

Value or NULL

flickcurl_free_tag_namespace ()

void                flickcurl_free_tag_namespace        (flickcurl_tag_namespace *tag_nspace);

Destructor for machinetag namespace object

tag_nspace :

machinetag namespace object

flickcurl_free_tag_namespaces ()

void                flickcurl_free_tag_namespaces       (flickcurl_tag_namespace **tag_nspaces);

Destructor for array of namespace object

tag_nspaces :

namespace object array

flickcurl_free_tag_predicate_value ()

void                flickcurl_free_tag_predicate_value  (flickcurl_tag_predicate_value *tag_pv);

Destructor for machinetag predicate-value pair object

tag_pv :

machinetag predicate_value object

flickcurl_free_tag_predicate_values ()

void                flickcurl_free_tag_predicate_values (flickcurl_tag_predicate_value **tag_pvs);

Destructor for array of predicate_value object

tag_pvs :

predicate_value object array

flickcurl_machinetags_getNamespaces ()

flickcurl_tag_namespace ** flickcurl_machinetags_getNamespaces
                                                        (flickcurl *fc,
                                                         const char *predicate,
                                                         int per_page,
                                                         int page);

Return a list of unique namespaces, optionally limited by a given predicate, in alphabetical order.

Implements flickr.machinetags.getNamespaces (1.7)

As announced 2008-11-18 http://tech.groups.yahoo.com/group/yws-flickr/message/4545 and http://code.flickr.com/blog/2008/12/15/machine-tag-hierarchies/

fc :

flickcurl context

predicate :

Limit the list of namespaces returned to those that have the following predicate (or NULL)

per_page :

Number of namespaces 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 :

array of namespaces or NULL on failure

flickcurl_machinetags_getPairs ()

flickcurl_tag_predicate_value ** flickcurl_machinetags_getPairs
                                                        (flickcurl *fc,
                                                         const char *nspace,
                                                         const char *predicate,
                                                         int per_page,
                                                         int page);

Return a list of unique namespace and predicate pairs, optionally limited by predicate or namespace, in alphabetical order.

Implements flickr.machinetags.getPairs (1.7)

As announced 2008-11-18 http://tech.groups.yahoo.com/group/yws-flickr/message/4545 and http://code.flickr.com/blog/2008/12/15/machine-tag-hierarchies/

fc :

flickcurl context

nspace :

Limit the list of pairs returned to those that have the following namespace (or NULL)

predicate :

Limit the list of pairs returned to those that have the following predicate (or NULL)

per_page :

Number of pairs 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 :

array of pairs or NULL on failure

flickcurl_machinetags_getPredicates ()

flickcurl_tag_predicate_value ** flickcurl_machinetags_getPredicates
                                                        (flickcurl *fc,
                                                         const char *nspace,
                                                         int per_page,
                                                         int page);

Return a list of unique predicates, optionally limited by a given namespace.

Implements flickr.machinetags.getPredicates (1.7)

As announced 2008-11-18 http://tech.groups.yahoo.com/group/yws-flickr/message/4545 and http://code.flickr.com/blog/2008/12/15/machine-tag-hierarchies/

fc :

flickcurl context

nspace :

Limit the list of predicates returned to those that have the following namespace (or NULL)

per_page :

Number of predicates 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 :

array of predicates or NULL on failure

flickcurl_machinetags_getRecentValues ()

flickcurl_tag_predicate_value ** flickcurl_machinetags_getRecentValues
                                                        (flickcurl *fc,
                                                         const char *nspace,
                                                         const char *predicate,
                                                         int added_since);

Fetch recently used machine tags values.

Implements flickr.machinetags.getRecentValues (1.12)

fc :

flickcurl context

nspace :

A namespace that all values should be restricted to (or NULL)

predicate :

A predicate that all values should be restricted to (or NULL)

added_since :

Only return machine tags values that have been added since this timestamp, in epoch seconds (or <0)

Returns :

array of values or NULL on failure

flickcurl_machinetags_getValues ()

flickcurl_tag_predicate_value ** flickcurl_machinetags_getValues
                                                        (flickcurl *fc,
                                                         const char *nspace,
                                                         const char *predicate,
                                                         int per_page,
                                                         int page);

Return a list of unique values for a namespace and predicate.

Implements flickr.machinetags.getValues (1.7)

As announced 2008-11-18 http://tech.groups.yahoo.com/group/yws-flickr/message/4545 and http://code.flickr.com/blog/2008/12/15/machine-tag-hierarchies/

fc :

flickcurl context

nspace :

The namespace that all values should be restricted to.

predicate :

The predicate that all values should be restricted to.

per_page :

Number of values 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 :

array of values or NULL on failure