Flickr-PHP API v1.0 USAGE DOCUMENTATION Copyright (C) 2009 Pedro Venda pjvenda at pjvenda org This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License ------------------------------------- see LICENSE file for more information ------------------------------------- A full copy of this program along with this file can be downloaded from my website http://www.pjvenda.org Before reading this document, you should read the INSTALL file. 1. GENERAL INFORMATION ------------------- Using this library is very simple. Just configure your flickr username and your API key (these can be obtained for free and instantly from flickr). Then include the flickr.php file on your PHP code and rock on! Provided functionality includes: - listing the latest posted photos; - listing all the sets of the configured user; - listing the photos in a particular set; - listing all the tags of the configured user (up to a user-defined number); - listing all the photos having a particular tag; - obtaining information about a specific photo - obtaining information about a specific set 2. TYPICAL USAGE ------------- flickr_display.php contains a bunch of HTML generation functions that accept input from similarly named functions in flickr.php. It is fundamental to setup flickr_config.php and to include flickr.php on the PHP source file. After that it's just using the supplied functions and doing whatever you want or need to. A set of files is included with the library that provides a simple web application to fetch and display flickr photo sets, photos and tags. This is included for two reasons: 1. Satellite v1.5 provides this example site to demonstrate its usage and I want versio 1.0 to be as equivalent as possible to Satellite; 2. It's a demonstration - look at the source there and see how it's done. apitest.php alone isn't as nice to see as this. These files are: - index.php - about.php - contact.php - permalink.php - set.php - sets.php - tag.php - tags.php - recent.php All the above files are functional demonstrations of how to use the library. 3. FURTHER HELP ------------ The source. 4. FUNCTION REFERENCE ------------------ 4.1. flickr.php ---------- flickr_list_photos_recent($pool=NULL) flickr_get_photo_recent_random($pool=NULL) flickr_list_sets() flickr_list_photos_set($set_id) flickr_list_tags($pool=NULL) flickr_list_photos_tag($tag,$pool=NULL) flickr_get_photo_info($photo_id) flickr_get_set_info($set_id) 4.2. flickr_http.php --------------- get_http($url) get_json_http($http_return) http_json($params) 4.3. flickr_display.php ------------------ photo_static_url($server,$primary,$secret,$size) flickr_display_photo($photo,$size="small",$echo=TRUE) flickr_display_sets($sets,$size="square",$echo=TRUE) flickr_display_photos_set($photos,$echo=TRUE) flickr_display_photos_recent($photos,$echo=TRUE) flickr_display_tags_cloud($tags,$echo=TRUE) flickr_display_photos_tag($photos,$echo=TRUE) flickr_display_photo_info($photo,$echo=TRUE) flickr_display_set_info($set,$echo=TRUE) set_theme($theme=NULL) menu() sitename() phead($theme=NULL)