![]() |
![]() |
Flickcurl Flickr API Manual | ![]() |
|
---|---|---|---|---|
flickcurl_place; void flickcurl_free_place (flickcurl_place *place); void flickcurl_free_places (flickcurl_place **places_object); enum flickcurl_place_type; flickcurl_place** flickcurl_places_find (flickcurl *fc, const char *query); flickcurl_place* flickcurl_places_findByLatLon (flickcurl *fc, double lat, double lon, int accuracy); flickcurl_place** flickcurl_places_forUser (flickcurl *fc, flickcurl_place_type place_type, int woe_id, const char *place_id, int threshold); flickcurl_place_type flickcurl_get_place_type_by_label (const char *place_label); const char* flickcurl_get_place_type_label (flickcurl_place_type place_type); flickcurl_place* flickcurl_places_resolvePlaceId (flickcurl *fc, const char *place_id); flickcurl_place* flickcurl_places_resolvePlaceURL (flickcurl *fc, const char *url);
typedef struct { char* names[FLICKCURL_PLACE_LAST+1]; char* ids[FLICKCURL_PLACE_LAST+1]; char* urls[FLICKCURL_PLACE_LAST+1]; flickcurl_place_type type; char* woe_ids[FLICKCURL_PLACE_LAST+1]; flickcurl_location location; int count; } flickcurl_place;
A Place.
Index 0 in the array is the location itself. flickcurl_get_place_type_label()
can give labels for the array indexes of type flickcurl_place_type.
char * |
Array of place names |
char * |
Array of place IDs |
char * |
Array of place urls. |
flickcurl_place_type |
Location type of index 0 (the location) usually FLICKCURL_PLACE_LOCATION but may be wider |
char * |
Array of WOE IDs |
flickcurl_location |
location for this place |
int |
count of photos (when used for flickcurl_places_forUser() )
|
void flickcurl_free_place (flickcurl_place *place);
Destructor for place object
|
place object |
void flickcurl_free_places (flickcurl_place **places_object);
Destructor for array of place object
|
place object array |
typedef enum { FLICKCURL_PLACE_LOCATION, FLICKCURL_PLACE_NEIGHBOURHOOD, FLICKCURL_PLACE_NEIGHBORHOOD = FLICKCURL_PLACE_NEIGHBOURHOOD, FLICKCURL_PLACE_LOCALITY, FLICKCURL_PLACE_COUNTY, FLICKCURL_PLACE_REGION, FLICKCURL_PLACE_COUNTRY, FLICKCURL_PLACE_LAST = FLICKCURL_PLACE_COUNTRY } flickcurl_place_type;
Place type
a general location | |
neighborhood (narrowest place) | |
deprecated | |
locality | |
county | |
region | |
country (widest place) | |
internal offset to last in enum list |
flickcurl_place** flickcurl_places_find (flickcurl *fc, const char *query);
Return a list of place IDs for a query string.
The flickr.places.find method is NOT a geocoder. It will round up to the nearest place type to which place IDs apply. For example, if you pass it a street level address it will return the city that contains the address rather than the street, or building, itself.
This API announced 2008-01-18 http://tech.groups.yahoo.com/group/yws-flickr/message/3716
Implements flickr.places.find (1.1)
|
flickcurl context |
|
The query string to use for place ID lookups |
Returns : |
non-0 on failure |
flickcurl_place* flickcurl_places_findByLatLon (flickcurl *fc, double lat, double lon, int accuracy);
Return a place ID for a latitude, longitude and accuracy triple.
The flickr.places.findByLatLon method is not meant to be a (reverse) geocoder in the traditional sense. It is designed to allow users to find photos for "places" and will round up to the nearest place type to which corresponding place IDs apply.
This API announced 2008-01-23 http://tech.groups.yahoo.com/group/yws-flickr/message/3735
Implements flickr.places.findByLatLon (1.1)
|
flickcurl context |
|
The latitude whose valid range is -90 to 90. Anything more than 4 decimal places will be truncated. |
|
The longitude whose valid range is -180 to 180. Anything more than 4 decimal places will be truncated. |
|
Recorded accuracy level of the location information. World level is 1, Country is ~3, Region ~6, City ~11, Street ~16. Current range is 1-16. The default is 16. |
Returns : |
non-0 on failure |
flickcurl_place** flickcurl_places_forUser (flickcurl *fc, flickcurl_place_type place_type, int woe_id, const char *place_id, int threshold);
Return a list of the top 100 unique places clustered by a given place type for a user.
This API added 2008-09-04 as announced in http://code.flickr.com/blog/2008/09/04/whos-on-first/
Implements flickr.places.forUser (1.6)
|
flickcurl context |
|
A specific place type to cluster photos by. Valid places types are neighbourhood, locality, region or country |
|
A Where on Earth identifier to use to filter photo clusters. (or <0) |
|
A Flickr Places identifier to use to filter photo clusters. (or NULL) |
|
The minimum number of photos that a place type must have to be included. If the number of photos is lowered then the parent place type for that place will be used. (or <0) |
Returns : |
non-0 on failure |
flickcurl_place_type flickcurl_get_place_type_by_label (const char *place_label);
Get a place type by label
|
place type |
Returns : |
place type |
const char* flickcurl_get_place_type_label (flickcurl_place_type place_type);
Get label for a place type
|
place type |
Returns : |
label string or NULL if none valid |
flickcurl_place* flickcurl_places_resolvePlaceId (flickcurl *fc, const char *place_id);
Find Flickr Places information by Place Id
Implements flickr.places.resolvePlaceId (1.0)
|
flickcurl context |
|
A Flickr Places ID |
Returns : |
non-0 on failure |
flickcurl_place* flickcurl_places_resolvePlaceURL (flickcurl *fc, const char *url);
Find Flickr Places information by Place URL
Implements flickr.places.resolvePlaceURL (1.0)
|
flickcurl context |
|
A Flickr Places URL. Flickr Place URLs are of the form /country/region/city |
Returns : |
non-0 on failure |