![]() |
![]() |
Flickcurl Flickr API Manual | ![]() |
|
---|---|---|---|---|
flickcurl_tag; flickcurl_tag_cluster; flickcurl_tag_clusters; void flickcurl_free_tag (flickcurl_tag *t); void flickcurl_free_tag_clusters (flickcurl_tag_clusters *tcs); void (*flickcurl_tag_handler) (void *user_data, flickcurl_tag *tag); flickcurl_tag_clusters* flickcurl_tags_getClusters (flickcurl *fc, const char *tag); flickcurl_tag** flickcurl_tags_getHotList (flickcurl *fc, const char *period, int tag_count); flickcurl_tag** flickcurl_tags_getListPhoto (flickcurl *fc, const char *photo_id); flickcurl_tag** flickcurl_tags_getListUser (flickcurl *fc, const char *user_id); flickcurl_tag** flickcurl_tags_getListUserPopular (flickcurl *fc, const char *user_id, int pop_count); flickcurl_tag** flickcurl_tags_getListUserRaw (flickcurl *fc, const char *tag); flickcurl_tag** flickcurl_tags_getRelated (flickcurl *fc, const char *tag);
typedef struct { struct flickcurl_photo_s* photo; char* id; char* author; char* authorname; char* raw; char* cooked; int machine_tag; int count; } flickcurl_tag;
A tag OR a posting of a tag about a photo by a user OR a tag in a histogram
Most of these fields may be NULL, 0 for numbers
but not all. Either raw
or cooked
MUST appear.
A Photo Tag.
struct flickcurl_photo_s * |
Associated photo object if any |
char * |
tag identifier |
char * |
author (may be NULL) |
char * |
author real name (may be NULL) |
char * |
raw tag as user typed it (may be NULL, but if so cooked must be not NULL)
|
char * |
cooked tag (may be NULL, but if so raw must not be NULL)
|
int |
boolean (non-0 true) if tag is a Machine Tag |
int |
tag count in a histogram (or 0) |
typedef struct { int count; char** tags; } flickcurl_tag_cluster;
A cluster (set) of tag names
int |
number of tags |
char ** |
tags in this cluster |
typedef struct { int count; flickcurl_tag_cluster** clusters; } flickcurl_tag_clusters;
A set of clusters of tag names
int |
number of tag clusters |
flickcurl_tag_cluster ** |
tag clusters |
void flickcurl_free_tag (flickcurl_tag *t);
Destructor for tag object
|
tag object |
void flickcurl_free_tag_clusters (flickcurl_tag_clusters *tcs);
Destructor for tag clusters object
|
tag clusters object |
void (*flickcurl_tag_handler) (void *user_data, flickcurl_tag *tag);
Flickcurl Tag handler callback.
|
user data pointer |
|
tag |
flickcurl_tag_clusters* flickcurl_tags_getClusters (flickcurl *fc, const char *tag);
Gives you a list of tag clusters for the given tag.
Implements flickr.tags.getClusters (1.5)
"There is no pagination for this method as the number of clusters for a single tag is capped at 5 and each cluster may contain between 1 - 50 tags (give or take)."
As announced 2008-07-17 http://tech.groups.yahoo.com/group/yws-flickr/message/4218
|
flickcurl context |
|
The tag to fetch clusters for. |
Returns : |
NULL on failure |
flickcurl_tag** flickcurl_tags_getHotList (flickcurl *fc, const char *period, int tag_count);
Returns a list of hot tags for the given period.
Implements flickr.tags.getHotList (0.9)
|
flickcurl context |
|
The period for which to fetch hot tags. Valid values are day and week (defaults to day). |
|
The number of tags to return. Defaults to 20. Maximum allowed value is 200 (or -1 to leave as default) |
Returns : |
array of flickcurl_tag or NULL on failure |
flickcurl_tag** flickcurl_tags_getListPhoto (flickcurl *fc, const char *photo_id);
Get the tag list for a given photo.
Implements flickr.tags.getListPhoto (0.9)
|
flickcurl context |
|
photo ID |
Returns : |
array of flickcurl_tag or NULL on failure |
flickcurl_tag** flickcurl_tags_getListUser (flickcurl *fc, const char *user_id);
Get the tag list for a given user (or current user)
Implements flickr.tags.getListUser (0.9)
FIXME: API docs says user_id is optional but it is not.
|
flickcurl context |
|
user NSID (or NULL) |
Returns : |
array of flickcurl_tag or NULL on failure |
flickcurl_tag** flickcurl_tags_getListUserPopular (flickcurl *fc, const char *user_id, int pop_count);
Get the popular tag list for a given user (or current user)
Implements flickr.tags.getListUserPopular (0.9)
|
flickcurl context |
|
user NSID (or NULL) |
|
number of popular tags to return (or <0 for default) |
Returns : |
array of flickcurl_tag or NULL on failure |
flickcurl_tag** flickcurl_tags_getListUserRaw (flickcurl *fc, const char *tag);
Get the raw versions of a given tag (or all tags) for the currently logged-in user.
Implements flickr.tags.getListUserRaw (0.9)
|
flickcurl context |
|
tag to get raw version of (or NULL for all) |
Returns : |
array of flickcurl_tag or NULL on failure |
flickcurl_tag** flickcurl_tags_getRelated (flickcurl *fc, const char *tag);
Get a list of tags 'related' to the given tag, based on clustered usage analysis.
Implements flickr.tags.getRelated (0.9)
|
flickcurl context |
|
tag to fetch related tags for |
Returns : |
array of flickcurl_tag or NULL on failure |