Changeset 28824
- Timestamp:
- Jun 28, 2014, 11:56:32 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/flickr2piwigo/include/phpFlickr/phpFlickr.php
r16063 r28824 1 1 <?php 2 /* phpFlickr Class 3.12 /* phpFlickr 3 3 * Written by Dan Coulter (dan@dancoulter.com) 4 * Project Home Page: http://phpflickr.com/ 5 * Released under GNU Lesser General Public License (http://www.gnu.org/copyleft/lgpl.html) 6 * For more information about the class and upcoming tools and toys using it, 7 * visit http://www.phpflickr.com/ 4 * Project Home Page: http://github.com/dancoulter/phpflickr 8 5 * 9 * For installation instructions, open the README.txt file packaged with this 10 * class. If you don't have a copy, you can see it at: 11 * http://www.phpflickr.com/README.txt 6 * This program is free software: you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation, either version 3 of the License, or 9 * (at your option) any later version. 12 10 * 13 * Please submit all problems or questions to the Help Forum on my Google Code project page: 14 * http://code.google.com/p/phpflickr/issues/list 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 15 * 16 * Modified on June 25th 2012 by Mistic (http://www.strangeplanet.fr) : 17 * - add get_biggest_size() method 18 * - update buildPhotoURL() methos with all available sizes 16 * You should have received a copy of the GNU General Public License 17 * along with this program. If not, see <http://www.gnu.org/licenses/>. 19 18 * 20 */ 19 */ 21 20 if ( !class_exists('phpFlickr') ) { 22 21 if (session_id() == "") { … … 27 26 var $api_key; 28 27 var $secret; 29 30 var $rest_endpoint = 'http ://api.flickr.com/services/rest/';31 var $upload_endpoint = 'http ://api.flickr.com/services/upload/';32 var $replace_endpoint = 'http ://api.flickr.com/services/replace/';28 29 var $rest_endpoint = 'https://api.flickr.com/services/rest/'; 30 var $upload_endpoint = 'https://up.flickr.com/services/upload/'; 31 var $replace_endpoint = 'https://up.flickr.com/services/replace/'; 33 32 var $req; 34 33 var $response; … … 62 61 function phpFlickr ($api_key, $secret = NULL, $die_on_error = false) { 63 62 //The API Key must be set before any calls can be made. You can 64 //get your own at http ://www.flickr.com/services/api/misc.api_keys.html63 //get your own at https://www.flickr.com/services/api/misc.api_keys.html 65 64 $this->api_key = $api_key; 66 65 $this->secret = $secret; … … 83 82 if ($type == 'db') { 84 83 if ( preg_match('|mysql://([^:]*):([^@]*)@([^/]*)/(.*)|', $connection, $matches) ) { 85 //Array ( [0] => mysql://user:password@server/database [1] => user [2] => password [3] => server [4] => database ) 86 $db = mysql _connect($matches[3], $matches[1],$matches[2]);87 mysql _select_db($matches[4], $db);88 84 //Array ( [0] => mysql://user:password@server/database [1] => user [2] => password [3] => server [4] => database ) 85 $db = mysqli_connect($matches[3], $matches[1], $matches[2]); 86 mysqli_query($db, "USE $matches[4]"); 87 89 88 /* 90 89 * If high performance is crucial, you can easily comment 91 90 * out this query once you've created your database table. 92 91 */ 93 mysql _query("92 mysqli_query($db, " 94 93 CREATE TABLE IF NOT EXISTS `$table` ( 95 94 `request` CHAR( 35 ) NOT NULL , … … 97 96 `expiration` DATETIME NOT NULL , 98 97 INDEX ( `request` ) 99 ) TYPE = MYISAM100 " , $db);101 102 $result = mysql _query("SELECT COUNT(*) FROM $table", $db);103 $result = mysql _fetch_row($result);98 ) 99 "); 100 101 $result = mysqli_query($db, "SELECT COUNT(*) FROM $table"); 102 $result = mysqli_fetch_row($result); 104 103 if ( $result[0] > $this->max_cache_rows ) { 105 mysql _query("DELETE FROM $table WHERE expiration < DATE_SUB(NOW(), INTERVAL $cache_expire second)", $db);106 mysql _query('OPTIMIZE TABLE ' . $this->cache_table, $db);104 mysqli_query($db, "DELETE FROM $table WHERE expiration < DATE_SUB(NOW(), INTERVAL $cache_expire second)"); 105 mysqli_query($db, 'OPTIMIZE TABLE ' . $this->cache_table); 107 106 } 108 107 $this->cache = 'db'; … … 143 142 $this->cache_request = $request; 144 143 if ($this->cache == 'db') { 145 $result = mysql _query("SELECT response FROM " . $this->cache_table . " WHERE request = '" . $reqhash . "' AND DATE_SUB(NOW(), INTERVAL " . (int) $this->cache_expire . " SECOND) < expiration", $this->cache_db);146 if ( mysql _num_rows($result) ) {147 $result = mysql _fetch_assoc($result);144 $result = mysqli_query($this->cache_db, "SELECT response FROM " . $this->cache_table . " WHERE request = '" . $reqhash . "' AND DATE_SUB(NOW(), INTERVAL " . (int) $this->cache_expire . " SECOND) < expiration"); 145 if ( mysqli_num_rows($result) ) { 146 $result = mysqli_fetch_assoc($result); 148 147 return $result['response']; 149 148 } else { … … 176 175 if ($this->cache == 'db') { 177 176 //$this->cache_db->query("DELETE FROM $this->cache_table WHERE request = '$reqhash'"); 178 $result = mysql _query("SELECT COUNT(*) FROM " . $this->cache_table . " WHERE request = '" . $reqhash . "'", $this->cache_db);179 $result = mysql _fetch_row($result);177 $result = mysqli_query($this->cache_db, "SELECT COUNT(*) FROM " . $this->cache_table . " WHERE request = '" . $reqhash . "'"); 178 $result = mysqli_fetch_row($result); 180 179 if ( $result[0] ) { 181 180 $sql = "UPDATE " . $this->cache_table . " SET response = '" . str_replace("'", "''", $response) . "', expiration = '" . strftime("%Y-%m-%d %H:%M:%S") . "' WHERE request = '" . $reqhash . "'"; 182 mysql _query($sql, $this->cache_db);181 mysqli_query($this->cache_db, $sql); 183 182 } else { 184 183 $sql = "INSERT INTO " . $this->cache_table . " (request, response, expiration) VALUES ('$reqhash', '" . str_replace("'", "''", $response) . "', '" . strftime("%Y-%m-%d %H:%M:%S") . "')"; 185 mysql _query($sql, $this->cache_db);184 mysqli_query($this->cache_db, $sql); 186 185 } 187 186 } elseif ($this->cache == "fs") { … … 196 195 return false; 197 196 } 198 197 199 198 function setCustomPost ( $function ) { 200 199 $this->custom_post = $function; 201 200 } 202 201 203 202 function post ($data, $type = null) { 204 203 if ( is_null($type) ) { 205 204 $url = $this->rest_endpoint; 206 205 } 207 206 208 207 if ( !is_null($this->custom_post) ) { 209 208 return call_user_func($this->custom_post, $url, $data); 210 209 } 211 212 if ( !preg_match("|http ://(.*?)(/.*)|", $url, $matches) ) {210 211 if ( !preg_match("|https://(.*?)(/.*)|", $url, $matches) ) { 213 212 die('There was some problem figuring out your endpoint'); 214 213 } 215 214 216 215 if ( function_exists('curl_init') ) { 217 216 // Has curl. Use it! … … 228 227 } 229 228 $data = implode('&', $data); 230 229 231 230 $fp = @pfsockopen($matches[1], 80); 232 231 if (!$fp) { … … 263 262 return $response; 264 263 } 265 264 266 265 function request ($command, $args = array(), $nocache = false) 267 266 { … … 296 295 $this->cache($args, $this->response); 297 296 } 298 297 299 298 /* 300 299 * Uncomment this line (and comment out the next one) if you're doing large queries … … 356 355 357 356 /* These functions are front ends for the flickr calls */ 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 357 function get_biggest_size($image_id, $limit='original') 358 { 359 $sizes = array( 360 "square" => "Square", 361 "square_75" => "Square", 362 "square_150" => "Large Square", 363 "thumbnail" => "Thumbnail", 364 "small" => "Small", 365 "small_240" => "Small", 366 "small_320" => "Small 320", 367 "medium" => "Medium", 368 "medium_500" => "Medium", 369 "medium_640" => "Medium 640", 370 "medium_800" => "Medium 800", 371 "large" => "Large", 372 "large_1024" => "Large", 373 "large_1600" => "Large 1600", 374 "large_2048" => "Large 2048", 375 "original" => "Original", 376 ); 377 378 if (!array_key_exists($limit, $sizes)) $limit = 'medium'; 379 $limit = array_search($limit, array_keys($sizes)); 380 381 $img_sizes = $this->photos_getSizes($image_id); 382 $img_sizes = array_reverse($img_sizes); 383 384 foreach ($img_sizes as $size) 385 { 386 if ($limit >= array_search($size['label'], array_values($sizes))) 387 { 388 return $size['source']; 389 } 390 } 391 392 return null; 393 } 394 396 395 function buildPhotoURL ($photo, $size = "Medium") { 397 396 //receives an array (can use the individual photo data returned … … 399 398 //file size exists) 400 399 $sizes = array( 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 400 "square" => "_s", 401 "square_75" => "_s", 402 "square_150" => "_q", 403 "thumbnail" => "_t", 404 "small" => "_m", 405 "small_240" => "_m", 406 "small_320" => "_n", 407 "medium" => "", 408 "medium_500" => "", 409 "medium_640" => "_z", 410 "medium_800" => "_c", 411 "large" => "_b", 412 "large_1024" => "_b", 413 "large_1600" => "_h", 414 "large_2048" => "_k", 415 "original" => "_o", 417 416 ); 418 417 419 418 $size = strtolower($size); 420 419 if (!array_key_exists($size, $sizes)) { 421 420 $size = "medium"; 422 421 } 423 422 424 423 if ($size == "original") { 425 $url = "http ://farm" . $photo['farm'] . ".static.flickr.com/" . $photo['server'] . "/" . $photo['id'] . "_" . $photo['originalsecret'] . "_o" . "." . $photo['originalformat'];424 $url = "https://farm" . $photo['farm'] . ".static.flickr.com/" . $photo['server'] . "/" . $photo['id'] . "_" . $photo['originalsecret'] . "_o" . "." . $photo['originalformat']; 426 425 } else { 427 $url = "http ://farm" . $photo['farm'] . ".static.flickr.com/" . $photo['server'] . "/" . $photo['id'] . "_" . $photo['secret'] . $sizes[$size] . ".jpg";426 $url = "https://farm" . $photo['farm'] . ".static.flickr.com/" . $photo['server'] . "/" . $photo['id'] . "_" . $photo['secret'] . $sizes[$size] . ".jpg"; 428 427 } 429 428 return $url; 430 }431 432 function getFriendlyGeodata ($lat, $lon) {433 /* I've added this method to get the friendly geodata (i.e. 'in New York, NY') that the434 * website provides, but isn't available in the API. I'm providing this service as long435 * as it doesn't flood my server with requests and crash it all the time.436 */437 return unserialize(file_get_contents('http://phpflickr.com/geodata/?format=php&lat=' . $lat . '&lon=' . $lon));438 429 } 439 430 … … 466 457 $photo = realpath($photo); 467 458 $args['photo'] = '@' . $photo; 468 459 469 460 470 461 $curl = curl_init($this->upload_endpoint); … … 475 466 $this->response = $response; 476 467 curl_close($curl); 477 468 478 469 $rsp = explode("\n", $response); 479 470 foreach ($rsp as $line) { … … 528 519 $photo = realpath($photo); 529 520 $args['photo'] = '@' . $photo; 530 521 531 522 532 523 $curl = curl_init($this->upload_endpoint); … … 537 528 $this->response = $response; 538 529 curl_close($curl); 539 530 540 531 $rsp = explode("\n", $response); 541 532 foreach ($rsp as $line) { 542 if ( ereg('<err code="([0-9]+)" msg="(.*)"', $line, $match)) {533 if (preg_match('/<err code="([0-9]+)" msg="(.*)"/', $line, $match)) { 543 534 if ($this->die_on_error) 544 535 die("The Flickr API returned the following error: #{$match[1]} - {$match[2]}"); … … 549 540 return false; 550 541 } 551 } elseif ( ereg("<ticketid>(.*)</", $line, $match)) {542 } elseif (preg_match("/<ticketid>(.*)</", $line, $match)) { 552 543 $this->error_code = false; 553 544 $this->error_msg = false; … … 589 580 $photo = realpath($photo); 590 581 $args['photo'] = '@' . $photo; 591 582 592 583 593 584 $curl = curl_init($this->replace_endpoint); … … 598 589 $this->response = $response; 599 590 curl_close($curl); 600 591 601 592 if ($async == 1) 602 593 $find = 'ticketid'; … … 638 629 } 639 630 $api_sig = md5($this->secret . "api_key" . $this->api_key . "perms" . $perms); 640 631 641 632 if ($this->service == "23") { 642 633 header("Location: http://www.23hq.com/services/auth/?api_key=" . $this->api_key . "&perms=" . $perms . "&api_sig=". $api_sig); 643 634 } else { 644 header("Location: http ://www.flickr.com/services/auth/?api_key=" . $this->api_key . "&perms=" . $perms . "&api_sig=". $api_sig);635 header("Location: https://www.flickr.com/services/auth/?api_key=" . $this->api_key . "&perms=" . $perms . "&api_sig=". $api_sig); 645 636 } 646 637 exit; … … 650 641 $rsp = $this->auth_checkToken(); 651 642 if ($this->error_code !== false) { 652 // file_put_contents('et2.txt', $this->error_msg);653 643 unset($_SESSION['phpFlickr_auth_token']); 654 644 $this->auth($perms, $remember_uri); … … 657 647 return $rsp['perms']; 658 648 } 649 } 650 651 function auth_url($frob, $perms = 'read') { 652 $sig = md5(sprintf('%sapi_key%sfrob%sperms%s', $this->secret, $this->api_key, $frob, $perms)); 653 return sprintf('https://flickr.com/services/auth/?api_key=%s&perms=%s&frob=%s&api_sig=%s', $this->api_key, $perms, $frob, $sig); 659 654 } 660 655 … … 685 680 /* Activity methods */ 686 681 function activity_userComments ($per_page = NULL, $page = NULL) { 687 /* http ://www.flickr.com/services/api/flickr.activity.userComments.html */682 /* https://www.flickr.com/services/api/flickr.activity.userComments.html */ 688 683 $this->request('flickr.activity.userComments', array("per_page" => $per_page, "page" => $page)); 689 684 return $this->parsed_response ? $this->parsed_response['items']['item'] : false; … … 691 686 692 687 function activity_userPhotos ($timeframe = NULL, $per_page = NULL, $page = NULL) { 693 /* http ://www.flickr.com/services/api/flickr.activity.userPhotos.html */688 /* https://www.flickr.com/services/api/flickr.activity.userPhotos.html */ 694 689 $this->request('flickr.activity.userPhotos', array("timeframe" => $timeframe, "per_page" => $per_page, "page" => $page)); 695 690 return $this->parsed_response ? $this->parsed_response['items']['item'] : false; … … 698 693 /* Authentication methods */ 699 694 function auth_checkToken () { 700 /* http ://www.flickr.com/services/api/flickr.auth.checkToken.html */695 /* https://www.flickr.com/services/api/flickr.auth.checkToken.html */ 701 696 $this->request('flickr.auth.checkToken'); 702 697 return $this->parsed_response ? $this->parsed_response['auth'] : false; … … 704 699 705 700 function auth_getFrob () { 706 /* http ://www.flickr.com/services/api/flickr.auth.getFrob.html */701 /* https://www.flickr.com/services/api/flickr.auth.getFrob.html */ 707 702 $this->request('flickr.auth.getFrob'); 708 703 return $this->parsed_response ? $this->parsed_response['frob'] : false; … … 710 705 711 706 function auth_getFullToken ($mini_token) { 712 /* http ://www.flickr.com/services/api/flickr.auth.getFullToken.html */707 /* https://www.flickr.com/services/api/flickr.auth.getFullToken.html */ 713 708 $this->request('flickr.auth.getFullToken', array('mini_token'=>$mini_token)); 714 709 return $this->parsed_response ? $this->parsed_response['auth'] : false; … … 716 711 717 712 function auth_getToken ($frob) { 718 /* http ://www.flickr.com/services/api/flickr.auth.getToken.html */713 /* https://www.flickr.com/services/api/flickr.auth.getToken.html */ 719 714 $this->request('flickr.auth.getToken', array('frob'=>$frob)); 720 715 $_SESSION['phpFlickr_auth_token'] = $this->parsed_response['auth']['token']; … … 724 719 /* Blogs methods */ 725 720 function blogs_getList ($service = NULL) { 726 /* http ://www.flickr.com/services/api/flickr.blogs.getList.html */721 /* https://www.flickr.com/services/api/flickr.blogs.getList.html */ 727 722 $rsp = $this->call('flickr.blogs.getList', array('service' => $service)); 728 723 return $rsp['blogs']['blog']; 729 724 } 730 725 731 726 function blogs_getServices () { 732 /* http ://www.flickr.com/services/api/flickr.blogs.getServices.html */727 /* https://www.flickr.com/services/api/flickr.blogs.getServices.html */ 733 728 return $this->call('flickr.blogs.getServices', array()); 734 729 } 735 730 736 731 function blogs_postPhoto ($blog_id = NULL, $photo_id, $title, $description, $blog_password = NULL, $service = NULL) { 737 /* http ://www.flickr.com/services/api/flickr.blogs.postPhoto.html */732 /* https://www.flickr.com/services/api/flickr.blogs.postPhoto.html */ 738 733 return $this->call('flickr.blogs.postPhoto', array('blog_id' => $blog_id, 'photo_id' => $photo_id, 'title' => $title, 'description' => $description, 'blog_password' => $blog_password, 'service' => $service)); 739 734 } … … 741 736 /* Collections Methods */ 742 737 function collections_getInfo ($collection_id) { 743 /* http ://www.flickr.com/services/api/flickr.collections.getInfo.html */738 /* https://www.flickr.com/services/api/flickr.collections.getInfo.html */ 744 739 return $this->call('flickr.collections.getInfo', array('collection_id' => $collection_id)); 745 740 } 746 741 747 742 function collections_getTree ($collection_id = NULL, $user_id = NULL) { 748 /* http ://www.flickr.com/services/api/flickr.collections.getTree.html */743 /* https://www.flickr.com/services/api/flickr.collections.getTree.html */ 749 744 return $this->call('flickr.collections.getTree', array('collection_id' => $collection_id, 'user_id' => $user_id)); 750 745 } 751 746 752 747 /* Commons Methods */ 753 748 function commons_getInstitutions () { 754 /* http ://www.flickr.com/services/api/flickr.commons.getInstitutions.html */749 /* https://www.flickr.com/services/api/flickr.commons.getInstitutions.html */ 755 750 return $this->call('flickr.commons.getInstitutions', array()); 756 751 } 757 752 758 753 /* Contacts Methods */ 759 754 function contacts_getList ($filter = NULL, $page = NULL, $per_page = NULL) { 760 /* http ://www.flickr.com/services/api/flickr.contacts.getList.html */755 /* https://www.flickr.com/services/api/flickr.contacts.getList.html */ 761 756 $this->request('flickr.contacts.getList', array('filter'=>$filter, 'page'=>$page, 'per_page'=>$per_page)); 762 757 return $this->parsed_response ? $this->parsed_response['contacts'] : false; … … 764 759 765 760 function contacts_getPublicList ($user_id, $page = NULL, $per_page = NULL) { 766 /* http ://www.flickr.com/services/api/flickr.contacts.getPublicList.html */761 /* https://www.flickr.com/services/api/flickr.contacts.getPublicList.html */ 767 762 $this->request('flickr.contacts.getPublicList', array('user_id'=>$user_id, 'page'=>$page, 'per_page'=>$per_page)); 768 763 return $this->parsed_response ? $this->parsed_response['contacts'] : false; 769 764 } 770 765 771 766 function contacts_getListRecentlyUploaded ($date_lastupload = NULL, $filter = NULL) { 772 /* http ://www.flickr.com/services/api/flickr.contacts.getListRecentlyUploaded.html */767 /* https://www.flickr.com/services/api/flickr.contacts.getListRecentlyUploaded.html */ 773 768 return $this->call('flickr.contacts.getListRecentlyUploaded', array('date_lastupload' => $date_lastupload, 'filter' => $filter)); 774 769 } … … 776 771 /* Favorites Methods */ 777 772 function favorites_add ($photo_id) { 778 /* http ://www.flickr.com/services/api/flickr.favorites.add.html */773 /* https://www.flickr.com/services/api/flickr.favorites.add.html */ 779 774 $this->request('flickr.favorites.add', array('photo_id'=>$photo_id), TRUE); 780 775 return $this->parsed_response ? true : false; … … 782 777 783 778 function favorites_getList ($user_id = NULL, $jump_to = NULL, $min_fave_date = NULL, $max_fave_date = NULL, $extras = NULL, $per_page = NULL, $page = NULL) { 784 /* http ://www.flickr.com/services/api/flickr.favorites.getList.html */779 /* https://www.flickr.com/services/api/flickr.favorites.getList.html */ 785 780 return $this->call('flickr.favorites.getList', array('user_id' => $user_id, 'jump_to' => $jump_to, 'min_fave_date' => $min_fave_date, 'max_fave_date' => $max_fave_date, 'extras' => $extras, 'per_page' => $per_page, 'page' => $page)); 786 781 } 787 782 788 783 function favorites_getPublicList ($user_id, $jump_to = NULL, $min_fave_date = NULL, $max_fave_date = NULL, $extras = NULL, $per_page = NULL, $page = NULL) { 789 /* http ://www.flickr.com/services/api/flickr.favorites.getPublicList.html */784 /* https://www.flickr.com/services/api/flickr.favorites.getPublicList.html */ 790 785 return $this->call('flickr.favorites.getPublicList', array('user_id' => $user_id, 'jump_to' => $jump_to, 'min_fave_date' => $min_fave_date, 'max_fave_date' => $max_fave_date, 'extras' => $extras, 'per_page' => $per_page, 'page' => $page)); 791 786 } 792 787 793 788 function favorites_remove ($photo_id, $user_id = NULL) { 794 /* http ://www.flickr.com/services/api/flickr.favorites.remove.html */789 /* https://www.flickr.com/services/api/flickr.favorites.remove.html */ 795 790 $this->request("flickr.favorites.remove", array('photo_id' => $photo_id, 'user_id' => $user_id), TRUE); 796 791 return $this->parsed_response ? true : false; … … 799 794 /* Galleries Methods */ 800 795 function galleries_addPhoto ($gallery_id, $photo_id, $comment = NULL) { 801 /* http ://www.flickr.com/services/api/flickr.galleries.addPhoto.html */796 /* https://www.flickr.com/services/api/flickr.galleries.addPhoto.html */ 802 797 return $this->call('flickr.galleries.addPhoto', array('gallery_id' => $gallery_id, 'photo_id' => $photo_id, 'comment' => $comment)); 803 798 } 804 799 805 800 function galleries_create ($title, $description, $primary_photo_id = NULL) { 806 /* http ://www.flickr.com/services/api/flickr.galleries.create.html */801 /* https://www.flickr.com/services/api/flickr.galleries.create.html */ 807 802 return $this->call('flickr.galleries.create', array('title' => $title, 'description' => $description, 'primary_photo_id' => $primary_photo_id)); 808 803 } 809 804 810 805 function galleries_editMeta ($gallery_id, $title, $description = NULL) { 811 /* http ://www.flickr.com/services/api/flickr.galleries.editMeta.html */806 /* https://www.flickr.com/services/api/flickr.galleries.editMeta.html */ 812 807 return $this->call('flickr.galleries.editMeta', array('gallery_id' => $gallery_id, 'title' => $title, 'description' => $description)); 813 808 } 814 809 815 810 function galleries_editPhoto ($gallery_id, $photo_id, $comment) { 816 /* http ://www.flickr.com/services/api/flickr.galleries.editPhoto.html */811 /* https://www.flickr.com/services/api/flickr.galleries.editPhoto.html */ 817 812 return $this->call('flickr.galleries.editPhoto', array('gallery_id' => $gallery_id, 'photo_id' => $photo_id, 'comment' => $comment)); 818 813 } 819 814 820 815 function galleries_editPhotos ($gallery_id, $primary_photo_id, $photo_ids) { 821 /* http ://www.flickr.com/services/api/flickr.galleries.editPhotos.html */816 /* https://www.flickr.com/services/api/flickr.galleries.editPhotos.html */ 822 817 return $this->call('flickr.galleries.editPhotos', array('gallery_id' => $gallery_id, 'primary_photo_id' => $primary_photo_id, 'photo_ids' => $photo_ids)); 823 818 } 824 819 825 820 function galleries_getInfo ($gallery_id) { 826 /* http ://www.flickr.com/services/api/flickr.galleries.getInfo.html */821 /* https://www.flickr.com/services/api/flickr.galleries.getInfo.html */ 827 822 return $this->call('flickr.galleries.getInfo', array('gallery_id' => $gallery_id)); 828 823 } 829 824 830 825 function galleries_getList ($user_id, $per_page = NULL, $page = NULL) { 831 /* http ://www.flickr.com/services/api/flickr.galleries.getList.html */826 /* https://www.flickr.com/services/api/flickr.galleries.getList.html */ 832 827 return $this->call('flickr.galleries.getList', array('user_id' => $user_id, 'per_page' => $per_page, 'page' => $page)); 833 828 } 834 829 835 830 function galleries_getListForPhoto ($photo_id, $per_page = NULL, $page = NULL) { 836 /* http ://www.flickr.com/services/api/flickr.galleries.getListForPhoto.html */831 /* https://www.flickr.com/services/api/flickr.galleries.getListForPhoto.html */ 837 832 return $this->call('flickr.galleries.getListForPhoto', array('photo_id' => $photo_id, 'per_page' => $per_page, 'page' => $page)); 838 833 } 839 834 840 835 function galleries_getPhotos ($gallery_id, $extras = NULL, $per_page = NULL, $page = NULL) { 841 /* http ://www.flickr.com/services/api/flickr.galleries.getPhotos.html */836 /* https://www.flickr.com/services/api/flickr.galleries.getPhotos.html */ 842 837 return $this->call('flickr.galleries.getPhotos', array('gallery_id' => $gallery_id, 'extras' => $extras, 'per_page' => $per_page, 'page' => $page)); 843 838 } … … 845 840 /* Groups Methods */ 846 841 function groups_browse ($cat_id = NULL) { 847 /* http ://www.flickr.com/services/api/flickr.groups.browse.html */842 /* https://www.flickr.com/services/api/flickr.groups.browse.html */ 848 843 $this->request("flickr.groups.browse", array("cat_id"=>$cat_id)); 849 844 return $this->parsed_response ? $this->parsed_response['category'] : false; … … 851 846 852 847 function groups_getInfo ($group_id, $lang = NULL) { 853 /* http ://www.flickr.com/services/api/flickr.groups.getInfo.html */848 /* https://www.flickr.com/services/api/flickr.groups.getInfo.html */ 854 849 return $this->call('flickr.groups.getInfo', array('group_id' => $group_id, 'lang' => $lang)); 855 850 } 856 851 857 852 function groups_search ($text, $per_page = NULL, $page = NULL) { 858 /* http ://www.flickr.com/services/api/flickr.groups.search.html */853 /* https://www.flickr.com/services/api/flickr.groups.search.html */ 859 854 $this->request("flickr.groups.search", array("text"=>$text,"per_page"=>$per_page,"page"=>$page)); 860 855 return $this->parsed_response ? $this->parsed_response['groups'] : false; … … 863 858 /* Groups Members Methods */ 864 859 function groups_members_getList ($group_id, $membertypes = NULL, $per_page = NULL, $page = NULL) { 865 /* http ://www.flickr.com/services/api/flickr.groups.members.getList.html */860 /* https://www.flickr.com/services/api/flickr.groups.members.getList.html */ 866 861 return $this->call('flickr.groups.members.getList', array('group_id' => $group_id, 'membertypes' => $membertypes, 'per_page' => $per_page, 'page' => $page)); 867 862 } 868 863 869 864 /* Groups Pools Methods */ 870 865 function groups_pools_add ($photo_id, $group_id) { 871 /* http ://www.flickr.com/services/api/flickr.groups.pools.add.html */866 /* https://www.flickr.com/services/api/flickr.groups.pools.add.html */ 872 867 $this->request("flickr.groups.pools.add", array("photo_id"=>$photo_id, "group_id"=>$group_id), TRUE); 873 868 return $this->parsed_response ? true : false; … … 875 870 876 871 function groups_pools_getContext ($photo_id, $group_id, $num_prev = NULL, $num_next = NULL) { 877 /* http ://www.flickr.com/services/api/flickr.groups.pools.getContext.html */872 /* https://www.flickr.com/services/api/flickr.groups.pools.getContext.html */ 878 873 return $this->call('flickr.groups.pools.getContext', array('photo_id' => $photo_id, 'group_id' => $group_id, 'num_prev' => $num_prev, 'num_next' => $num_next)); 879 874 } 880 875 881 876 function groups_pools_getGroups ($page = NULL, $per_page = NULL) { 882 /* http ://www.flickr.com/services/api/flickr.groups.pools.getGroups.html */877 /* https://www.flickr.com/services/api/flickr.groups.pools.getGroups.html */ 883 878 $this->request("flickr.groups.pools.getGroups", array('page'=>$page, 'per_page'=>$per_page)); 884 879 return $this->parsed_response ? $this->parsed_response['groups'] : false; … … 886 881 887 882 function groups_pools_getPhotos ($group_id, $tags = NULL, $user_id = NULL, $jump_to = NULL, $extras = NULL, $per_page = NULL, $page = NULL) { 888 /* http ://www.flickr.com/services/api/flickr.groups.pools.getPhotos.html */883 /* https://www.flickr.com/services/api/flickr.groups.pools.getPhotos.html */ 889 884 if (is_array($extras)) { 890 885 $extras = implode(",", $extras); … … 894 889 895 890 function groups_pools_remove ($photo_id, $group_id) { 896 /* http ://www.flickr.com/services/api/flickr.groups.pools.remove.html */891 /* https://www.flickr.com/services/api/flickr.groups.pools.remove.html */ 897 892 $this->request("flickr.groups.pools.remove", array("photo_id"=>$photo_id, "group_id"=>$group_id), TRUE); 898 893 return $this->parsed_response ? true : false; … … 901 896 /* Interestingness methods */ 902 897 function interestingness_getList ($date = NULL, $use_panda = NULL, $extras = NULL, $per_page = NULL, $page = NULL) { 903 /* http ://www.flickr.com/services/api/flickr.interestingness.getList.html */898 /* https://www.flickr.com/services/api/flickr.interestingness.getList.html */ 904 899 if (is_array($extras)) { 905 900 $extras = implode(",", $extras); … … 911 906 /* Machine Tag methods */ 912 907 function machinetags_getNamespaces ($predicate = NULL, $per_page = NULL, $page = NULL) { 913 /* http ://www.flickr.com/services/api/flickr.machinetags.getNamespaces.html */908 /* https://www.flickr.com/services/api/flickr.machinetags.getNamespaces.html */ 914 909 return $this->call('flickr.machinetags.getNamespaces', array('predicate' => $predicate, 'per_page' => $per_page, 'page' => $page)); 915 910 } 916 911 917 912 function machinetags_getPairs ($namespace = NULL, $predicate = NULL, $per_page = NULL, $page = NULL) { 918 /* http ://www.flickr.com/services/api/flickr.machinetags.getPairs.html */913 /* https://www.flickr.com/services/api/flickr.machinetags.getPairs.html */ 919 914 return $this->call('flickr.machinetags.getPairs', array('namespace' => $namespace, 'predicate' => $predicate, 'per_page' => $per_page, 'page' => $page)); 920 915 } 921 916 922 917 function machinetags_getPredicates ($namespace = NULL, $per_page = NULL, $page = NULL) { 923 /* http ://www.flickr.com/services/api/flickr.machinetags.getPredicates.html */918 /* https://www.flickr.com/services/api/flickr.machinetags.getPredicates.html */ 924 919 return $this->call('flickr.machinetags.getPredicates', array('namespace' => $namespace, 'per_page' => $per_page, 'page' => $page)); 925 920 } 926 921 927 922 function machinetags_getRecentValues ($namespace = NULL, $predicate = NULL, $added_since = NULL) { 928 /* http ://www.flickr.com/services/api/flickr.machinetags.getRecentValues.html */923 /* https://www.flickr.com/services/api/flickr.machinetags.getRecentValues.html */ 929 924 return $this->call('flickr.machinetags.getRecentValues', array('namespace' => $namespace, 'predicate' => $predicate, 'added_since' => $added_since)); 930 925 } 931 926 932 927 function machinetags_getValues ($namespace, $predicate, $per_page = NULL, $page = NULL, $usage = NULL) { 933 /* http ://www.flickr.com/services/api/flickr.machinetags.getValues.html */928 /* https://www.flickr.com/services/api/flickr.machinetags.getValues.html */ 934 929 return $this->call('flickr.machinetags.getValues', array('namespace' => $namespace, 'predicate' => $predicate, 'per_page' => $per_page, 'page' => $page, 'usage' => $usage)); 935 930 } 936 931 937 932 /* Panda methods */ 938 933 function panda_getList () { 939 /* http ://www.flickr.com/services/api/flickr.panda.getList.html */934 /* https://www.flickr.com/services/api/flickr.panda.getList.html */ 940 935 return $this->call('flickr.panda.getList', array()); 941 936 } 942 937 943 938 function panda_getPhotos ($panda_name, $extras = NULL, $per_page = NULL, $page = NULL) { 944 /* http ://www.flickr.com/services/api/flickr.panda.getPhotos.html */939 /* https://www.flickr.com/services/api/flickr.panda.getPhotos.html */ 945 940 return $this->call('flickr.panda.getPhotos', array('panda_name' => $panda_name, 'extras' => $extras, 'per_page' => $per_page, 'page' => $page)); 946 941 } … … 948 943 /* People methods */ 949 944 function people_findByEmail ($find_email) { 950 /* http ://www.flickr.com/services/api/flickr.people.findByEmail.html */945 /* https://www.flickr.com/services/api/flickr.people.findByEmail.html */ 951 946 $this->request("flickr.people.findByEmail", array("find_email"=>$find_email)); 952 947 return $this->parsed_response ? $this->parsed_response['user'] : false; … … 954 949 955 950 function people_findByUsername ($username) { 956 /* http ://www.flickr.com/services/api/flickr.people.findByUsername.html */951 /* https://www.flickr.com/services/api/flickr.people.findByUsername.html */ 957 952 $this->request("flickr.people.findByUsername", array("username"=>$username)); 958 953 return $this->parsed_response ? $this->parsed_response['user'] : false; … … 960 955 961 956 function people_getInfo ($user_id) { 962 /* http ://www.flickr.com/services/api/flickr.people.getInfo.html */957 /* https://www.flickr.com/services/api/flickr.people.getInfo.html */ 963 958 $this->request("flickr.people.getInfo", array("user_id"=>$user_id)); 964 959 return $this->parsed_response ? $this->parsed_response['person'] : false; … … 977 972 */ 978 973 979 /* http ://www.flickr.com/services/api/flickr.people.getPhotos.html */974 /* https://www.flickr.com/services/api/flickr.people.getPhotos.html */ 980 975 return $this->call('flickr.people.getPhotos', array_merge(array('user_id' => $user_id), $args)); 981 976 } 982 977 983 978 function people_getPhotosOf ($user_id, $extras = NULL, $per_page = NULL, $page = NULL) { 984 /* http ://www.flickr.com/services/api/flickr.people.getPhotosOf.html */979 /* https://www.flickr.com/services/api/flickr.people.getPhotosOf.html */ 985 980 return $this->call('flickr.people.getPhotosOf', array('user_id' => $user_id, 'extras' => $extras, 'per_page' => $per_page, 'page' => $page)); 986 981 } 987 982 988 983 function people_getPublicGroups ($user_id) { 989 /* http ://www.flickr.com/services/api/flickr.people.getPublicGroups.html */984 /* https://www.flickr.com/services/api/flickr.people.getPublicGroups.html */ 990 985 $this->request("flickr.people.getPublicGroups", array("user_id"=>$user_id)); 991 986 return $this->parsed_response ? $this->parsed_response['groups']['group'] : false; … … 993 988 994 989 function people_getPublicPhotos ($user_id, $safe_search = NULL, $extras = NULL, $per_page = NULL, $page = NULL) { 995 /* http ://www.flickr.com/services/api/flickr.people.getPublicPhotos.html */990 /* https://www.flickr.com/services/api/flickr.people.getPublicPhotos.html */ 996 991 return $this->call('flickr.people.getPublicPhotos', array('user_id' => $user_id, 'safe_search' => $safe_search, 'extras' => $extras, 'per_page' => $per_page, 'page' => $page)); 997 992 } 998 993 999 994 function people_getUploadStatus () { 1000 /* http ://www.flickr.com/services/api/flickr.people.getUploadStatus.html */995 /* https://www.flickr.com/services/api/flickr.people.getUploadStatus.html */ 1001 996 /* Requires Authentication */ 1002 997 $this->request("flickr.people.getUploadStatus"); … … 1007 1002 /* Photos Methods */ 1008 1003 function photos_addTags ($photo_id, $tags) { 1009 /* http ://www.flickr.com/services/api/flickr.photos.addTags.html */1004 /* https://www.flickr.com/services/api/flickr.photos.addTags.html */ 1010 1005 $this->request("flickr.photos.addTags", array("photo_id"=>$photo_id, "tags"=>$tags), TRUE); 1011 1006 return $this->parsed_response ? true : false; … … 1013 1008 1014 1009 function photos_delete ($photo_id) { 1015 /* http ://www.flickr.com/services/api/flickr.photos.delete.html */1010 /* https://www.flickr.com/services/api/flickr.photos.delete.html */ 1016 1011 $this->request("flickr.photos.delete", array("photo_id"=>$photo_id), TRUE); 1017 1012 return $this->parsed_response ? true : false; … … 1019 1014 1020 1015 function photos_getAllContexts ($photo_id) { 1021 /* http ://www.flickr.com/services/api/flickr.photos.getAllContexts.html */1016 /* https://www.flickr.com/services/api/flickr.photos.getAllContexts.html */ 1022 1017 $this->request("flickr.photos.getAllContexts", array("photo_id"=>$photo_id)); 1023 1018 return $this->parsed_response ? $this->parsed_response : false; … … 1025 1020 1026 1021 function photos_getContactsPhotos ($count = NULL, $just_friends = NULL, $single_photo = NULL, $include_self = NULL, $extras = NULL) { 1027 /* http ://www.flickr.com/services/api/flickr.photos.getContactsPhotos.html */1022 /* https://www.flickr.com/services/api/flickr.photos.getContactsPhotos.html */ 1028 1023 $this->request("flickr.photos.getContactsPhotos", array("count"=>$count, "just_friends"=>$just_friends, "single_photo"=>$single_photo, "include_self"=>$include_self, "extras"=>$extras)); 1029 1024 return $this->parsed_response ? $this->parsed_response['photos']['photo'] : false; … … 1031 1026 1032 1027 function photos_getContactsPublicPhotos ($user_id, $count = NULL, $just_friends = NULL, $single_photo = NULL, $include_self = NULL, $extras = NULL) { 1033 /* http ://www.flickr.com/services/api/flickr.photos.getContactsPublicPhotos.html */1028 /* https://www.flickr.com/services/api/flickr.photos.getContactsPublicPhotos.html */ 1034 1029 $this->request("flickr.photos.getContactsPublicPhotos", array("user_id"=>$user_id, "count"=>$count, "just_friends"=>$just_friends, "single_photo"=>$single_photo, "include_self"=>$include_self, "extras"=>$extras)); 1035 1030 return $this->parsed_response ? $this->parsed_response['photos']['photo'] : false; … … 1037 1032 1038 1033 function photos_getContext ($photo_id, $num_prev = NULL, $num_next = NULL, $extras = NULL, $order_by = NULL) { 1039 /* http ://www.flickr.com/services/api/flickr.photos.getContext.html */1034 /* https://www.flickr.com/services/api/flickr.photos.getContext.html */ 1040 1035 return $this->call('flickr.photos.getContext', array('photo_id' => $photo_id, 'num_prev' => $num_prev, 'num_next' => $num_next, 'extras' => $extras, 'order_by' => $order_by)); 1041 1036 } 1042 1037 1043 1038 function photos_getCounts ($dates = NULL, $taken_dates = NULL) { 1044 /* http ://www.flickr.com/services/api/flickr.photos.getCounts.html */1039 /* https://www.flickr.com/services/api/flickr.photos.getCounts.html */ 1045 1040 $this->request("flickr.photos.getCounts", array("dates"=>$dates, "taken_dates"=>$taken_dates)); 1046 1041 return $this->parsed_response ? $this->parsed_response['photocounts']['photocount'] : false; … … 1048 1043 1049 1044 function photos_getExif ($photo_id, $secret = NULL) { 1050 /* http ://www.flickr.com/services/api/flickr.photos.getExif.html */1045 /* https://www.flickr.com/services/api/flickr.photos.getExif.html */ 1051 1046 $this->request("flickr.photos.getExif", array("photo_id"=>$photo_id, "secret"=>$secret)); 1052 1047 return $this->parsed_response ? $this->parsed_response['photo'] : false; 1053 1048 } 1054 1049 1055 1050 function photos_getFavorites ($photo_id, $page = NULL, $per_page = NULL) { 1056 /* http ://www.flickr.com/services/api/flickr.photos.getFavorites.html */1051 /* https://www.flickr.com/services/api/flickr.photos.getFavorites.html */ 1057 1052 $this->request("flickr.photos.getFavorites", array("photo_id"=>$photo_id, "page"=>$page, "per_page"=>$per_page)); 1058 1053 return $this->parsed_response ? $this->parsed_response['photo'] : false; … … 1060 1055 1061 1056 function photos_getInfo ($photo_id, $secret = NULL, $humandates = NULL, $privacy_filter = NULL, $get_contexts = NULL) { 1062 /* http ://www.flickr.com/services/api/flickr.photos.getInfo.html */1057 /* https://www.flickr.com/services/api/flickr.photos.getInfo.html */ 1063 1058 return $this->call('flickr.photos.getInfo', array('photo_id' => $photo_id, 'secret' => $secret, 'humandates' => $humandates, 'privacy_filter' => $privacy_filter, 'get_contexts' => $get_contexts)); 1064 1059 } 1065 1060 1066 1061 function photos_getNotInSet ($max_upload_date = NULL, $min_taken_date = NULL, $max_taken_date = NULL, $privacy_filter = NULL, $media = NULL, $min_upload_date = NULL, $extras = NULL, $per_page = NULL, $page = NULL) { 1067 /* http ://www.flickr.com/services/api/flickr.photos.getNotInSet.html */1062 /* https://www.flickr.com/services/api/flickr.photos.getNotInSet.html */ 1068 1063 return $this->call('flickr.photos.getNotInSet', array('max_upload_date' => $max_upload_date, 'min_taken_date' => $min_taken_date, 'max_taken_date' => $max_taken_date, 'privacy_filter' => $privacy_filter, 'media' => $media, 'min_upload_date' => $min_upload_date, 'extras' => $extras, 'per_page' => $per_page, 'page' => $page)); 1069 1064 } 1070 1065 1071 1066 function photos_getPerms ($photo_id) { 1072 /* http ://www.flickr.com/services/api/flickr.photos.getPerms.html */1067 /* https://www.flickr.com/services/api/flickr.photos.getPerms.html */ 1073 1068 $this->request("flickr.photos.getPerms", array("photo_id"=>$photo_id)); 1074 1069 return $this->parsed_response ? $this->parsed_response['perms'] : false; … … 1076 1071 1077 1072 function photos_getRecent ($jump_to = NULL, $extras = NULL, $per_page = NULL, $page = NULL) { 1078 /* http ://www.flickr.com/services/api/flickr.photos.getRecent.html */1073 /* https://www.flickr.com/services/api/flickr.photos.getRecent.html */ 1079 1074 if (is_array($extras)) { 1080 1075 $extras = implode(",", $extras); … … 1084 1079 1085 1080 function photos_getSizes ($photo_id) { 1086 /* http ://www.flickr.com/services/api/flickr.photos.getSizes.html */1081 /* https://www.flickr.com/services/api/flickr.photos.getSizes.html */ 1087 1082 $this->request("flickr.photos.getSizes", array("photo_id"=>$photo_id)); 1088 1083 return $this->parsed_response ? $this->parsed_response['sizes']['size'] : false; … … 1090 1085 1091 1086 function photos_getUntagged ($min_upload_date = NULL, $max_upload_date = NULL, $min_taken_date = NULL, $max_taken_date = NULL, $privacy_filter = NULL, $media = NULL, $extras = NULL, $per_page = NULL, $page = NULL) { 1092 /* http ://www.flickr.com/services/api/flickr.photos.getUntagged.html */1087 /* https://www.flickr.com/services/api/flickr.photos.getUntagged.html */ 1093 1088 return $this->call('flickr.photos.getUntagged', array('min_upload_date' => $min_upload_date, 'max_upload_date' => $max_upload_date, 'min_taken_date' => $min_taken_date, 'max_taken_date' => $max_taken_date, 'privacy_filter' => $privacy_filter, 'media' => $media, 'extras' => $extras, 'per_page' => $per_page, 'page' => $page)); 1094 1089 } … … 1100 1095 * flickr.photos.search method requires at least one search parameter. 1101 1096 */ 1102 /* http ://www.flickr.com/services/api/flickr.photos.getWithGeoData.html */1097 /* https://www.flickr.com/services/api/flickr.photos.getWithGeoData.html */ 1103 1098 $this->request("flickr.photos.getWithGeoData", $args); 1104 1099 return $this->parsed_response ? $this->parsed_response['photos'] : false; … … 1111 1106 * flickr.photos.search method requires at least one search parameter. 1112 1107 */ 1113 /* http ://www.flickr.com/services/api/flickr.photos.getWithoutGeoData.html */1108 /* https://www.flickr.com/services/api/flickr.photos.getWithoutGeoData.html */ 1114 1109 $this->request("flickr.photos.getWithoutGeoData", $args); 1115 1110 return $this->parsed_response ? $this->parsed_response['photos'] : false; … … 1117 1112 1118 1113 function photos_recentlyUpdated ($min_date, $extras = NULL, $per_page = NULL, $page = NULL) { 1119 /* http ://www.flickr.com/services/api/flickr.photos.recentlyUpdated.html */1114 /* https://www.flickr.com/services/api/flickr.photos.recentlyUpdated.html */ 1120 1115 return $this->call('flickr.photos.recentlyUpdated', array('min_date' => $min_date, 'extras' => $extras, 'per_page' => $per_page, 'page' => $page)); 1121 1116 } 1122 1117 1123 1118 function photos_removeTag ($tag_id) { 1124 /* http ://www.flickr.com/services/api/flickr.photos.removeTag.html */1119 /* https://www.flickr.com/services/api/flickr.photos.removeTag.html */ 1125 1120 $this->request("flickr.photos.removeTag", array("tag_id"=>$tag_id), TRUE); 1126 1121 return $this->parsed_response ? true : false; … … 1139 1134 */ 1140 1135 1141 /* http ://www.flickr.com/services/api/flickr.photos.search.html */1136 /* https://www.flickr.com/services/api/flickr.photos.search.html */ 1142 1137 $this->request("flickr.photos.search", $args); 1143 1138 return $this->parsed_response ? $this->parsed_response['photos'] : false; … … 1145 1140 1146 1141 function photos_setContentType ($photo_id, $content_type) { 1147 /* http ://www.flickr.com/services/api/flickr.photos.setContentType.html */1142 /* https://www.flickr.com/services/api/flickr.photos.setContentType.html */ 1148 1143 return $this->call('flickr.photos.setContentType', array('photo_id' => $photo_id, 'content_type' => $content_type)); 1149 1144 } 1150 1145 1151 1146 function photos_setDates ($photo_id, $date_posted = NULL, $date_taken = NULL, $date_taken_granularity = NULL) { 1152 /* http ://www.flickr.com/services/api/flickr.photos.setDates.html */1147 /* https://www.flickr.com/services/api/flickr.photos.setDates.html */ 1153 1148 $this->request("flickr.photos.setDates", array("photo_id"=>$photo_id, "date_posted"=>$date_posted, "date_taken"=>$date_taken, "date_taken_granularity"=>$date_taken_granularity), TRUE); 1154 1149 return $this->parsed_response ? true : false; … … 1156 1151 1157 1152 function photos_setMeta ($photo_id, $title, $description) { 1158 /* http ://www.flickr.com/services/api/flickr.photos.setMeta.html */1153 /* https://www.flickr.com/services/api/flickr.photos.setMeta.html */ 1159 1154 $this->request("flickr.photos.setMeta", array("photo_id"=>$photo_id, "title"=>$title, "description"=>$description), TRUE); 1160 1155 return $this->parsed_response ? true : false; … … 1162 1157 1163 1158 function photos_setPerms ($photo_id, $is_public, $is_friend, $is_family, $perm_comment, $perm_addmeta) { 1164 /* http ://www.flickr.com/services/api/flickr.photos.setPerms.html */1159 /* https://www.flickr.com/services/api/flickr.photos.setPerms.html */ 1165 1160 $this->request("flickr.photos.setPerms", array("photo_id"=>$photo_id, "is_public"=>$is_public, "is_friend"=>$is_friend, "is_family"=>$is_family, "perm_comment"=>$perm_comment, "perm_addmeta"=>$perm_addmeta), TRUE); 1166 1161 return $this->parsed_response ? true : false; … … 1168 1163 1169 1164 function photos_setSafetyLevel ($photo_id, $safety_level = NULL, $hidden = NULL) { 1170 /* http ://www.flickr.com/services/api/flickr.photos.setSafetyLevel.html */1165 /* https://www.flickr.com/services/api/flickr.photos.setSafetyLevel.html */ 1171 1166 return $this->call('flickr.photos.setSafetyLevel', array('photo_id' => $photo_id, 'safety_level' => $safety_level, 'hidden' => $hidden)); 1172 1167 } 1173 1168 1174 1169 function photos_setTags ($photo_id, $tags) { 1175 /* http ://www.flickr.com/services/api/flickr.photos.setTags.html */1170 /* https://www.flickr.com/services/api/flickr.photos.setTags.html */ 1176 1171 $this->request("flickr.photos.setTags", array("photo_id"=>$photo_id, "tags"=>$tags), TRUE); 1177 1172 return $this->parsed_response ? true : false; … … 1180 1175 /* Photos - Comments Methods */ 1181 1176 function photos_comments_addComment ($photo_id, $comment_text) { 1182 /* http ://www.flickr.com/services/api/flickr.photos.comments.addComment.html */1177 /* https://www.flickr.com/services/api/flickr.photos.comments.addComment.html */ 1183 1178 $this->request("flickr.photos.comments.addComment", array("photo_id" => $photo_id, "comment_text"=>$comment_text), TRUE); 1184 1179 return $this->parsed_response ? $this->parsed_response['comment'] : false; … … 1186 1181 1187 1182 function photos_comments_deleteComment ($comment_id) { 1188 /* http ://www.flickr.com/services/api/flickr.photos.comments.deleteComment.html */1183 /* https://www.flickr.com/services/api/flickr.photos.comments.deleteComment.html */ 1189 1184 $this->request("flickr.photos.comments.deleteComment", array("comment_id" => $comment_id), TRUE); 1190 1185 return $this->parsed_response ? true : false; … … 1192 1187 1193 1188 function photos_comments_editComment ($comment_id, $comment_text) { 1194 /* http ://www.flickr.com/services/api/flickr.photos.comments.editComment.html */1189 /* https://www.flickr.com/services/api/flickr.photos.comments.editComment.html */ 1195 1190 $this->request("flickr.photos.comments.editComment", array("comment_id" => $comment_id, "comment_text"=>$comment_text), TRUE); 1196 1191 return $this->parsed_response ? true : false; … … 1198 1193 1199 1194 function photos_comments_getList ($photo_id, $min_comment_date = NULL, $max_comment_date = NULL, $page = NULL, $per_page = NULL, $include_faves = NULL) { 1200 /* http ://www.flickr.com/services/api/flickr.photos.comments.getList.html */1195 /* https://www.flickr.com/services/api/flickr.photos.comments.getList.html */ 1201 1196 return $this->call('flickr.photos.comments.getList', array('photo_id' => $photo_id, 'min_comment_date' => $min_comment_date, 'max_comment_date' => $max_comment_date, 'page' => $page, 'per_page' => $per_page, 'include_faves' => $include_faves)); 1202 1197 } 1203 1198 1204 1199 function photos_comments_getRecentForContacts ($date_lastcomment = NULL, $contacts_filter = NULL, $extras = NULL, $per_page = NULL, $page = NULL) { 1205 /* http ://www.flickr.com/services/api/flickr.photos.comments.getRecentForContacts.html */1200 /* https://www.flickr.com/services/api/flickr.photos.comments.getRecentForContacts.html */ 1206 1201 return $this->call('flickr.photos.comments.getRecentForContacts', array('date_lastcomment' => $date_lastcomment, 'contacts_filter' => $contacts_filter, 'extras' => $extras, 'per_page' => $per_page, 'page' => $page)); 1207 1202 } … … 1209 1204 /* Photos - Geo Methods */ 1210 1205 function photos_geo_batchCorrectLocation ($lat, $lon, $accuracy, $place_id = NULL, $woe_id = NULL) { 1211 /* http ://www.flickr.com/services/api/flickr.photos.geo.batchCorrectLocation.html */1206 /* https://www.flickr.com/services/api/flickr.photos.geo.batchCorrectLocation.html */ 1212 1207 return $this->call('flickr.photos.geo.batchCorrectLocation', array('lat' => $lat, 'lon' => $lon, 'accuracy' => $accuracy, 'place_id' => $place_id, 'woe_id' => $woe_id)); 1213 1208 } 1214 1209 1215 1210 function photos_geo_correctLocation ($photo_id, $place_id = NULL, $woe_id = NULL) { 1216 /* http ://www.flickr.com/services/api/flickr.photos.geo.correctLocation.html */1211 /* https://www.flickr.com/services/api/flickr.photos.geo.correctLocation.html */ 1217 1212 return $this->call('flickr.photos.geo.correctLocation', array('photo_id' => $photo_id, 'place_id' => $place_id, 'woe_id' => $woe_id)); 1218 1213 } 1219 1214 1220 1215 function photos_geo_getLocation ($photo_id) { 1221 /* http ://www.flickr.com/services/api/flickr.photos.geo.getLocation.html */1216 /* https://www.flickr.com/services/api/flickr.photos.geo.getLocation.html */ 1222 1217 $this->request("flickr.photos.geo.getLocation", array("photo_id"=>$photo_id)); 1223 1218 return $this->parsed_response ? $this->parsed_response['photo'] : false; … … 1225 1220 1226 1221 function photos_geo_getPerms ($photo_id) { 1227 /* http ://www.flickr.com/services/api/flickr.photos.geo.getPerms.html */1222 /* https://www.flickr.com/services/api/flickr.photos.geo.getPerms.html */ 1228 1223 $this->request("flickr.photos.geo.getPerms", array("photo_id"=>$photo_id)); 1229 1224 return $this->parsed_response ? $this->parsed_response['perms'] : false; 1230 1225 } 1231 1226 1232 1227 function photos_geo_photosForLocation ($lat, $lon, $accuracy = NULL, $extras = NULL, $per_page = NULL, $page = NULL) { 1233 /* http ://www.flickr.com/services/api/flickr.photos.geo.photosForLocation.html */1228 /* https://www.flickr.com/services/api/flickr.photos.geo.photosForLocation.html */ 1234 1229 return $this->call('flickr.photos.geo.photosForLocation', array('lat' => $lat, 'lon' => $lon, 'accuracy' => $accuracy, 'extras' => $extras, 'per_page' => $per_page, 'page' => $page)); 1235 1230 } 1236 1231 1237 1232 function photos_geo_removeLocation ($photo_id) { 1238 /* http ://www.flickr.com/services/api/flickr.photos.geo.removeLocation.html */1233 /* https://www.flickr.com/services/api/flickr.photos.geo.removeLocation.html */ 1239 1234 $this->request("flickr.photos.geo.removeLocation", array("photo_id"=>$photo_id), TRUE); 1240 1235 return $this->parsed_response ? true : false; … … 1242 1237 1243 1238 function photos_geo_setContext ($photo_id, $context) { 1244 /* http ://www.flickr.com/services/api/flickr.photos.geo.setContext.html */1239 /* https://www.flickr.com/services/api/flickr.photos.geo.setContext.html */ 1245 1240 return $this->call('flickr.photos.geo.setContext', array('photo_id' => $photo_id, 'context' => $context)); 1246 1241 } 1247 1242 1248 1243 function photos_geo_setLocation ($photo_id, $lat, $lon, $accuracy = NULL, $context = NULL, $bookmark_id = NULL) { 1249 /* http ://www.flickr.com/services/api/flickr.photos.geo.setLocation.html */1244 /* https://www.flickr.com/services/api/flickr.photos.geo.setLocation.html */ 1250 1245 return $this->call('flickr.photos.geo.setLocation', array('photo_id' => $photo_id, 'lat' => $lat, 'lon' => $lon, 'accuracy' => $accuracy, 'context' => $context, 'bookmark_id' => $bookmark_id)); 1251 1246 } 1252 1247 1253 1248 function photos_geo_setPerms ($is_public, $is_contact, $is_friend, $is_family, $photo_id) { 1254 /* http ://www.flickr.com/services/api/flickr.photos.geo.setPerms.html */1249 /* https://www.flickr.com/services/api/flickr.photos.geo.setPerms.html */ 1255 1250 return $this->call('flickr.photos.geo.setPerms', array('is_public' => $is_public, 'is_contact' => $is_contact, 'is_friend' => $is_friend, 'is_family' => $is_family, 'photo_id' => $photo_id)); 1256 1251 } … … 1258 1253 /* Photos - Licenses Methods */ 1259 1254 function photos_licenses_getInfo () { 1260 /* http ://www.flickr.com/services/api/flickr.photos.licenses.getInfo.html */1255 /* https://www.flickr.com/services/api/flickr.photos.licenses.getInfo.html */ 1261 1256 $this->request("flickr.photos.licenses.getInfo"); 1262 1257 return $this->parsed_response ? $this->parsed_response['licenses']['license'] : false; … … 1264 1259 1265 1260 function photos_licenses_setLicense ($photo_id, $license_id) { 1266 /* http ://www.flickr.com/services/api/flickr.photos.licenses.setLicense.html */1261 /* https://www.flickr.com/services/api/flickr.photos.licenses.setLicense.html */ 1267 1262 /* Requires Authentication */ 1268 1263 $this->request("flickr.photos.licenses.setLicense", array("photo_id"=>$photo_id, "license_id"=>$license_id), TRUE); … … 1272 1267 /* Photos - Notes Methods */ 1273 1268 function photos_notes_add ($photo_id, $note_x, $note_y, $note_w, $note_h, $note_text) { 1274 /* http ://www.flickr.com/services/api/flickr.photos.notes.add.html */1269 /* https://www.flickr.com/services/api/flickr.photos.notes.add.html */ 1275 1270 $this->request("flickr.photos.notes.add", array("photo_id" => $photo_id, "note_x" => $note_x, "note_y" => $note_y, "note_w" => $note_w, "note_h" => $note_h, "note_text" => $note_text), TRUE); 1276 1271 return $this->parsed_response ? $this->parsed_response['note'] : false; … … 1278 1273 1279 1274 function photos_notes_delete ($note_id) { 1280 /* http ://www.flickr.com/services/api/flickr.photos.notes.delete.html */1275 /* https://www.flickr.com/services/api/flickr.photos.notes.delete.html */ 1281 1276 $this->request("flickr.photos.notes.delete", array("note_id" => $note_id), TRUE); 1282 1277 return $this->parsed_response ? true : false; … … 1284 1279 1285 1280 function photos_notes_edit ($note_id, $note_x, $note_y, $note_w, $note_h, $note_text) { 1286 /* http ://www.flickr.com/services/api/flickr.photos.notes.edit.html */1281 /* https://www.flickr.com/services/api/flickr.photos.notes.edit.html */ 1287 1282 $this->request("flickr.photos.notes.edit", array("note_id" => $note_id, "note_x" => $note_x, "note_y" => $note_y, "note_w" => $note_w, "note_h" => $note_h, "note_text" => $note_text), TRUE); 1288 1283 return $this->parsed_response ? true : false; … … 1291 1286 /* Photos - Transform Methods */ 1292 1287 function photos_transform_rotate ($photo_id, $degrees) { 1293 /* http ://www.flickr.com/services/api/flickr.photos.transform.rotate.html */1288 /* https://www.flickr.com/services/api/flickr.photos.transform.rotate.html */ 1294 1289 $this->request("flickr.photos.transform.rotate", array("photo_id" => $photo_id, "degrees" => $degrees), TRUE); 1295 1290 return $this->parsed_response ? true : false; … … 1298 1293 /* Photos - People Methods */ 1299 1294 function photos_people_add ($photo_id, $user_id, $person_x = NULL, $person_y = NULL, $person_w = NULL, $person_h = NULL) { 1300 /* http ://www.flickr.com/services/api/flickr.photos.people.add.html */1295 /* https://www.flickr.com/services/api/flickr.photos.people.add.html */ 1301 1296 return $this->call('flickr.photos.people.add', array('photo_id' => $photo_id, 'user_id' => $user_id, 'person_x' => $person_x, 'person_y' => $person_y, 'person_w' => $person_w, 'person_h' => $person_h)); 1302 1297 } 1303 1298 1304 1299 function photos_people_delete ($photo_id, $user_id, $email = NULL) { 1305 /* http ://www.flickr.com/services/api/flickr.photos.people.delete.html */1300 /* https://www.flickr.com/services/api/flickr.photos.people.delete.html */ 1306 1301 return $this->call('flickr.photos.people.delete', array('photo_id' => $photo_id, 'user_id' => $user_id, 'email' => $email)); 1307 1302 } 1308 1303 1309 1304 function photos_people_deleteCoords ($photo_id, $user_id) { 1310 /* http ://www.flickr.com/services/api/flickr.photos.people.deleteCoords.html */1305 /* https://www.flickr.com/services/api/flickr.photos.people.deleteCoords.html */ 1311 1306 return $this->call('flickr.photos.people.deleteCoords', array('photo_id' => $photo_id, 'user_id' => $user_id)); 1312 1307 } 1313 1308 1314 1309 function photos_people_editCoords ($photo_id, $user_id, $person_x, $person_y, $person_w, $person_h, $email = NULL) { 1315 /* http ://www.flickr.com/services/api/flickr.photos.people.editCoords.html */1310 /* https://www.flickr.com/services/api/flickr.photos.people.editCoords.html */ 1316 1311 return $this->call('flickr.photos.people.editCoords', array('photo_id' => $photo_id, 'user_id' => $user_id, 'person_x' => $person_x, 'person_y' => $person_y, 'person_w' => $person_w, 'person_h' => $person_h, 'email' => $email)); 1317 1312 } 1318 1313 1319 1314 function photos_people_getList ($photo_id) { 1320 /* http ://www.flickr.com/services/api/flickr.photos.people.getList.html */1315 /* https://www.flickr.com/services/api/flickr.photos.people.getList.html */ 1321 1316 return $this->call('flickr.photos.people.getList', array('photo_id' => $photo_id)); 1322 1317 } 1323 1318 1324 1319 /* Photos - Upload Methods */ 1325 1320 function photos_upload_checkTickets ($tickets) { 1326 /* http ://www.flickr.com/services/api/flickr.photos.upload.checkTickets.html */1321 /* https://www.flickr.com/services/api/flickr.photos.upload.checkTickets.html */ 1327 1322 if (is_array($tickets)) { 1328 1323 $tickets = implode(",", $tickets); … … 1334 1329 /* Photosets Methods */ 1335 1330 function photosets_addPhoto ($photoset_id, $photo_id) { 1336 /* http ://www.flickr.com/services/api/flickr.photosets.addPhoto.html */1331 /* https://www.flickr.com/services/api/flickr.photosets.addPhoto.html */ 1337 1332 $this->request("flickr.photosets.addPhoto", array("photoset_id" => $photoset_id, "photo_id" => $photo_id), TRUE); 1338 1333 return $this->parsed_response ? true : false; … … 1340 1335 1341 1336 function photosets_create ($title, $description, $primary_photo_id) { 1342 /* http ://www.flickr.com/services/api/flickr.photosets.create.html */1337 /* https://www.flickr.com/services/api/flickr.photosets.create.html */ 1343 1338 $this->request("flickr.photosets.create", array("title" => $title, "primary_photo_id" => $primary_photo_id, "description" => $description), TRUE); 1344 1339 return $this->parsed_response ? $this->parsed_response['photoset'] : false; … … 1346 1341 1347 1342 function photosets_delete ($photoset_id) { 1348 /* http ://www.flickr.com/services/api/flickr.photosets.delete.html */1343 /* https://www.flickr.com/services/api/flickr.photosets.delete.html */ 1349 1344 $this->request("flickr.photosets.delete", array("photoset_id" => $photoset_id), TRUE); 1350 1345 return $this->parsed_response ? true : false; … … 1352 1347 1353 1348 function photosets_editMeta ($photoset_id, $title, $description = NULL) { 1354 /* http ://www.flickr.com/services/api/flickr.photosets.editMeta.html */1349 /* https://www.flickr.com/services/api/flickr.photosets.editMeta.html */ 1355 1350 $this->request("flickr.photosets.editMeta", array("photoset_id" => $photoset_id, "title" => $title, "description" => $description), TRUE); 1356 1351 return $this->parsed_response ? true : false; … … 1358 1353 1359 1354 function photosets_editPhotos ($photoset_id, $primary_photo_id, $photo_ids) { 1360 /* http ://www.flickr.com/services/api/flickr.photosets.editPhotos.html */1355 /* https://www.flickr.com/services/api/flickr.photosets.editPhotos.html */ 1361 1356 $this->request("flickr.photosets.editPhotos", array("photoset_id" => $photoset_id, "primary_photo_id" => $primary_photo_id, "photo_ids" => $photo_ids), TRUE); 1362 1357 return $this->parsed_response ? true : false; … … 1364 1359 1365 1360 function photosets_getContext ($photo_id, $photoset_id, $num_prev = NULL, $num_next = NULL) { 1366 /* http ://www.flickr.com/services/api/flickr.photosets.getContext.html */1361 /* https://www.flickr.com/services/api/flickr.photosets.getContext.html */ 1367 1362 return $this->call('flickr.photosets.getContext', array('photo_id' => $photo_id, 'photoset_id' => $photoset_id, 'num_prev' => $num_prev, 'num_next' => $num_next)); 1368 1363 } 1369 1364 1370 1365 function photosets_getInfo ($photoset_id) { 1371 /* http ://www.flickr.com/services/api/flickr.photosets.getInfo.html */1366 /* https://www.flickr.com/services/api/flickr.photosets.getInfo.html */ 1372 1367 $this->request("flickr.photosets.getInfo", array("photoset_id" => $photoset_id)); 1373 1368 return $this->parsed_response ? $this->parsed_response['photoset'] : false; 1374 1369 } 1375 1370 1376 function photosets_getList ($user_id = NULL ) {1377 /* http ://www.flickr.com/services/api/flickr.photosets.getList.html */1378 $this->request("flickr.photosets.getList", array("user_id" => $user_id ));1371 function photosets_getList ($user_id = NULL, $page = NULL, $per_page = NULL, $primary_photo_extras = NULL) { 1372 /* https://www.flickr.com/services/api/flickr.photosets.getList.html */ 1373 $this->request("flickr.photosets.getList", array("user_id" => $user_id, 'page' => $page, 'per_page' => $per_page, 'primary_photo_extras' => $primary_photo_extras)); 1379 1374 return $this->parsed_response ? $this->parsed_response['photosets'] : false; 1380 1375 } 1381 1376 1382 1377 function photosets_getPhotos ($photoset_id, $extras = NULL, $privacy_filter = NULL, $per_page = NULL, $page = NULL, $media = NULL) { 1383 /* http ://www.flickr.com/services/api/flickr.photosets.getPhotos.html */1378 /* https://www.flickr.com/services/api/flickr.photosets.getPhotos.html */ 1384 1379 return $this->call('flickr.photosets.getPhotos', array('photoset_id' => $photoset_id, 'extras' => $extras, 'privacy_filter' => $privacy_filter, 'per_page' => $per_page, 'page' => $page, 'media' => $media)); 1385 1380 } 1386 1381 1387 1382 function photosets_orderSets ($photoset_ids) { 1388 /* http ://www.flickr.com/services/api/flickr.photosets.orderSets.html */1383 /* https://www.flickr.com/services/api/flickr.photosets.orderSets.html */ 1389 1384 if (is_array($photoset_ids)) { 1390 1385 $photoset_ids = implode(",", $photoset_ids); … … 1395 1390 1396 1391 function photosets_removePhoto ($photoset_id, $photo_id) { 1397 /* http ://www.flickr.com/services/api/flickr.photosets.removePhoto.html */1392 /* https://www.flickr.com/services/api/flickr.photosets.removePhoto.html */ 1398 1393 $this->request("flickr.photosets.removePhoto", array("photoset_id" => $photoset_id, "photo_id" => $photo_id), TRUE); 1399 1394 return $this->parsed_response ? true : false; 1400 1395 } 1401 1396 1402 1397 function photosets_removePhotos ($photoset_id, $photo_ids) { 1403 /* http ://www.flickr.com/services/api/flickr.photosets.removePhotos.html */1398 /* https://www.flickr.com/services/api/flickr.photosets.removePhotos.html */ 1404 1399 return $this->call('flickr.photosets.removePhotos', array('photoset_id' => $photoset_id, 'photo_ids' => $photo_ids)); 1405 1400 } 1406 1401 1407 1402 function photosets_reorderPhotos ($photoset_id, $photo_ids) { 1408 /* http ://www.flickr.com/services/api/flickr.photosets.reorderPhotos.html */1403 /* https://www.flickr.com/services/api/flickr.photosets.reorderPhotos.html */ 1409 1404 return $this->call('flickr.photosets.reorderPhotos', array('photoset_id' => $photoset_id, 'photo_ids' => $photo_ids)); 1410 1405 } 1411 1406 1412 1407 function photosets_setPrimaryPhoto ($photoset_id, $photo_id) { 1413 /* http ://www.flickr.com/services/api/flickr.photosets.setPrimaryPhoto.html */1408 /* https://www.flickr.com/services/api/flickr.photosets.setPrimaryPhoto.html */ 1414 1409 return $this->call('flickr.photosets.setPrimaryPhoto', array('photoset_id' => $photoset_id, 'photo_id' => $photo_id)); 1415 1410 } … … 1417 1412 /* Photosets Comments Methods */ 1418 1413 function photosets_comments_addComment ($photoset_id, $comment_text) { 1419 /* http ://www.flickr.com/services/api/flickr.photosets.comments.addComment.html */1414 /* https://www.flickr.com/services/api/flickr.photosets.comments.addComment.html */ 1420 1415 $this->request("flickr.photosets.comments.addComment", array("photoset_id" => $photoset_id, "comment_text"=>$comment_text), TRUE); 1421 1416 return $this->parsed_response ? $this->parsed_response['comment'] : false; … … 1423 1418 1424 1419 function photosets_comments_deleteComment ($comment_id) { 1425 /* http ://www.flickr.com/services/api/flickr.photosets.comments.deleteComment.html */1420 /* https://www.flickr.com/services/api/flickr.photosets.comments.deleteComment.html */ 1426 1421 $this->request("flickr.photosets.comments.deleteComment", array("comment_id" => $comment_id), TRUE); 1427 1422 return $this->parsed_response ? true : false; … … 1429 1424 1430 1425 function photosets_comments_editComment ($comment_id, $comment_text) { 1431 /* http ://www.flickr.com/services/api/flickr.photosets.comments.editComment.html */1426 /* https://www.flickr.com/services/api/flickr.photosets.comments.editComment.html */ 1432 1427 $this->request("flickr.photosets.comments.editComment", array("comment_id" => $comment_id, "comment_text"=>$comment_text), TRUE); 1433 1428 return $this->parsed_response ? true : false; … … 1435 1430 1436 1431 function photosets_comments_getList ($photoset_id) { 1437 /* http ://www.flickr.com/services/api/flickr.photosets.comments.getList.html */1432 /* https://www.flickr.com/services/api/flickr.photosets.comments.getList.html */ 1438 1433 $this->request("flickr.photosets.comments.getList", array("photoset_id"=>$photoset_id)); 1439 1434 return $this->parsed_response ? $this->parsed_response['comments'] : false; 1440 1435 } 1441 1436 1442 1437 /* Places Methods */ 1443 1438 function places_find ($query) { 1444 /* http ://www.flickr.com/services/api/flickr.places.find.html */1439 /* https://www.flickr.com/services/api/flickr.places.find.html */ 1445 1440 return $this->call('flickr.places.find', array('query' => $query)); 1446 1441 } 1447 1442 1448 1443 function places_findByLatLon ($lat, $lon, $accuracy = NULL) { 1449 /* http ://www.flickr.com/services/api/flickr.places.findByLatLon.html */1444 /* https://www.flickr.com/services/api/flickr.places.findByLatLon.html */ 1450 1445 return $this->call('flickr.places.findByLatLon', array('lat' => $lat, 'lon' => $lon, 'accuracy' => $accuracy)); 1451 1446 } 1452 1447 1453 1448 function places_getChildrenWithPhotosPublic ($place_id = NULL, $woe_id = NULL) { 1454 /* http ://www.flickr.com/services/api/flickr.places.getChildrenWithPhotosPublic.html */1449 /* https://www.flickr.com/services/api/flickr.places.getChildrenWithPhotosPublic.html */ 1455 1450 return $this->call('flickr.places.getChildrenWithPhotosPublic', array('place_id' => $place_id, 'woe_id' => $woe_id)); 1456 1451 } 1457 1452 1458 1453 function places_getInfo ($place_id = NULL, $woe_id = NULL) { 1459 /* http ://www.flickr.com/services/api/flickr.places.getInfo.html */1454 /* https://www.flickr.com/services/api/flickr.places.getInfo.html */ 1460 1455 return $this->call('flickr.places.getInfo', array('place_id' => $place_id, 'woe_id' => $woe_id)); 1461 1456 } 1462 1457 1463 1458 function places_getInfoByUrl ($url) { 1464 /* http ://www.flickr.com/services/api/flickr.places.getInfoByUrl.html */1459 /* https://www.flickr.com/services/api/flickr.places.getInfoByUrl.html */ 1465 1460 return $this->call('flickr.places.getInfoByUrl', array('url' => $url)); 1466 1461 } 1467 1462 1468 1463 function places_getPlaceTypes () { 1469 /* http ://www.flickr.com/services/api/flickr.places.getPlaceTypes.html */1464 /* https://www.flickr.com/services/api/flickr.places.getPlaceTypes.html */ 1470 1465 return $this->call('flickr.places.getPlaceTypes', array()); 1471 1466 } 1472 1467 1473 1468 function places_getShapeHistory ($place_id = NULL, $woe_id = NULL) { 1474 /* http ://www.flickr.com/services/api/flickr.places.getShapeHistory.html */1469 /* https://www.flickr.com/services/api/flickr.places.getShapeHistory.html */ 1475 1470 return $this->call('flickr.places.getShapeHistory', array('place_id' => $place_id, 'woe_id' => $woe_id)); 1476 1471 } 1477 1472 1478 1473 function places_getTopPlacesList ($place_type_id, $date = NULL, $woe_id = NULL, $place_id = NULL) { 1479 /* http ://www.flickr.com/services/api/flickr.places.getTopPlacesList.html */1474 /* https://www.flickr.com/services/api/flickr.places.getTopPlacesList.html */ 1480 1475 return $this->call('flickr.places.getTopPlacesList', array('place_type_id' => $place_type_id, 'date' => $date, 'woe_id' => $woe_id, 'place_id' => $place_id)); 1481 1476 } 1482 1477 1483 1478 function places_placesForBoundingBox ($bbox, $place_type = NULL, $place_type_id = NULL, $recursive = NULL) { 1484 /* http ://www.flickr.com/services/api/flickr.places.placesForBoundingBox.html */1479 /* https://www.flickr.com/services/api/flickr.places.placesForBoundingBox.html */ 1485 1480 return $this->call('flickr.places.placesForBoundingBox', array('bbox' => $bbox, 'place_type' => $place_type, 'place_type_id' => $place_type_id, 'recursive' => $recursive)); 1486 1481 } 1487 1482 1488 1483 function places_placesForContacts ($place_type = NULL, $place_type_id = NULL, $woe_id = NULL, $place_id = NULL, $threshold = NULL, $contacts = NULL, $min_upload_date = NULL, $max_upload_date = NULL, $min_taken_date = NULL, $max_taken_date = NULL) { 1489 /* http ://www.flickr.com/services/api/flickr.places.placesForContacts.html */1484 /* https://www.flickr.com/services/api/flickr.places.placesForContacts.html */ 1490 1485 return $this->call('flickr.places.placesForContacts', array('place_type' => $place_type, 'place_type_id' => $place_type_id, 'woe_id' => $woe_id, 'place_id' => $place_id, 'threshold' => $threshold, 'contacts' => $contacts, 'min_upload_date' => $min_upload_date, 'max_upload_date' => $max_upload_date, 'min_taken_date' => $min_taken_date, 'max_taken_date' => $max_taken_date)); 1491 1486 } 1492 1487 1493 1488 function places_placesForTags ($place_type_id, $woe_id = NULL, $place_id = NULL, $threshold = NULL, $tags = NULL, $tag_mode = NULL, $machine_tags = NULL, $machine_tag_mode = NULL, $min_upload_date = NULL, $max_upload_date = NULL, $min_taken_date = NULL, $max_taken_date = NULL) { 1494 /* http ://www.flickr.com/services/api/flickr.places.placesForTags.html */1489 /* https://www.flickr.com/services/api/flickr.places.placesForTags.html */ 1495 1490 return $this->call('flickr.places.placesForTags', array('place_type_id' => $place_type_id, 'woe_id' => $woe_id, 'place_id' => $place_id, 'threshold' => $threshold, 'tags' => $tags, 'tag_mode' => $tag_mode, 'machine_tags' => $machine_tags, 'machine_tag_mode' => $machine_tag_mode, 'min_upload_date' => $min_upload_date, 'max_upload_date' => $max_upload_date, 'min_taken_date' => $min_taken_date, 'max_taken_date' => $max_taken_date)); 1496 1491 } 1497 1492 1498 1493 function places_placesForUser ($place_type_id = NULL, $place_type = NULL, $woe_id = NULL, $place_id = NULL, $threshold = NULL, $min_upload_date = NULL, $max_upload_date = NULL, $min_taken_date = NULL, $max_taken_date = NULL) { 1499 /* http ://www.flickr.com/services/api/flickr.places.placesForUser.html */1494 /* https://www.flickr.com/services/api/flickr.places.placesForUser.html */ 1500 1495 return $this->call('flickr.places.placesForUser', array('place_type_id' => $place_type_id, 'place_type' => $place_type, 'woe_id' => $woe_id, 'place_id' => $place_id, 'threshold' => $threshold, 'min_upload_date' => $min_upload_date, 'max_upload_date' => $max_upload_date, 'min_taken_date' => $min_taken_date, 'max_taken_date' => $max_taken_date)); 1501 1496 } 1502 1497 1503 1498 function places_resolvePlaceId ($place_id) { 1504 /* http ://www.flickr.com/services/api/flickr.places.resolvePlaceId.html */1499 /* https://www.flickr.com/services/api/flickr.places.resolvePlaceId.html */ 1505 1500 $rsp = $this->call('flickr.places.resolvePlaceId', array('place_id' => $place_id)); 1506 1501 return $rsp ? $rsp['location'] : $rsp; 1507 1502 } 1508 1503 1509 1504 function places_resolvePlaceURL ($url) { 1510 /* http ://www.flickr.com/services/api/flickr.places.resolvePlaceURL.html */1505 /* https://www.flickr.com/services/api/flickr.places.resolvePlaceURL.html */ 1511 1506 $rsp = $this->call('flickr.places.resolvePlaceURL', array('url' => $url)); 1512 1507 return $rsp ? $rsp['location'] : $rsp; 1513 1508 } 1514 1509 1515 1510 function places_tagsForPlace ($woe_id = NULL, $place_id = NULL, $min_upload_date = NULL, $max_upload_date = NULL, $min_taken_date = NULL, $max_taken_date = NULL) { 1516 /* http ://www.flickr.com/services/api/flickr.places.tagsForPlace.html */1511 /* https://www.flickr.com/services/api/flickr.places.tagsForPlace.html */ 1517 1512 return $this->call('flickr.places.tagsForPlace', array('woe_id' => $woe_id, 'place_id' => $place_id, 'min_upload_date' => $min_upload_date, 'max_upload_date' => $max_upload_date, 'min_taken_date' => $min_taken_date, 'max_taken_date' => $max_taken_date)); 1518 1513 } … … 1520 1515 /* Prefs Methods */ 1521 1516 function prefs_getContentType () { 1522 /* http ://www.flickr.com/services/api/flickr.prefs.getContentType.html */1517 /* https://www.flickr.com/services/api/flickr.prefs.getContentType.html */ 1523 1518 $rsp = $this->call('flickr.prefs.getContentType', array()); 1524 1519 return $rsp ? $rsp['person'] : $rsp; 1525 1520 } 1526 1521 1527 1522 function prefs_getGeoPerms () { 1528 /* http ://www.flickr.com/services/api/flickr.prefs.getGeoPerms.html */1523 /* https://www.flickr.com/services/api/flickr.prefs.getGeoPerms.html */ 1529 1524 return $this->call('flickr.prefs.getGeoPerms', array()); 1530 1525 } 1531 1526 1532 1527 function prefs_getHidden () { 1533 /* http ://www.flickr.com/services/api/flickr.prefs.getHidden.html */1528 /* https://www.flickr.com/services/api/flickr.prefs.getHidden.html */ 1534 1529 $rsp = $this->call('flickr.prefs.getHidden', array()); 1535 1530 return $rsp ? $rsp['person'] : $rsp; 1536 1531 } 1537 1532 1538 1533 function prefs_getPrivacy () { 1539 /* http ://www.flickr.com/services/api/flickr.prefs.getPrivacy.html */1534 /* https://www.flickr.com/services/api/flickr.prefs.getPrivacy.html */ 1540 1535 $rsp = $this->call('flickr.prefs.getPrivacy', array()); 1541 1536 return $rsp ? $rsp['person'] : $rsp; 1542 1537 } 1543 1538 1544 1539 function prefs_getSafetyLevel () { 1545 /* http ://www.flickr.com/services/api/flickr.prefs.getSafetyLevel.html */1540 /* https://www.flickr.com/services/api/flickr.prefs.getSafetyLevel.html */ 1546 1541 $rsp = $this->call('flickr.prefs.getSafetyLevel', array()); 1547 1542 return $rsp ? $rsp['person'] : $rsp; … … 1550 1545 /* Reflection Methods */ 1551 1546 function reflection_getMethodInfo ($method_name) { 1552 /* http ://www.flickr.com/services/api/flickr.reflection.getMethodInfo.html */1547 /* https://www.flickr.com/services/api/flickr.reflection.getMethodInfo.html */ 1553 1548 $this->request("flickr.reflection.getMethodInfo", array("method_name" => $method_name)); 1554 1549 return $this->parsed_response ? $this->parsed_response : false; … … 1556 1551 1557 1552 function reflection_getMethods () { 1558 /* http ://www.flickr.com/services/api/flickr.reflection.getMethods.html */1553 /* https://www.flickr.com/services/api/flickr.reflection.getMethods.html */ 1559 1554 $this->request("flickr.reflection.getMethods"); 1560 1555 return $this->parsed_response ? $this->parsed_response['methods']['method'] : false; … … 1563 1558 /* Stats Methods */ 1564 1559 function stats_getCollectionDomains ($date, $collection_id = NULL, $per_page = NULL, $page = NULL) { 1565 /* http ://www.flickr.com/services/api/flickr.stats.getCollectionDomains.html */1560 /* https://www.flickr.com/services/api/flickr.stats.getCollectionDomains.html */ 1566 1561 return $this->call('flickr.stats.getCollectionDomains', array('date' => $date, 'collection_id' => $collection_id, 'per_page' => $per_page, 'page' => $page)); 1567 1562 } 1568 1563 1569 1564 function stats_getCollectionReferrers ($date, $domain, $collection_id = NULL, $per_page = NULL, $page = NULL) { 1570 /* http ://www.flickr.com/services/api/flickr.stats.getCollectionReferrers.html */1565 /* https://www.flickr.com/services/api/flickr.stats.getCollectionReferrers.html */ 1571 1566 return $this->call('flickr.stats.getCollectionReferrers', array('date' => $date, 'domain' => $domain, 'collection_id' => $collection_id, 'per_page' => $per_page, 'page' => $page)); 1572 1567 } 1573 1568 1574 1569 function stats_getCollectionStats ($date, $collection_id) { 1575 /* http ://www.flickr.com/services/api/flickr.stats.getCollectionStats.html */1570 /* https://www.flickr.com/services/api/flickr.stats.getCollectionStats.html */ 1576 1571 return $this->call('flickr.stats.getCollectionStats', array('date' => $date, 'collection_id' => $collection_id)); 1577 1572 } 1578 1573 1579 1574 function stats_getCSVFiles () { 1580 /* http ://www.flickr.com/services/api/flickr.stats.getCSVFiles.html */1575 /* https://www.flickr.com/services/api/flickr.stats.getCSVFiles.html */ 1581 1576 return $this->call('flickr.stats.getCSVFiles', array()); 1582 1577 } 1583 1578 1584 1579 function stats_getPhotoDomains ($date, $photo_id = NULL, $per_page = NULL, $page = NULL) { 1585 /* http ://www.flickr.com/services/api/flickr.stats.getPhotoDomains.html */1580 /* https://www.flickr.com/services/api/flickr.stats.getPhotoDomains.html */ 1586 1581 return $this->call('flickr.stats.getPhotoDomains', array('date' => $date, 'photo_id' => $photo_id, 'per_page' => $per_page, 'page' => $page)); 1587 1582 } 1588 1583 1589 1584 function stats_getPhotoReferrers ($date, $domain, $photo_id = NULL, $per_page = NULL, $page = NULL) { 1590 /* http ://www.flickr.com/services/api/flickr.stats.getPhotoReferrers.html */1585 /* https://www.flickr.com/services/api/flickr.stats.getPhotoReferrers.html */ 1591 1586 return $this->call('flickr.stats.getPhotoReferrers', array('date' => $date, 'domain' => $domain, 'photo_id' => $photo_id, 'per_page' => $per_page, 'page' => $page)); 1592 1587 } 1593 1588 1594 1589 function stats_getPhotosetDomains ($date, $photoset_id = NULL, $per_page = NULL, $page = NULL) { 1595 /* http ://www.flickr.com/services/api/flickr.stats.getPhotosetDomains.html */1590 /* https://www.flickr.com/services/api/flickr.stats.getPhotosetDomains.html */ 1596 1591 return $this->call('flickr.stats.getPhotosetDomains', array('date' => $date, 'photoset_id' => $photoset_id, 'per_page' => $per_page, 'page' => $page)); 1597 1592 } 1598 1593 1599 1594 function stats_getPhotosetReferrers ($date, $domain, $photoset_id = NULL, $per_page = NULL, $page = NULL) { 1600 /* http ://www.flickr.com/services/api/flickr.stats.getPhotosetReferrers.html */1595 /* https://www.flickr.com/services/api/flickr.stats.getPhotosetReferrers.html */ 1601 1596 return $this->call('flickr.stats.getPhotosetReferrers', array('date' => $date, 'domain' => $domain, 'photoset_id' => $photoset_id, 'per_page' => $per_page, 'page' => $page)); 1602 1597 } 1603 1598 1604 1599 function stats_getPhotosetStats ($date, $photoset_id) { 1605 /* http ://www.flickr.com/services/api/flickr.stats.getPhotosetStats.html */1600 /* https://www.flickr.com/services/api/flickr.stats.getPhotosetStats.html */ 1606 1601 return $this->call('flickr.stats.getPhotosetStats', array('date' => $date, 'photoset_id' => $photoset_id)); 1607 1602 } 1608 1603 1609 1604 function stats_getPhotoStats ($date, $photo_id) { 1610 /* http ://www.flickr.com/services/api/flickr.stats.getPhotoStats.html */1605 /* https://www.flickr.com/services/api/flickr.stats.getPhotoStats.html */ 1611 1606 return $this->call('flickr.stats.getPhotoStats', array('date' => $date, 'photo_id' => $photo_id)); 1612 1607 } 1613 1608 1614 1609 function stats_getPhotostreamDomains ($date, $per_page = NULL, $page = NULL) { 1615 /* http ://www.flickr.com/services/api/flickr.stats.getPhotostreamDomains.html */1610 /* https://www.flickr.com/services/api/flickr.stats.getPhotostreamDomains.html */ 1616 1611 return $this->call('flickr.stats.getPhotostreamDomains', array('date' => $date, 'per_page' => $per_page, 'page' => $page)); 1617 1612 } 1618 1613 1619 1614 function stats_getPhotostreamReferrers ($date, $domain, $per_page = NULL, $page = NULL) { 1620 /* http ://www.flickr.com/services/api/flickr.stats.getPhotostreamReferrers.html */1615 /* https://www.flickr.com/services/api/flickr.stats.getPhotostreamReferrers.html */ 1621 1616 return $this->call('flickr.stats.getPhotostreamReferrers', array('date' => $date, 'domain' => $domain, 'per_page' => $per_page, 'page' => $page)); 1622 1617 } 1623 1618 1624 1619 function stats_getPhotostreamStats ($date) { 1625 /* http ://www.flickr.com/services/api/flickr.stats.getPhotostreamStats.html */1620 /* https://www.flickr.com/services/api/flickr.stats.getPhotostreamStats.html */ 1626 1621 return $this->call('flickr.stats.getPhotostreamStats', array('date' => $date)); 1627 1622 } 1628 1623 1629 1624 function stats_getPopularPhotos ($date = NULL, $sort = NULL, $per_page = NULL, $page = NULL) { 1630 /* http ://www.flickr.com/services/api/flickr.stats.getPopularPhotos.html */1625 /* https://www.flickr.com/services/api/flickr.stats.getPopularPhotos.html */ 1631 1626 return $this->call('flickr.stats.getPopularPhotos', array('date' => $date, 'sort' => $sort, 'per_page' => $per_page, 'page' => $page)); 1632 1627 } 1633 1628 1634 1629 function stats_getTotalViews ($date = NULL) { 1635 /* http ://www.flickr.com/services/api/flickr.stats.getTotalViews.html */1630 /* https://www.flickr.com/services/api/flickr.stats.getTotalViews.html */ 1636 1631 return $this->call('flickr.stats.getTotalViews', array('date' => $date)); 1637 1632 } 1638 1633 1639 1634 /* Tags Methods */ 1640 1635 function tags_getClusterPhotos ($tag, $cluster_id) { 1641 /* http ://www.flickr.com/services/api/flickr.tags.getClusterPhotos.html */1636 /* https://www.flickr.com/services/api/flickr.tags.getClusterPhotos.html */ 1642 1637 return $this->call('flickr.tags.getClusterPhotos', array('tag' => $tag, 'cluster_id' => $cluster_id)); 1643 1638 } 1644 1639 1645 1640 function tags_getClusters ($tag) { 1646 /* http ://www.flickr.com/services/api/flickr.tags.getClusters.html */1641 /* https://www.flickr.com/services/api/flickr.tags.getClusters.html */ 1647 1642 return $this->call('flickr.tags.getClusters', array('tag' => $tag)); 1648 1643 } 1649 1644 1650 1645 function tags_getHotList ($period = NULL, $count = NULL) { 1651 /* http ://www.flickr.com/services/api/flickr.tags.getHotList.html */1646 /* https://www.flickr.com/services/api/flickr.tags.getHotList.html */ 1652 1647 $this->request("flickr.tags.getHotList", array("period" => $period, "count" => $count)); 1653 1648 return $this->parsed_response ? $this->parsed_response['hottags'] : false; … … 1655 1650 1656 1651 function tags_getListPhoto ($photo_id) { 1657 /* http ://www.flickr.com/services/api/flickr.tags.getListPhoto.html */1652 /* https://www.flickr.com/services/api/flickr.tags.getListPhoto.html */ 1658 1653 $this->request("flickr.tags.getListPhoto", array("photo_id" => $photo_id)); 1659 1654 return $this->parsed_response ? $this->parsed_response['photo']['tags']['tag'] : false; … … 1661 1656 1662 1657 function tags_getListUser ($user_id = NULL) { 1663 /* http ://www.flickr.com/services/api/flickr.tags.getListUser.html */1658 /* https://www.flickr.com/services/api/flickr.tags.getListUser.html */ 1664 1659 $this->request("flickr.tags.getListUser", array("user_id" => $user_id)); 1665 1660 return $this->parsed_response ? $this->parsed_response['who']['tags']['tag'] : false; … … 1667 1662 1668 1663 function tags_getListUserPopular ($user_id = NULL, $count = NULL) { 1669 /* http ://www.flickr.com/services/api/flickr.tags.getListUserPopular.html */1664 /* https://www.flickr.com/services/api/flickr.tags.getListUserPopular.html */ 1670 1665 $this->request("flickr.tags.getListUserPopular", array("user_id" => $user_id, "count" => $count)); 1671 1666 return $this->parsed_response ? $this->parsed_response['who']['tags']['tag'] : false; … … 1673 1668 1674 1669 function tags_getListUserRaw ($tag = NULL) { 1675 /* http ://www.flickr.com/services/api/flickr.tags.getListUserRaw.html */1670 /* https://www.flickr.com/services/api/flickr.tags.getListUserRaw.html */ 1676 1671 return $this->call('flickr.tags.getListUserRaw', array('tag' => $tag)); 1677 1672 } 1678 1673 1679 1674 function tags_getRelated ($tag) { 1680 /* http ://www.flickr.com/services/api/flickr.tags.getRelated.html */1675 /* https://www.flickr.com/services/api/flickr.tags.getRelated.html */ 1681 1676 $this->request("flickr.tags.getRelated", array("tag" => $tag)); 1682 1677 return $this->parsed_response ? $this->parsed_response['tags'] : false; … … 1684 1679 1685 1680 function test_echo ($args = array()) { 1686 /* http ://www.flickr.com/services/api/flickr.test.echo.html */1681 /* https://www.flickr.com/services/api/flickr.test.echo.html */ 1687 1682 $this->request("flickr.test.echo", $args); 1688 1683 return $this->parsed_response ? $this->parsed_response : false; … … 1690 1685 1691 1686 function test_login () { 1692 /* http ://www.flickr.com/services/api/flickr.test.login.html */1687 /* https://www.flickr.com/services/api/flickr.test.login.html */ 1693 1688 $this->request("flickr.test.login"); 1694 1689 return $this->parsed_response ? $this->parsed_response['user'] : false; … … 1696 1691 1697 1692 function urls_getGroup ($group_id) { 1698 /* http ://www.flickr.com/services/api/flickr.urls.getGroup.html */1693 /* https://www.flickr.com/services/api/flickr.urls.getGroup.html */ 1699 1694 $this->request("flickr.urls.getGroup", array("group_id"=>$group_id)); 1700 1695 return $this->parsed_response ? $this->parsed_response['group']['url'] : false; … … 1702 1697 1703 1698 function urls_getUserPhotos ($user_id = NULL) { 1704 /* http ://www.flickr.com/services/api/flickr.urls.getUserPhotos.html */1699 /* https://www.flickr.com/services/api/flickr.urls.getUserPhotos.html */ 1705 1700 $this->request("flickr.urls.getUserPhotos", array("user_id"=>$user_id)); 1706 1701 return $this->parsed_response ? $this->parsed_response['user']['url'] : false; … … 1708 1703 1709 1704 function urls_getUserProfile ($user_id = NULL) { 1710 /* http ://www.flickr.com/services/api/flickr.urls.getUserProfile.html */1705 /* https://www.flickr.com/services/api/flickr.urls.getUserProfile.html */ 1711 1706 $this->request("flickr.urls.getUserProfile", array("user_id"=>$user_id)); 1712 1707 return $this->parsed_response ? $this->parsed_response['user']['url'] : false; 1713 1708 } 1714 1709 1715 1710 function urls_lookupGallery ($url) { 1716 /* http ://www.flickr.com/services/api/flickr.urls.lookupGallery.html */1711 /* https://www.flickr.com/services/api/flickr.urls.lookupGallery.html */ 1717 1712 return $this->call('flickr.urls.lookupGallery', array('url' => $url)); 1718 1713 } 1719 1714 1720 1715 function urls_lookupGroup ($url) { 1721 /* http ://www.flickr.com/services/api/flickr.urls.lookupGroup.html */1716 /* https://www.flickr.com/services/api/flickr.urls.lookupGroup.html */ 1722 1717 $this->request("flickr.urls.lookupGroup", array("url"=>$url)); 1723 1718 return $this->parsed_response ? $this->parsed_response['group'] : false; … … 1725 1720 1726 1721 function urls_lookupUser ($url) { 1727 /* http ://www.flickr.com/services/api/flickr.photos.notes.edit.html */1722 /* https://www.flickr.com/services/api/flickr.photos.notes.edit.html */ 1728 1723 $this->request("flickr.urls.lookupUser", array("url"=>$url)); 1729 1724 return $this->parsed_response ? $this->parsed_response['user'] : false; … … 1736 1731 var $phpFlickr, $per_page, $method, $args, $results, $global_phpFlickr; 1737 1732 var $total = null, $page = 0, $pages = null, $photos, $_extra = null; 1738 1739 1733 1734 1740 1735 function phpFlickr_pager($phpFlickr, $method = null, $args = null, $per_page = 30) { 1741 1736 $this->per_page = $per_page; … … 1744 1739 $this->set_phpFlickr($phpFlickr); 1745 1740 } 1746 1741 1747 1742 function set_phpFlickr($phpFlickr) { 1748 1743 if ( is_a($phpFlickr, 'phpFlickr') ) { … … 1755 1750 } 1756 1751 } 1757 1752 1758 1753 function __sleep() { 1759 1754 return array( … … 1765 1760 ); 1766 1761 } 1767 1762 1768 1763 function load($page) { 1769 1764 $allowed_methods = array( … … 1772 1767 ); 1773 1768 if ( !in_array($this->method, array_keys($allowed_methods)) ) return false; 1774 1769 1775 1770 if ( $this->phpFlickr->cache ) { 1776 1771 $min = ($page - 1) * $this->per_page; … … 1797 1792 $this->total = $this->results['total']; 1798 1793 $this->pages = ceil($this->results['total'] / $this->per_page); 1799 1794 1800 1795 $this->args['page'] = floor($min/500) + 2; 1801 1796 $this->results = $this->phpFlickr->call($this->method, $this->args); … … 1815 1810 if ( $this->results ) { 1816 1811 $this->results = $this->results[$allowed_methods[$this->method]]; 1817 1812 1818 1813 $this->photos = $this->results['photo']; 1819 1814 $this->total = $this->results['total']; … … 1825 1820 } 1826 1821 } 1827 1822 1828 1823 function get($page = null) { 1829 1824 if ( is_null($page) ) { … … 1839 1834 return array(); 1840 1835 } 1841 1836 1842 1837 function next() { 1843 1838 $this->page++; … … 1849 1844 return array(); 1850 1845 } 1851 1846 1852 1847 } 1853 1848 }
Note: See TracChangeset
for help on using the changeset viewer.