Changeset 959871
- Timestamp:
- 08/04/2014 10:23:37 AM (12 years ago)
- Location:
- wp2flickr/trunk
- Files:
-
- 2 added
- 1 deleted
- 3 edited
-
phpFlickr-3.1/LICENSE (added)
-
phpFlickr-3.1/README.md (added)
-
phpFlickr-3.1/README.txt (deleted)
-
phpFlickr-3.1/phpFlickr.php (modified) (117 diffs)
-
readme.txt (modified) (2 diffs)
-
wp2flickr.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
wp2flickr/trunk/phpFlickr-3.1/phpFlickr.php
r919244 r959871 1 1 <?php 2 /* phpFlickr Class 3.12 /* phpFlickr 3 3 * Written by Dan Coulter ([email protected]) 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 */ 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/>. 18 * 19 */ 17 20 if ( !class_exists('w2f_phpFlickr') ) { 18 21 if (session_id() == "") { … … 23 26 var $api_key; 24 27 var $secret; 25 28 26 29 var $rest_endpoint = 'https://api.flickr.com/services/rest/'; 27 var $upload_endpoint = 'https:// api.flickr.com/services/upload/';28 var $replace_endpoint = 'https:// api.flickr.com/services/replace/';30 var $upload_endpoint = 'https://up.flickr.com/services/upload/'; 31 var $replace_endpoint = 'https://up.flickr.com/services/replace/'; 29 32 var $req; 30 33 var $response; … … 58 61 function w2f_phpFlickr ($api_key, $secret = NULL, $die_on_error = false) { 59 62 //The API Key must be set before any calls can be made. You can 60 //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 61 64 $this->api_key = $api_key; 62 65 $this->secret = $secret; … … 79 82 if ($type == 'db') { 80 83 if ( preg_match('|mysql://([^:]*):([^@]*)@([^/]*)/(.*)|', $connection, $matches) ) { 81 //Array ( [0] => mysql://user:password@server/database [1] => user [2] => password [3] => server [4] => database ) 82 $db = mysql _connect($matches[3], $matches[1],$matches[2]);83 mysql _select_db($matches[4], $db);84 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 85 88 /* 86 89 * If high performance is crucial, you can easily comment 87 90 * out this query once you've created your database table. 88 91 */ 89 mysql _query("92 mysqli_query($db, " 90 93 CREATE TABLE IF NOT EXISTS `$table` ( 91 `request` CHAR( 35 ) NOT NULL , 92 `response` MEDIUMTEXT NOT NULL , 93 `expiration` DATETIME NOT NULL , 94 INDEX ( `request` ) 95 ) TYPE = MYISAM 96 ", $db); 94 `request` varchar(128) NOT NULL, 95 `response` mediumtext NOT NULL, 96 `expiration` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 97 UNIQUE KEY `request` (`request`) 98 ) 99 "); 100 101 $result = mysqli_query($db, "SELECT COUNT(*) 'count' FROM $table"); 102 if( $result ) { 103 $result = mysqli_fetch_assoc($result); 104 } 97 105 98 $result = mysql_query("SELECT COUNT(*) FROM $table", $db); 99 $result = mysql_fetch_row($result); 100 if ( $result[0] > $this->max_cache_rows ) { 101 mysql_query("DELETE FROM $table WHERE expiration < DATE_SUB(NOW(), INTERVAL $cache_expire second)", $db); 102 mysql_query('OPTIMIZE TABLE ' . $this->cache_table, $db); 106 if ( $result && $result['count'] > $this->max_cache_rows ) { 107 mysqli_query($db, "DELETE FROM $table WHERE CURRENT_TIMESTAMP > expiration"); 108 mysqli_query($db, 'OPTIMIZE TABLE ' . $this->cache_table); 103 109 } 104 110 $this->cache = 'db'; … … 130 136 //If there is no cache result, it returns a value of false. If it finds one, 131 137 //it returns the unparsed XML. 138 unset($request['api_sig']); 132 139 foreach ( $request as $key => $value ) { 133 140 if ( empty($value) ) unset($request[$key]); … … 139 146 $this->cache_request = $request; 140 147 if ($this->cache == 'db') { 141 $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);142 if ( mysql_num_rows($result) ) {143 $result = mysql _fetch_assoc($result);144 return $result['response'];148 $result = mysqli_query($this->cache_db, "SELECT response FROM " . $this->cache_table . " WHERE request = '" . $reqhash . "' AND CURRENT_TIMESTAMP < expiration"); 149 if ( $result && mysqli_num_rows($result) ) { 150 $result = mysqli_fetch_assoc($result); 151 return urldecode($result['response']); 145 152 } else { 146 153 return false; … … 172 179 if ($this->cache == 'db') { 173 180 //$this->cache_db->query("DELETE FROM $this->cache_table WHERE request = '$reqhash'"); 174 $result = mysql_query("SELECT COUNT(*) FROM " . $this->cache_table . " WHERE request = '" . $reqhash . "'", $this->cache_db); 175 $result = mysql_fetch_row($result); 176 if ( $result[0] ) { 177 $sql = "UPDATE " . $this->cache_table . " SET response = '" . str_replace("'", "''", $response) . "', expiration = '" . strftime("%Y-%m-%d %H:%M:%S") . "' WHERE request = '" . $reqhash . "'"; 178 mysql_query($sql, $this->cache_db); 179 } else { 180 $sql = "INSERT INTO " . $this->cache_table . " (request, response, expiration) VALUES ('$reqhash', '" . str_replace("'", "''", $response) . "', '" . strftime("%Y-%m-%d %H:%M:%S") . "')"; 181 mysql_query($sql, $this->cache_db); 182 } 181 $response = urlencode($response); 182 $sql = 'INSERT INTO '.$this->cache_table.' (request, response, expiration) 183 VALUES (\''.$reqhash.'\', \''.$response.'\', TIMESTAMPADD(SECOND,'.$this->cache_expire.',CURRENT_TIMESTAMP)) 184 ON DUPLICATE KEY UPDATE response=\''.$response.'\', 185 expiration=TIMESTAMPADD(SECOND,'.$this->cache_expire.',CURRENT_TIMESTAMP) '; 186 187 $result = mysqli_query($this->cache_db, $sql); 188 if(!$result) { 189 echo mysqli_error($this->cache_db); 190 } 191 192 return $result; 183 193 } elseif ($this->cache == "fs") { 184 194 $file = $this->cache_dir . "/" . $reqhash . ".cache"; … … 192 202 return false; 193 203 } 194 204 195 205 function setCustomPost ( $function ) { 196 206 $this->custom_post = $function; 197 207 } 198 208 199 209 function post ($data, $type = null) { 200 210 if ( is_null($type) ) { 201 211 $url = $this->rest_endpoint; 202 212 } 203 213 204 214 if ( !is_null($this->custom_post) ) { 205 215 return call_user_func($this->custom_post, $url, $data); 206 216 } 207 208 if ( !preg_match("|http ://(.*?)(/.*)|", $url, $matches) ) {217 218 if ( !preg_match("|https://(.*?)(/.*)|", $url, $matches) ) { 209 219 die('There was some problem figuring out your endpoint'); 210 220 } 211 221 212 222 if ( function_exists('curl_init') ) { 213 223 // Has curl. Use it! … … 224 234 } 225 235 $data = implode('&', $data); 226 227 $fp = @pfsockopen( $matches[1], 80);236 237 $fp = @pfsockopen('ssl://'.$matches[1], 443); 228 238 if (!$fp) { 229 239 die('Could not connect to the web service'); … … 259 269 return $response; 260 270 } 261 271 262 272 function request ($command, $args = array(), $nocache = false) 263 273 { … … 268 278 269 279 //Process arguments, including method and login data. 270 $args = array_merge(array("method" => $command, "format" => " php_serial", "api_key" => $this->api_key), $args);280 $args = array_merge(array("method" => $command, "format" => "json", "nojsoncallback" => "1", "api_key" => $this->api_key), $args); 271 281 if (!empty($this->token)) { 272 282 $args = array_merge($args, array("auth_token" => $this->token)); … … 277 287 $auth_sig = ""; 278 288 $this->last_request = $args; 279 if (!($this->response = $this->getCached($args)) || $nocache) { 289 $this->response = $this->getCached($args); 290 if (!($this->response) || $nocache) { 280 291 foreach ($args as $key => $data) { 281 292 if ( is_null($data) ) { … … 292 303 $this->cache($args, $this->response); 293 304 } 294 305 306 295 307 /* 296 308 * Uncomment this line (and comment out the next one) if you're doing large queries … … 298 310 * the result, so be sure that you look at the results. 299 311 */ 300 //$this->parsed_response = unserialize($this->response);301 $this->parsed_response = $this->clean_text_nodes(unserialize($this->response)); 312 $this->parsed_response = json_decode($this->response, TRUE); 313 /* $this->parsed_response = $this->clean_text_nodes(json_decode($this->response, TRUE)); */ 302 314 if ($this->parsed_response['stat'] == 'fail') { 303 315 if ($this->die_on_error) die("The Flickr API returned the following error: #{$this->parsed_response['code']} - {$this->parsed_response['message']}"); … … 359 371 $sizes = array( 360 372 "square" => "_s", 373 "square_75" => "_s", 374 "square_150" => "_q", 361 375 "thumbnail" => "_t", 362 376 "small" => "_m", 377 "small_240" => "_m", 378 "small_320" => "_n", 363 379 "medium" => "", 380 "medium_500" => "", 364 381 "medium_640" => "_z", 382 "medium_800" => "_c", 365 383 "large" => "_b", 366 "original" => "_o" 384 "large_1024" => "_b", 385 "large_1600" => "_h", 386 "large_2048" => "_k", 387 "original" => "_o", 367 388 ); 368 389 369 390 $size = strtolower($size); 370 391 if (!array_key_exists($size, $sizes)) { 371 392 $size = "medium"; 372 393 } 373 394 374 395 if ($size == "original") { 375 $url = "http ://farm" . $photo['farm'] . ".static.flickr.com/" . $photo['server'] . "/" . $photo['id'] . "_" . $photo['originalsecret'] . "_o" . "." . $photo['originalformat'];396 $url = "https://farm" . $photo['farm'] . ".static.flickr.com/" . $photo['server'] . "/" . $photo['id'] . "_" . $photo['originalsecret'] . "_o" . "." . $photo['originalformat']; 376 397 } else { 377 $url = "http ://farm" . $photo['farm'] . ".static.flickr.com/" . $photo['server'] . "/" . $photo['id'] . "_" . $photo['secret'] . $sizes[$size] . ".jpg";398 $url = "https://farm" . $photo['farm'] . ".static.flickr.com/" . $photo['server'] . "/" . $photo['id'] . "_" . $photo['secret'] . $sizes[$size] . ".jpg"; 378 399 } 379 400 return $url; 380 }381 382 function getFriendlyGeodata ($lat, $lon) {383 /* I've added this method to get the friendly geodata (i.e. 'in New York, NY') that the384 * website provides, but isn't available in the API. I'm providing this service as long385 * as it doesn't flood my server with requests and crash it all the time.386 */387 return unserialize(file_get_contents('http://phpflickr.com/geodata/?format=php&lat=' . $lat . '&lon=' . $lon));388 401 } 389 402 … … 416 429 $photo = realpath($photo); 417 430 $args['photo'] = '@' . $photo; 418 431 419 432 420 433 $curl = curl_init($this->upload_endpoint); … … 425 438 $this->response = $response; 426 439 curl_close($curl); 427 440 428 441 $rsp = explode("\n", $response); 429 442 foreach ($rsp as $line) { … … 478 491 $photo = realpath($photo); 479 492 $args['photo'] = '@' . $photo; 480 493 481 494 482 495 $curl = curl_init($this->upload_endpoint); … … 487 500 $this->response = $response; 488 501 curl_close($curl); 489 502 490 503 $rsp = explode("\n", $response); 491 504 foreach ($rsp as $line) { 492 if ( ereg('<err code="([0-9]+)" msg="(.*)"', $line, $match)) {505 if (preg_match('/<err code="([0-9]+)" msg="(.*)"/', $line, $match)) { 493 506 if ($this->die_on_error) 494 507 die("The Flickr API returned the following error: #{$match[1]} - {$match[2]}"); … … 499 512 return false; 500 513 } 501 } elseif ( ereg("<ticketid>(.*)</", $line, $match)) {514 } elseif (preg_match("/<ticketid>(.*)</", $line, $match)) { 502 515 $this->error_code = false; 503 516 $this->error_msg = false; … … 539 552 $photo = realpath($photo); 540 553 $args['photo'] = '@' . $photo; 541 554 542 555 543 556 $curl = curl_init($this->replace_endpoint); … … 548 561 $this->response = $response; 549 562 curl_close($curl); 550 563 551 564 if ($async == 1) 552 565 $find = 'ticketid'; … … 582 595 583 596 if (empty($_SESSION['phpFlickr_auth_token']) && empty($this->token)) { 584 /*if ( $remember_uri === true ) {597 if ( $remember_uri === true ) { 585 598 $_SESSION['phpFlickr_auth_redirect'] = $_SERVER['REQUEST_URI']; 586 599 } elseif ( $remember_uri !== false ) { … … 588 601 } 589 602 $api_sig = md5($this->secret . "api_key" . $this->api_key . "perms" . $perms); 590 603 591 604 if ($this->service == "23") { 592 605 header("Location: http://www.23hq.com/services/auth/?api_key=" . $this->api_key . "&perms=" . $perms . "&api_sig=". $api_sig); 593 606 } else { 594 header("Location: http://www.flickr.com/services/auth/?api_key=" . $this->api_key . "&perms=" . $perms . "&api_sig=". $api_sig); 595 }*/ 596 597 if ($remember_uri) { 598 $redirect = $remember_uri; 599 } 600 601 $api_sig = md5($this->secret . "api_key" . $this->api_key . "extra" . $redirect . "perms" . $perms); 602 if ($this->service == "23") { 603 header("Location: http://www.23hq.com/services/auth/?api_key=" . $this->api_key . "&extra=" . $redirect . "&perms=" . $perms . "&api_sig=". $api_sig); 604 } else { 605 header("Location: http://www.flickr.com/services/auth/?api_key=" . $this->api_key . "&extra=" . $redirect . "&perms=" . $perms . "&api_sig=". $api_sig); 606 } 607 header("Location: https://www.flickr.com/services/auth/?api_key=" . $this->api_key . "&perms=" . $perms . "&api_sig=". $api_sig); 608 } 607 609 exit; 608 610 } else { … … 619 621 } 620 622 623 function auth_url($frob, $perms = 'read') { 624 $sig = md5(sprintf('%sapi_key%sfrob%sperms%s', $this->secret, $this->api_key, $frob, $perms)); 625 return sprintf('https://flickr.com/services/auth/?api_key=%s&perms=%s&frob=%s&api_sig=%s', $this->api_key, $perms, $frob, $sig); 626 } 627 621 628 /******************************* 622 629 … … 645 652 /* Activity methods */ 646 653 function activity_userComments ($per_page = NULL, $page = NULL) { 647 /* http ://www.flickr.com/services/api/flickr.activity.userComments.html */654 /* https://www.flickr.com/services/api/flickr.activity.userComments.html */ 648 655 $this->request('flickr.activity.userComments', array("per_page" => $per_page, "page" => $page)); 649 656 return $this->parsed_response ? $this->parsed_response['items']['item'] : false; … … 651 658 652 659 function activity_userPhotos ($timeframe = NULL, $per_page = NULL, $page = NULL) { 653 /* http ://www.flickr.com/services/api/flickr.activity.userPhotos.html */660 /* https://www.flickr.com/services/api/flickr.activity.userPhotos.html */ 654 661 $this->request('flickr.activity.userPhotos', array("timeframe" => $timeframe, "per_page" => $per_page, "page" => $page)); 655 662 return $this->parsed_response ? $this->parsed_response['items']['item'] : false; … … 658 665 /* Authentication methods */ 659 666 function auth_checkToken () { 660 /* http ://www.flickr.com/services/api/flickr.auth.checkToken.html */667 /* https://www.flickr.com/services/api/flickr.auth.checkToken.html */ 661 668 $this->request('flickr.auth.checkToken'); 662 669 return $this->parsed_response ? $this->parsed_response['auth'] : false; … … 664 671 665 672 function auth_getFrob () { 666 /* http ://www.flickr.com/services/api/flickr.auth.getFrob.html */673 /* https://www.flickr.com/services/api/flickr.auth.getFrob.html */ 667 674 $this->request('flickr.auth.getFrob'); 668 675 return $this->parsed_response ? $this->parsed_response['frob'] : false; … … 670 677 671 678 function auth_getFullToken ($mini_token) { 672 /* http ://www.flickr.com/services/api/flickr.auth.getFullToken.html */679 /* https://www.flickr.com/services/api/flickr.auth.getFullToken.html */ 673 680 $this->request('flickr.auth.getFullToken', array('mini_token'=>$mini_token)); 674 681 return $this->parsed_response ? $this->parsed_response['auth'] : false; … … 676 683 677 684 function auth_getToken ($frob) { 678 /* http ://www.flickr.com/services/api/flickr.auth.getToken.html */685 /* https://www.flickr.com/services/api/flickr.auth.getToken.html */ 679 686 $this->request('flickr.auth.getToken', array('frob'=>$frob)); 680 687 $_SESSION['phpFlickr_auth_token'] = $this->parsed_response['auth']['token']; … … 684 691 /* Blogs methods */ 685 692 function blogs_getList ($service = NULL) { 686 /* http ://www.flickr.com/services/api/flickr.blogs.getList.html */693 /* https://www.flickr.com/services/api/flickr.blogs.getList.html */ 687 694 $rsp = $this->call('flickr.blogs.getList', array('service' => $service)); 688 695 return $rsp['blogs']['blog']; 689 696 } 690 697 691 698 function blogs_getServices () { 692 /* http ://www.flickr.com/services/api/flickr.blogs.getServices.html */699 /* https://www.flickr.com/services/api/flickr.blogs.getServices.html */ 693 700 return $this->call('flickr.blogs.getServices', array()); 694 701 } 695 702 696 703 function blogs_postPhoto ($blog_id = NULL, $photo_id, $title, $description, $blog_password = NULL, $service = NULL) { 697 /* http ://www.flickr.com/services/api/flickr.blogs.postPhoto.html */704 /* https://www.flickr.com/services/api/flickr.blogs.postPhoto.html */ 698 705 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)); 699 706 } … … 701 708 /* Collections Methods */ 702 709 function collections_getInfo ($collection_id) { 703 /* http ://www.flickr.com/services/api/flickr.collections.getInfo.html */710 /* https://www.flickr.com/services/api/flickr.collections.getInfo.html */ 704 711 return $this->call('flickr.collections.getInfo', array('collection_id' => $collection_id)); 705 712 } 706 713 707 714 function collections_getTree ($collection_id = NULL, $user_id = NULL) { 708 /* http ://www.flickr.com/services/api/flickr.collections.getTree.html */715 /* https://www.flickr.com/services/api/flickr.collections.getTree.html */ 709 716 return $this->call('flickr.collections.getTree', array('collection_id' => $collection_id, 'user_id' => $user_id)); 710 717 } 711 718 712 719 /* Commons Methods */ 713 720 function commons_getInstitutions () { 714 /* http ://www.flickr.com/services/api/flickr.commons.getInstitutions.html */721 /* https://www.flickr.com/services/api/flickr.commons.getInstitutions.html */ 715 722 return $this->call('flickr.commons.getInstitutions', array()); 716 723 } 717 724 718 725 /* Contacts Methods */ 719 726 function contacts_getList ($filter = NULL, $page = NULL, $per_page = NULL) { 720 /* http ://www.flickr.com/services/api/flickr.contacts.getList.html */727 /* https://www.flickr.com/services/api/flickr.contacts.getList.html */ 721 728 $this->request('flickr.contacts.getList', array('filter'=>$filter, 'page'=>$page, 'per_page'=>$per_page)); 722 729 return $this->parsed_response ? $this->parsed_response['contacts'] : false; … … 724 731 725 732 function contacts_getPublicList ($user_id, $page = NULL, $per_page = NULL) { 726 /* http ://www.flickr.com/services/api/flickr.contacts.getPublicList.html */733 /* https://www.flickr.com/services/api/flickr.contacts.getPublicList.html */ 727 734 $this->request('flickr.contacts.getPublicList', array('user_id'=>$user_id, 'page'=>$page, 'per_page'=>$per_page)); 728 735 return $this->parsed_response ? $this->parsed_response['contacts'] : false; 729 736 } 730 737 731 738 function contacts_getListRecentlyUploaded ($date_lastupload = NULL, $filter = NULL) { 732 /* http ://www.flickr.com/services/api/flickr.contacts.getListRecentlyUploaded.html */739 /* https://www.flickr.com/services/api/flickr.contacts.getListRecentlyUploaded.html */ 733 740 return $this->call('flickr.contacts.getListRecentlyUploaded', array('date_lastupload' => $date_lastupload, 'filter' => $filter)); 734 741 } … … 736 743 /* Favorites Methods */ 737 744 function favorites_add ($photo_id) { 738 /* http ://www.flickr.com/services/api/flickr.favorites.add.html */745 /* https://www.flickr.com/services/api/flickr.favorites.add.html */ 739 746 $this->request('flickr.favorites.add', array('photo_id'=>$photo_id), TRUE); 740 747 return $this->parsed_response ? true : false; … … 742 749 743 750 function favorites_getList ($user_id = NULL, $jump_to = NULL, $min_fave_date = NULL, $max_fave_date = NULL, $extras = NULL, $per_page = NULL, $page = NULL) { 744 /* http ://www.flickr.com/services/api/flickr.favorites.getList.html */751 /* https://www.flickr.com/services/api/flickr.favorites.getList.html */ 745 752 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)); 746 753 } 747 754 748 755 function favorites_getPublicList ($user_id, $jump_to = NULL, $min_fave_date = NULL, $max_fave_date = NULL, $extras = NULL, $per_page = NULL, $page = NULL) { 749 /* http ://www.flickr.com/services/api/flickr.favorites.getPublicList.html */756 /* https://www.flickr.com/services/api/flickr.favorites.getPublicList.html */ 750 757 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)); 751 758 } 752 759 753 760 function favorites_remove ($photo_id, $user_id = NULL) { 754 /* http ://www.flickr.com/services/api/flickr.favorites.remove.html */761 /* https://www.flickr.com/services/api/flickr.favorites.remove.html */ 755 762 $this->request("flickr.favorites.remove", array('photo_id' => $photo_id, 'user_id' => $user_id), TRUE); 756 763 return $this->parsed_response ? true : false; … … 759 766 /* Galleries Methods */ 760 767 function galleries_addPhoto ($gallery_id, $photo_id, $comment = NULL) { 761 /* http ://www.flickr.com/services/api/flickr.galleries.addPhoto.html */768 /* https://www.flickr.com/services/api/flickr.galleries.addPhoto.html */ 762 769 return $this->call('flickr.galleries.addPhoto', array('gallery_id' => $gallery_id, 'photo_id' => $photo_id, 'comment' => $comment)); 763 770 } 764 771 765 772 function galleries_create ($title, $description, $primary_photo_id = NULL) { 766 /* http ://www.flickr.com/services/api/flickr.galleries.create.html */773 /* https://www.flickr.com/services/api/flickr.galleries.create.html */ 767 774 return $this->call('flickr.galleries.create', array('title' => $title, 'description' => $description, 'primary_photo_id' => $primary_photo_id)); 768 775 } 769 776 770 777 function galleries_editMeta ($gallery_id, $title, $description = NULL) { 771 /* http ://www.flickr.com/services/api/flickr.galleries.editMeta.html */778 /* https://www.flickr.com/services/api/flickr.galleries.editMeta.html */ 772 779 return $this->call('flickr.galleries.editMeta', array('gallery_id' => $gallery_id, 'title' => $title, 'description' => $description)); 773 780 } 774 781 775 782 function galleries_editPhoto ($gallery_id, $photo_id, $comment) { 776 /* http ://www.flickr.com/services/api/flickr.galleries.editPhoto.html */783 /* https://www.flickr.com/services/api/flickr.galleries.editPhoto.html */ 777 784 return $this->call('flickr.galleries.editPhoto', array('gallery_id' => $gallery_id, 'photo_id' => $photo_id, 'comment' => $comment)); 778 785 } 779 786 780 787 function galleries_editPhotos ($gallery_id, $primary_photo_id, $photo_ids) { 781 /* http ://www.flickr.com/services/api/flickr.galleries.editPhotos.html */788 /* https://www.flickr.com/services/api/flickr.galleries.editPhotos.html */ 782 789 return $this->call('flickr.galleries.editPhotos', array('gallery_id' => $gallery_id, 'primary_photo_id' => $primary_photo_id, 'photo_ids' => $photo_ids)); 783 790 } 784 791 785 792 function galleries_getInfo ($gallery_id) { 786 /* http ://www.flickr.com/services/api/flickr.galleries.getInfo.html */793 /* https://www.flickr.com/services/api/flickr.galleries.getInfo.html */ 787 794 return $this->call('flickr.galleries.getInfo', array('gallery_id' => $gallery_id)); 788 795 } 789 796 790 797 function galleries_getList ($user_id, $per_page = NULL, $page = NULL) { 791 /* http ://www.flickr.com/services/api/flickr.galleries.getList.html */798 /* https://www.flickr.com/services/api/flickr.galleries.getList.html */ 792 799 return $this->call('flickr.galleries.getList', array('user_id' => $user_id, 'per_page' => $per_page, 'page' => $page)); 793 800 } 794 801 795 802 function galleries_getListForPhoto ($photo_id, $per_page = NULL, $page = NULL) { 796 /* http ://www.flickr.com/services/api/flickr.galleries.getListForPhoto.html */803 /* https://www.flickr.com/services/api/flickr.galleries.getListForPhoto.html */ 797 804 return $this->call('flickr.galleries.getListForPhoto', array('photo_id' => $photo_id, 'per_page' => $per_page, 'page' => $page)); 798 805 } 799 806 800 807 function galleries_getPhotos ($gallery_id, $extras = NULL, $per_page = NULL, $page = NULL) { 801 /* http ://www.flickr.com/services/api/flickr.galleries.getPhotos.html */808 /* https://www.flickr.com/services/api/flickr.galleries.getPhotos.html */ 802 809 return $this->call('flickr.galleries.getPhotos', array('gallery_id' => $gallery_id, 'extras' => $extras, 'per_page' => $per_page, 'page' => $page)); 803 810 } … … 805 812 /* Groups Methods */ 806 813 function groups_browse ($cat_id = NULL) { 807 /* http ://www.flickr.com/services/api/flickr.groups.browse.html */814 /* https://www.flickr.com/services/api/flickr.groups.browse.html */ 808 815 $this->request("flickr.groups.browse", array("cat_id"=>$cat_id)); 809 816 return $this->parsed_response ? $this->parsed_response['category'] : false; … … 811 818 812 819 function groups_getInfo ($group_id, $lang = NULL) { 813 /* http ://www.flickr.com/services/api/flickr.groups.getInfo.html */820 /* https://www.flickr.com/services/api/flickr.groups.getInfo.html */ 814 821 return $this->call('flickr.groups.getInfo', array('group_id' => $group_id, 'lang' => $lang)); 815 822 } 816 823 817 824 function groups_search ($text, $per_page = NULL, $page = NULL) { 818 /* http ://www.flickr.com/services/api/flickr.groups.search.html */825 /* https://www.flickr.com/services/api/flickr.groups.search.html */ 819 826 $this->request("flickr.groups.search", array("text"=>$text,"per_page"=>$per_page,"page"=>$page)); 820 827 return $this->parsed_response ? $this->parsed_response['groups'] : false; … … 823 830 /* Groups Members Methods */ 824 831 function groups_members_getList ($group_id, $membertypes = NULL, $per_page = NULL, $page = NULL) { 825 /* http ://www.flickr.com/services/api/flickr.groups.members.getList.html */832 /* https://www.flickr.com/services/api/flickr.groups.members.getList.html */ 826 833 return $this->call('flickr.groups.members.getList', array('group_id' => $group_id, 'membertypes' => $membertypes, 'per_page' => $per_page, 'page' => $page)); 827 834 } 828 835 829 836 /* Groups Pools Methods */ 830 837 function groups_pools_add ($photo_id, $group_id) { 831 /* http ://www.flickr.com/services/api/flickr.groups.pools.add.html */838 /* https://www.flickr.com/services/api/flickr.groups.pools.add.html */ 832 839 $this->request("flickr.groups.pools.add", array("photo_id"=>$photo_id, "group_id"=>$group_id), TRUE); 833 840 return $this->parsed_response ? true : false; … … 835 842 836 843 function groups_pools_getContext ($photo_id, $group_id, $num_prev = NULL, $num_next = NULL) { 837 /* http ://www.flickr.com/services/api/flickr.groups.pools.getContext.html */844 /* https://www.flickr.com/services/api/flickr.groups.pools.getContext.html */ 838 845 return $this->call('flickr.groups.pools.getContext', array('photo_id' => $photo_id, 'group_id' => $group_id, 'num_prev' => $num_prev, 'num_next' => $num_next)); 839 846 } 840 847 841 848 function groups_pools_getGroups ($page = NULL, $per_page = NULL) { 842 /* http ://www.flickr.com/services/api/flickr.groups.pools.getGroups.html */849 /* https://www.flickr.com/services/api/flickr.groups.pools.getGroups.html */ 843 850 $this->request("flickr.groups.pools.getGroups", array('page'=>$page, 'per_page'=>$per_page)); 844 851 return $this->parsed_response ? $this->parsed_response['groups'] : false; … … 846 853 847 854 function groups_pools_getPhotos ($group_id, $tags = NULL, $user_id = NULL, $jump_to = NULL, $extras = NULL, $per_page = NULL, $page = NULL) { 848 /* http ://www.flickr.com/services/api/flickr.groups.pools.getPhotos.html */855 /* https://www.flickr.com/services/api/flickr.groups.pools.getPhotos.html */ 849 856 if (is_array($extras)) { 850 857 $extras = implode(",", $extras); … … 854 861 855 862 function groups_pools_remove ($photo_id, $group_id) { 856 /* http ://www.flickr.com/services/api/flickr.groups.pools.remove.html */863 /* https://www.flickr.com/services/api/flickr.groups.pools.remove.html */ 857 864 $this->request("flickr.groups.pools.remove", array("photo_id"=>$photo_id, "group_id"=>$group_id), TRUE); 858 865 return $this->parsed_response ? true : false; … … 861 868 /* Interestingness methods */ 862 869 function interestingness_getList ($date = NULL, $use_panda = NULL, $extras = NULL, $per_page = NULL, $page = NULL) { 863 /* http ://www.flickr.com/services/api/flickr.interestingness.getList.html */870 /* https://www.flickr.com/services/api/flickr.interestingness.getList.html */ 864 871 if (is_array($extras)) { 865 872 $extras = implode(",", $extras); … … 871 878 /* Machine Tag methods */ 872 879 function machinetags_getNamespaces ($predicate = NULL, $per_page = NULL, $page = NULL) { 873 /* http ://www.flickr.com/services/api/flickr.machinetags.getNamespaces.html */880 /* https://www.flickr.com/services/api/flickr.machinetags.getNamespaces.html */ 874 881 return $this->call('flickr.machinetags.getNamespaces', array('predicate' => $predicate, 'per_page' => $per_page, 'page' => $page)); 875 882 } 876 883 877 884 function machinetags_getPairs ($namespace = NULL, $predicate = NULL, $per_page = NULL, $page = NULL) { 878 /* http ://www.flickr.com/services/api/flickr.machinetags.getPairs.html */885 /* https://www.flickr.com/services/api/flickr.machinetags.getPairs.html */ 879 886 return $this->call('flickr.machinetags.getPairs', array('namespace' => $namespace, 'predicate' => $predicate, 'per_page' => $per_page, 'page' => $page)); 880 887 } 881 888 882 889 function machinetags_getPredicates ($namespace = NULL, $per_page = NULL, $page = NULL) { 883 /* http ://www.flickr.com/services/api/flickr.machinetags.getPredicates.html */890 /* https://www.flickr.com/services/api/flickr.machinetags.getPredicates.html */ 884 891 return $this->call('flickr.machinetags.getPredicates', array('namespace' => $namespace, 'per_page' => $per_page, 'page' => $page)); 885 892 } 886 893 887 894 function machinetags_getRecentValues ($namespace = NULL, $predicate = NULL, $added_since = NULL) { 888 /* http ://www.flickr.com/services/api/flickr.machinetags.getRecentValues.html */895 /* https://www.flickr.com/services/api/flickr.machinetags.getRecentValues.html */ 889 896 return $this->call('flickr.machinetags.getRecentValues', array('namespace' => $namespace, 'predicate' => $predicate, 'added_since' => $added_since)); 890 897 } 891 898 892 899 function machinetags_getValues ($namespace, $predicate, $per_page = NULL, $page = NULL, $usage = NULL) { 893 /* http ://www.flickr.com/services/api/flickr.machinetags.getValues.html */900 /* https://www.flickr.com/services/api/flickr.machinetags.getValues.html */ 894 901 return $this->call('flickr.machinetags.getValues', array('namespace' => $namespace, 'predicate' => $predicate, 'per_page' => $per_page, 'page' => $page, 'usage' => $usage)); 895 902 } 896 903 897 904 /* Panda methods */ 898 905 function panda_getList () { 899 /* http ://www.flickr.com/services/api/flickr.panda.getList.html */906 /* https://www.flickr.com/services/api/flickr.panda.getList.html */ 900 907 return $this->call('flickr.panda.getList', array()); 901 908 } 902 909 903 910 function panda_getPhotos ($panda_name, $extras = NULL, $per_page = NULL, $page = NULL) { 904 /* http ://www.flickr.com/services/api/flickr.panda.getPhotos.html */911 /* https://www.flickr.com/services/api/flickr.panda.getPhotos.html */ 905 912 return $this->call('flickr.panda.getPhotos', array('panda_name' => $panda_name, 'extras' => $extras, 'per_page' => $per_page, 'page' => $page)); 906 913 } … … 908 915 /* People methods */ 909 916 function people_findByEmail ($find_email) { 910 /* http ://www.flickr.com/services/api/flickr.people.findByEmail.html */917 /* https://www.flickr.com/services/api/flickr.people.findByEmail.html */ 911 918 $this->request("flickr.people.findByEmail", array("find_email"=>$find_email)); 912 919 return $this->parsed_response ? $this->parsed_response['user'] : false; … … 914 921 915 922 function people_findByUsername ($username) { 916 /* http ://www.flickr.com/services/api/flickr.people.findByUsername.html */923 /* https://www.flickr.com/services/api/flickr.people.findByUsername.html */ 917 924 $this->request("flickr.people.findByUsername", array("username"=>$username)); 918 925 return $this->parsed_response ? $this->parsed_response['user'] : false; … … 920 927 921 928 function people_getInfo ($user_id) { 922 /* http ://www.flickr.com/services/api/flickr.people.getInfo.html */929 /* https://www.flickr.com/services/api/flickr.people.getInfo.html */ 923 930 $this->request("flickr.people.getInfo", array("user_id"=>$user_id)); 924 931 return $this->parsed_response ? $this->parsed_response['person'] : false; … … 937 944 */ 938 945 939 /* http ://www.flickr.com/services/api/flickr.people.getPhotos.html */946 /* https://www.flickr.com/services/api/flickr.people.getPhotos.html */ 940 947 return $this->call('flickr.people.getPhotos', array_merge(array('user_id' => $user_id), $args)); 941 948 } 942 949 943 950 function people_getPhotosOf ($user_id, $extras = NULL, $per_page = NULL, $page = NULL) { 944 /* http ://www.flickr.com/services/api/flickr.people.getPhotosOf.html */951 /* https://www.flickr.com/services/api/flickr.people.getPhotosOf.html */ 945 952 return $this->call('flickr.people.getPhotosOf', array('user_id' => $user_id, 'extras' => $extras, 'per_page' => $per_page, 'page' => $page)); 946 953 } 947 954 948 955 function people_getPublicGroups ($user_id) { 949 /* http ://www.flickr.com/services/api/flickr.people.getPublicGroups.html */956 /* https://www.flickr.com/services/api/flickr.people.getPublicGroups.html */ 950 957 $this->request("flickr.people.getPublicGroups", array("user_id"=>$user_id)); 951 958 return $this->parsed_response ? $this->parsed_response['groups']['group'] : false; … … 953 960 954 961 function people_getPublicPhotos ($user_id, $safe_search = NULL, $extras = NULL, $per_page = NULL, $page = NULL) { 955 /* http ://www.flickr.com/services/api/flickr.people.getPublicPhotos.html */962 /* https://www.flickr.com/services/api/flickr.people.getPublicPhotos.html */ 956 963 return $this->call('flickr.people.getPublicPhotos', array('user_id' => $user_id, 'safe_search' => $safe_search, 'extras' => $extras, 'per_page' => $per_page, 'page' => $page)); 957 964 } 958 965 959 966 function people_getUploadStatus () { 960 /* http ://www.flickr.com/services/api/flickr.people.getUploadStatus.html */967 /* https://www.flickr.com/services/api/flickr.people.getUploadStatus.html */ 961 968 /* Requires Authentication */ 962 969 $this->request("flickr.people.getUploadStatus"); … … 967 974 /* Photos Methods */ 968 975 function photos_addTags ($photo_id, $tags) { 969 /* http ://www.flickr.com/services/api/flickr.photos.addTags.html */976 /* https://www.flickr.com/services/api/flickr.photos.addTags.html */ 970 977 $this->request("flickr.photos.addTags", array("photo_id"=>$photo_id, "tags"=>$tags), TRUE); 971 978 return $this->parsed_response ? true : false; … … 973 980 974 981 function photos_delete ($photo_id) { 975 /* http ://www.flickr.com/services/api/flickr.photos.delete.html */982 /* https://www.flickr.com/services/api/flickr.photos.delete.html */ 976 983 $this->request("flickr.photos.delete", array("photo_id"=>$photo_id), TRUE); 977 984 return $this->parsed_response ? true : false; … … 979 986 980 987 function photos_getAllContexts ($photo_id) { 981 /* http ://www.flickr.com/services/api/flickr.photos.getAllContexts.html */988 /* https://www.flickr.com/services/api/flickr.photos.getAllContexts.html */ 982 989 $this->request("flickr.photos.getAllContexts", array("photo_id"=>$photo_id)); 983 990 return $this->parsed_response ? $this->parsed_response : false; … … 985 992 986 993 function photos_getContactsPhotos ($count = NULL, $just_friends = NULL, $single_photo = NULL, $include_self = NULL, $extras = NULL) { 987 /* http ://www.flickr.com/services/api/flickr.photos.getContactsPhotos.html */994 /* https://www.flickr.com/services/api/flickr.photos.getContactsPhotos.html */ 988 995 $this->request("flickr.photos.getContactsPhotos", array("count"=>$count, "just_friends"=>$just_friends, "single_photo"=>$single_photo, "include_self"=>$include_self, "extras"=>$extras)); 989 996 return $this->parsed_response ? $this->parsed_response['photos']['photo'] : false; … … 991 998 992 999 function photos_getContactsPublicPhotos ($user_id, $count = NULL, $just_friends = NULL, $single_photo = NULL, $include_self = NULL, $extras = NULL) { 993 /* http ://www.flickr.com/services/api/flickr.photos.getContactsPublicPhotos.html */1000 /* https://www.flickr.com/services/api/flickr.photos.getContactsPublicPhotos.html */ 994 1001 $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)); 995 1002 return $this->parsed_response ? $this->parsed_response['photos']['photo'] : false; … … 997 1004 998 1005 function photos_getContext ($photo_id, $num_prev = NULL, $num_next = NULL, $extras = NULL, $order_by = NULL) { 999 /* http ://www.flickr.com/services/api/flickr.photos.getContext.html */1006 /* https://www.flickr.com/services/api/flickr.photos.getContext.html */ 1000 1007 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)); 1001 1008 } 1002 1009 1003 1010 function photos_getCounts ($dates = NULL, $taken_dates = NULL) { 1004 /* http ://www.flickr.com/services/api/flickr.photos.getCounts.html */1011 /* https://www.flickr.com/services/api/flickr.photos.getCounts.html */ 1005 1012 $this->request("flickr.photos.getCounts", array("dates"=>$dates, "taken_dates"=>$taken_dates)); 1006 1013 return $this->parsed_response ? $this->parsed_response['photocounts']['photocount'] : false; … … 1008 1015 1009 1016 function photos_getExif ($photo_id, $secret = NULL) { 1010 /* http ://www.flickr.com/services/api/flickr.photos.getExif.html */1017 /* https://www.flickr.com/services/api/flickr.photos.getExif.html */ 1011 1018 $this->request("flickr.photos.getExif", array("photo_id"=>$photo_id, "secret"=>$secret)); 1012 1019 return $this->parsed_response ? $this->parsed_response['photo'] : false; 1013 1020 } 1014 1021 1015 1022 function photos_getFavorites ($photo_id, $page = NULL, $per_page = NULL) { 1016 /* http ://www.flickr.com/services/api/flickr.photos.getFavorites.html */1023 /* https://www.flickr.com/services/api/flickr.photos.getFavorites.html */ 1017 1024 $this->request("flickr.photos.getFavorites", array("photo_id"=>$photo_id, "page"=>$page, "per_page"=>$per_page)); 1018 1025 return $this->parsed_response ? $this->parsed_response['photo'] : false; … … 1020 1027 1021 1028 function photos_getInfo ($photo_id, $secret = NULL, $humandates = NULL, $privacy_filter = NULL, $get_contexts = NULL) { 1022 /* http ://www.flickr.com/services/api/flickr.photos.getInfo.html */1029 /* https://www.flickr.com/services/api/flickr.photos.getInfo.html */ 1023 1030 return $this->call('flickr.photos.getInfo', array('photo_id' => $photo_id, 'secret' => $secret, 'humandates' => $humandates, 'privacy_filter' => $privacy_filter, 'get_contexts' => $get_contexts)); 1024 1031 } 1025 1032 1026 1033 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) { 1027 /* http ://www.flickr.com/services/api/flickr.photos.getNotInSet.html */1034 /* https://www.flickr.com/services/api/flickr.photos.getNotInSet.html */ 1028 1035 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)); 1029 1036 } 1030 1037 1031 1038 function photos_getPerms ($photo_id) { 1032 /* http ://www.flickr.com/services/api/flickr.photos.getPerms.html */1039 /* https://www.flickr.com/services/api/flickr.photos.getPerms.html */ 1033 1040 $this->request("flickr.photos.getPerms", array("photo_id"=>$photo_id)); 1034 1041 return $this->parsed_response ? $this->parsed_response['perms'] : false; … … 1036 1043 1037 1044 function photos_getRecent ($jump_to = NULL, $extras = NULL, $per_page = NULL, $page = NULL) { 1038 /* http ://www.flickr.com/services/api/flickr.photos.getRecent.html */1045 /* https://www.flickr.com/services/api/flickr.photos.getRecent.html */ 1039 1046 if (is_array($extras)) { 1040 1047 $extras = implode(",", $extras); … … 1044 1051 1045 1052 function photos_getSizes ($photo_id) { 1046 /* http ://www.flickr.com/services/api/flickr.photos.getSizes.html */1053 /* https://www.flickr.com/services/api/flickr.photos.getSizes.html */ 1047 1054 $this->request("flickr.photos.getSizes", array("photo_id"=>$photo_id)); 1048 1055 return $this->parsed_response ? $this->parsed_response['sizes']['size'] : false; … … 1050 1057 1051 1058 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) { 1052 /* http ://www.flickr.com/services/api/flickr.photos.getUntagged.html */1059 /* https://www.flickr.com/services/api/flickr.photos.getUntagged.html */ 1053 1060 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)); 1054 1061 } … … 1060 1067 * flickr.photos.search method requires at least one search parameter. 1061 1068 */ 1062 /* http ://www.flickr.com/services/api/flickr.photos.getWithGeoData.html */1069 /* https://www.flickr.com/services/api/flickr.photos.getWithGeoData.html */ 1063 1070 $this->request("flickr.photos.getWithGeoData", $args); 1064 1071 return $this->parsed_response ? $this->parsed_response['photos'] : false; … … 1071 1078 * flickr.photos.search method requires at least one search parameter. 1072 1079 */ 1073 /* http ://www.flickr.com/services/api/flickr.photos.getWithoutGeoData.html */1080 /* https://www.flickr.com/services/api/flickr.photos.getWithoutGeoData.html */ 1074 1081 $this->request("flickr.photos.getWithoutGeoData", $args); 1075 1082 return $this->parsed_response ? $this->parsed_response['photos'] : false; … … 1077 1084 1078 1085 function photos_recentlyUpdated ($min_date, $extras = NULL, $per_page = NULL, $page = NULL) { 1079 /* http ://www.flickr.com/services/api/flickr.photos.recentlyUpdated.html */1086 /* https://www.flickr.com/services/api/flickr.photos.recentlyUpdated.html */ 1080 1087 return $this->call('flickr.photos.recentlyUpdated', array('min_date' => $min_date, 'extras' => $extras, 'per_page' => $per_page, 'page' => $page)); 1081 1088 } 1082 1089 1083 1090 function photos_removeTag ($tag_id) { 1084 /* http ://www.flickr.com/services/api/flickr.photos.removeTag.html */1091 /* https://www.flickr.com/services/api/flickr.photos.removeTag.html */ 1085 1092 $this->request("flickr.photos.removeTag", array("tag_id"=>$tag_id), TRUE); 1086 1093 return $this->parsed_response ? true : false; … … 1099 1106 */ 1100 1107 1101 /* http ://www.flickr.com/services/api/flickr.photos.search.html */1102 $ this->request("flickr.photos.search", $args);1103 return $this->parsed_response? $this->parsed_response['photos'] : false;1108 /* https://www.flickr.com/services/api/flickr.photos.search.html */ 1109 $result = $this->request("flickr.photos.search", $args); 1110 return ($this->parsed_response) ? $this->parsed_response['photos'] : false; 1104 1111 } 1105 1112 1106 1113 function photos_setContentType ($photo_id, $content_type) { 1107 /* http ://www.flickr.com/services/api/flickr.photos.setContentType.html */1114 /* https://www.flickr.com/services/api/flickr.photos.setContentType.html */ 1108 1115 return $this->call('flickr.photos.setContentType', array('photo_id' => $photo_id, 'content_type' => $content_type)); 1109 1116 } 1110 1117 1111 1118 function photos_setDates ($photo_id, $date_posted = NULL, $date_taken = NULL, $date_taken_granularity = NULL) { 1112 /* http ://www.flickr.com/services/api/flickr.photos.setDates.html */1119 /* https://www.flickr.com/services/api/flickr.photos.setDates.html */ 1113 1120 $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); 1114 1121 return $this->parsed_response ? true : false; … … 1116 1123 1117 1124 function photos_setMeta ($photo_id, $title, $description) { 1118 /* http ://www.flickr.com/services/api/flickr.photos.setMeta.html */1125 /* https://www.flickr.com/services/api/flickr.photos.setMeta.html */ 1119 1126 $this->request("flickr.photos.setMeta", array("photo_id"=>$photo_id, "title"=>$title, "description"=>$description), TRUE); 1120 1127 return $this->parsed_response ? true : false; … … 1122 1129 1123 1130 function photos_setPerms ($photo_id, $is_public, $is_friend, $is_family, $perm_comment, $perm_addmeta) { 1124 /* http ://www.flickr.com/services/api/flickr.photos.setPerms.html */1131 /* https://www.flickr.com/services/api/flickr.photos.setPerms.html */ 1125 1132 $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); 1126 1133 return $this->parsed_response ? true : false; … … 1128 1135 1129 1136 function photos_setSafetyLevel ($photo_id, $safety_level = NULL, $hidden = NULL) { 1130 /* http ://www.flickr.com/services/api/flickr.photos.setSafetyLevel.html */1137 /* https://www.flickr.com/services/api/flickr.photos.setSafetyLevel.html */ 1131 1138 return $this->call('flickr.photos.setSafetyLevel', array('photo_id' => $photo_id, 'safety_level' => $safety_level, 'hidden' => $hidden)); 1132 1139 } 1133 1140 1134 1141 function photos_setTags ($photo_id, $tags) { 1135 /* http ://www.flickr.com/services/api/flickr.photos.setTags.html */1142 /* https://www.flickr.com/services/api/flickr.photos.setTags.html */ 1136 1143 $this->request("flickr.photos.setTags", array("photo_id"=>$photo_id, "tags"=>$tags), TRUE); 1137 1144 return $this->parsed_response ? true : false; … … 1140 1147 /* Photos - Comments Methods */ 1141 1148 function photos_comments_addComment ($photo_id, $comment_text) { 1142 /* http ://www.flickr.com/services/api/flickr.photos.comments.addComment.html */1149 /* https://www.flickr.com/services/api/flickr.photos.comments.addComment.html */ 1143 1150 $this->request("flickr.photos.comments.addComment", array("photo_id" => $photo_id, "comment_text"=>$comment_text), TRUE); 1144 1151 return $this->parsed_response ? $this->parsed_response['comment'] : false; … … 1146 1153 1147 1154 function photos_comments_deleteComment ($comment_id) { 1148 /* http ://www.flickr.com/services/api/flickr.photos.comments.deleteComment.html */1155 /* https://www.flickr.com/services/api/flickr.photos.comments.deleteComment.html */ 1149 1156 $this->request("flickr.photos.comments.deleteComment", array("comment_id" => $comment_id), TRUE); 1150 1157 return $this->parsed_response ? true : false; … … 1152 1159 1153 1160 function photos_comments_editComment ($comment_id, $comment_text) { 1154 /* http ://www.flickr.com/services/api/flickr.photos.comments.editComment.html */1161 /* https://www.flickr.com/services/api/flickr.photos.comments.editComment.html */ 1155 1162 $this->request("flickr.photos.comments.editComment", array("comment_id" => $comment_id, "comment_text"=>$comment_text), TRUE); 1156 1163 return $this->parsed_response ? true : false; … … 1158 1165 1159 1166 function photos_comments_getList ($photo_id, $min_comment_date = NULL, $max_comment_date = NULL, $page = NULL, $per_page = NULL, $include_faves = NULL) { 1160 /* http ://www.flickr.com/services/api/flickr.photos.comments.getList.html */1167 /* https://www.flickr.com/services/api/flickr.photos.comments.getList.html */ 1161 1168 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)); 1162 1169 } 1163 1170 1164 1171 function photos_comments_getRecentForContacts ($date_lastcomment = NULL, $contacts_filter = NULL, $extras = NULL, $per_page = NULL, $page = NULL) { 1165 /* http ://www.flickr.com/services/api/flickr.photos.comments.getRecentForContacts.html */1172 /* https://www.flickr.com/services/api/flickr.photos.comments.getRecentForContacts.html */ 1166 1173 return $this->call('flickr.photos.comments.getRecentForContacts', array('date_lastcomment' => $date_lastcomment, 'contacts_filter' => $contacts_filter, 'extras' => $extras, 'per_page' => $per_page, 'page' => $page)); 1167 1174 } … … 1169 1176 /* Photos - Geo Methods */ 1170 1177 function photos_geo_batchCorrectLocation ($lat, $lon, $accuracy, $place_id = NULL, $woe_id = NULL) { 1171 /* http ://www.flickr.com/services/api/flickr.photos.geo.batchCorrectLocation.html */1178 /* https://www.flickr.com/services/api/flickr.photos.geo.batchCorrectLocation.html */ 1172 1179 return $this->call('flickr.photos.geo.batchCorrectLocation', array('lat' => $lat, 'lon' => $lon, 'accuracy' => $accuracy, 'place_id' => $place_id, 'woe_id' => $woe_id)); 1173 1180 } 1174 1181 1175 1182 function photos_geo_correctLocation ($photo_id, $place_id = NULL, $woe_id = NULL) { 1176 /* http ://www.flickr.com/services/api/flickr.photos.geo.correctLocation.html */1183 /* https://www.flickr.com/services/api/flickr.photos.geo.correctLocation.html */ 1177 1184 return $this->call('flickr.photos.geo.correctLocation', array('photo_id' => $photo_id, 'place_id' => $place_id, 'woe_id' => $woe_id)); 1178 1185 } 1179 1186 1180 1187 function photos_geo_getLocation ($photo_id) { 1181 /* http ://www.flickr.com/services/api/flickr.photos.geo.getLocation.html */1188 /* https://www.flickr.com/services/api/flickr.photos.geo.getLocation.html */ 1182 1189 $this->request("flickr.photos.geo.getLocation", array("photo_id"=>$photo_id)); 1183 1190 return $this->parsed_response ? $this->parsed_response['photo'] : false; … … 1185 1192 1186 1193 function photos_geo_getPerms ($photo_id) { 1187 /* http ://www.flickr.com/services/api/flickr.photos.geo.getPerms.html */1194 /* https://www.flickr.com/services/api/flickr.photos.geo.getPerms.html */ 1188 1195 $this->request("flickr.photos.geo.getPerms", array("photo_id"=>$photo_id)); 1189 1196 return $this->parsed_response ? $this->parsed_response['perms'] : false; 1190 1197 } 1191 1198 1192 1199 function photos_geo_photosForLocation ($lat, $lon, $accuracy = NULL, $extras = NULL, $per_page = NULL, $page = NULL) { 1193 /* http ://www.flickr.com/services/api/flickr.photos.geo.photosForLocation.html */1200 /* https://www.flickr.com/services/api/flickr.photos.geo.photosForLocation.html */ 1194 1201 return $this->call('flickr.photos.geo.photosForLocation', array('lat' => $lat, 'lon' => $lon, 'accuracy' => $accuracy, 'extras' => $extras, 'per_page' => $per_page, 'page' => $page)); 1195 1202 } 1196 1203 1197 1204 function photos_geo_removeLocation ($photo_id) { 1198 /* http ://www.flickr.com/services/api/flickr.photos.geo.removeLocation.html */1205 /* https://www.flickr.com/services/api/flickr.photos.geo.removeLocation.html */ 1199 1206 $this->request("flickr.photos.geo.removeLocation", array("photo_id"=>$photo_id), TRUE); 1200 1207 return $this->parsed_response ? true : false; … … 1202 1209 1203 1210 function photos_geo_setContext ($photo_id, $context) { 1204 /* http ://www.flickr.com/services/api/flickr.photos.geo.setContext.html */1211 /* https://www.flickr.com/services/api/flickr.photos.geo.setContext.html */ 1205 1212 return $this->call('flickr.photos.geo.setContext', array('photo_id' => $photo_id, 'context' => $context)); 1206 1213 } 1207 1214 1208 1215 function photos_geo_setLocation ($photo_id, $lat, $lon, $accuracy = NULL, $context = NULL, $bookmark_id = NULL) { 1209 /* http ://www.flickr.com/services/api/flickr.photos.geo.setLocation.html */1216 /* https://www.flickr.com/services/api/flickr.photos.geo.setLocation.html */ 1210 1217 return $this->call('flickr.photos.geo.setLocation', array('photo_id' => $photo_id, 'lat' => $lat, 'lon' => $lon, 'accuracy' => $accuracy, 'context' => $context, 'bookmark_id' => $bookmark_id)); 1211 1218 } 1212 1219 1213 1220 function photos_geo_setPerms ($is_public, $is_contact, $is_friend, $is_family, $photo_id) { 1214 /* http ://www.flickr.com/services/api/flickr.photos.geo.setPerms.html */1221 /* https://www.flickr.com/services/api/flickr.photos.geo.setPerms.html */ 1215 1222 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)); 1216 1223 } … … 1218 1225 /* Photos - Licenses Methods */ 1219 1226 function photos_licenses_getInfo () { 1220 /* http ://www.flickr.com/services/api/flickr.photos.licenses.getInfo.html */1227 /* https://www.flickr.com/services/api/flickr.photos.licenses.getInfo.html */ 1221 1228 $this->request("flickr.photos.licenses.getInfo"); 1222 1229 return $this->parsed_response ? $this->parsed_response['licenses']['license'] : false; … … 1224 1231 1225 1232 function photos_licenses_setLicense ($photo_id, $license_id) { 1226 /* http ://www.flickr.com/services/api/flickr.photos.licenses.setLicense.html */1233 /* https://www.flickr.com/services/api/flickr.photos.licenses.setLicense.html */ 1227 1234 /* Requires Authentication */ 1228 1235 $this->request("flickr.photos.licenses.setLicense", array("photo_id"=>$photo_id, "license_id"=>$license_id), TRUE); … … 1232 1239 /* Photos - Notes Methods */ 1233 1240 function photos_notes_add ($photo_id, $note_x, $note_y, $note_w, $note_h, $note_text) { 1234 /* http ://www.flickr.com/services/api/flickr.photos.notes.add.html */1241 /* https://www.flickr.com/services/api/flickr.photos.notes.add.html */ 1235 1242 $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); 1236 1243 return $this->parsed_response ? $this->parsed_response['note'] : false; … … 1238 1245 1239 1246 function photos_notes_delete ($note_id) { 1240 /* http ://www.flickr.com/services/api/flickr.photos.notes.delete.html */1247 /* https://www.flickr.com/services/api/flickr.photos.notes.delete.html */ 1241 1248 $this->request("flickr.photos.notes.delete", array("note_id" => $note_id), TRUE); 1242 1249 return $this->parsed_response ? true : false; … … 1244 1251 1245 1252 function photos_notes_edit ($note_id, $note_x, $note_y, $note_w, $note_h, $note_text) { 1246 /* http ://www.flickr.com/services/api/flickr.photos.notes.edit.html */1253 /* https://www.flickr.com/services/api/flickr.photos.notes.edit.html */ 1247 1254 $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); 1248 1255 return $this->parsed_response ? true : false; … … 1251 1258 /* Photos - Transform Methods */ 1252 1259 function photos_transform_rotate ($photo_id, $degrees) { 1253 /* http ://www.flickr.com/services/api/flickr.photos.transform.rotate.html */1260 /* https://www.flickr.com/services/api/flickr.photos.transform.rotate.html */ 1254 1261 $this->request("flickr.photos.transform.rotate", array("photo_id" => $photo_id, "degrees" => $degrees), TRUE); 1255 1262 return $this->parsed_response ? true : false; … … 1258 1265 /* Photos - People Methods */ 1259 1266 function photos_people_add ($photo_id, $user_id, $person_x = NULL, $person_y = NULL, $person_w = NULL, $person_h = NULL) { 1260 /* http ://www.flickr.com/services/api/flickr.photos.people.add.html */1267 /* https://www.flickr.com/services/api/flickr.photos.people.add.html */ 1261 1268 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)); 1262 1269 } 1263 1270 1264 1271 function photos_people_delete ($photo_id, $user_id, $email = NULL) { 1265 /* http ://www.flickr.com/services/api/flickr.photos.people.delete.html */1272 /* https://www.flickr.com/services/api/flickr.photos.people.delete.html */ 1266 1273 return $this->call('flickr.photos.people.delete', array('photo_id' => $photo_id, 'user_id' => $user_id, 'email' => $email)); 1267 1274 } 1268 1275 1269 1276 function photos_people_deleteCoords ($photo_id, $user_id) { 1270 /* http ://www.flickr.com/services/api/flickr.photos.people.deleteCoords.html */1277 /* https://www.flickr.com/services/api/flickr.photos.people.deleteCoords.html */ 1271 1278 return $this->call('flickr.photos.people.deleteCoords', array('photo_id' => $photo_id, 'user_id' => $user_id)); 1272 1279 } 1273 1280 1274 1281 function photos_people_editCoords ($photo_id, $user_id, $person_x, $person_y, $person_w, $person_h, $email = NULL) { 1275 /* http ://www.flickr.com/services/api/flickr.photos.people.editCoords.html */1282 /* https://www.flickr.com/services/api/flickr.photos.people.editCoords.html */ 1276 1283 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)); 1277 1284 } 1278 1285 1279 1286 function photos_people_getList ($photo_id) { 1280 /* http ://www.flickr.com/services/api/flickr.photos.people.getList.html */1287 /* https://www.flickr.com/services/api/flickr.photos.people.getList.html */ 1281 1288 return $this->call('flickr.photos.people.getList', array('photo_id' => $photo_id)); 1282 1289 } 1283 1290 1284 1291 /* Photos - Upload Methods */ 1285 1292 function photos_upload_checkTickets ($tickets) { 1286 /* http ://www.flickr.com/services/api/flickr.photos.upload.checkTickets.html */1293 /* https://www.flickr.com/services/api/flickr.photos.upload.checkTickets.html */ 1287 1294 if (is_array($tickets)) { 1288 1295 $tickets = implode(",", $tickets); … … 1294 1301 /* Photosets Methods */ 1295 1302 function photosets_addPhoto ($photoset_id, $photo_id) { 1296 /* http ://www.flickr.com/services/api/flickr.photosets.addPhoto.html */1303 /* https://www.flickr.com/services/api/flickr.photosets.addPhoto.html */ 1297 1304 $this->request("flickr.photosets.addPhoto", array("photoset_id" => $photoset_id, "photo_id" => $photo_id), TRUE); 1298 1305 return $this->parsed_response ? true : false; … … 1300 1307 1301 1308 function photosets_create ($title, $description, $primary_photo_id) { 1302 /* http ://www.flickr.com/services/api/flickr.photosets.create.html */1309 /* https://www.flickr.com/services/api/flickr.photosets.create.html */ 1303 1310 $this->request("flickr.photosets.create", array("title" => $title, "primary_photo_id" => $primary_photo_id, "description" => $description), TRUE); 1304 1311 return $this->parsed_response ? $this->parsed_response['photoset'] : false; … … 1306 1313 1307 1314 function photosets_delete ($photoset_id) { 1308 /* http ://www.flickr.com/services/api/flickr.photosets.delete.html */1315 /* https://www.flickr.com/services/api/flickr.photosets.delete.html */ 1309 1316 $this->request("flickr.photosets.delete", array("photoset_id" => $photoset_id), TRUE); 1310 1317 return $this->parsed_response ? true : false; … … 1312 1319 1313 1320 function photosets_editMeta ($photoset_id, $title, $description = NULL) { 1314 /* http ://www.flickr.com/services/api/flickr.photosets.editMeta.html */1321 /* https://www.flickr.com/services/api/flickr.photosets.editMeta.html */ 1315 1322 $this->request("flickr.photosets.editMeta", array("photoset_id" => $photoset_id, "title" => $title, "description" => $description), TRUE); 1316 1323 return $this->parsed_response ? true : false; … … 1318 1325 1319 1326 function photosets_editPhotos ($photoset_id, $primary_photo_id, $photo_ids) { 1320 /* http ://www.flickr.com/services/api/flickr.photosets.editPhotos.html */1327 /* https://www.flickr.com/services/api/flickr.photosets.editPhotos.html */ 1321 1328 $this->request("flickr.photosets.editPhotos", array("photoset_id" => $photoset_id, "primary_photo_id" => $primary_photo_id, "photo_ids" => $photo_ids), TRUE); 1322 1329 return $this->parsed_response ? true : false; … … 1324 1331 1325 1332 function photosets_getContext ($photo_id, $photoset_id, $num_prev = NULL, $num_next = NULL) { 1326 /* http ://www.flickr.com/services/api/flickr.photosets.getContext.html */1333 /* https://www.flickr.com/services/api/flickr.photosets.getContext.html */ 1327 1334 return $this->call('flickr.photosets.getContext', array('photo_id' => $photo_id, 'photoset_id' => $photoset_id, 'num_prev' => $num_prev, 'num_next' => $num_next)); 1328 1335 } 1329 1336 1330 1337 function photosets_getInfo ($photoset_id) { 1331 /* http ://www.flickr.com/services/api/flickr.photosets.getInfo.html */1338 /* https://www.flickr.com/services/api/flickr.photosets.getInfo.html */ 1332 1339 $this->request("flickr.photosets.getInfo", array("photoset_id" => $photoset_id)); 1333 1340 return $this->parsed_response ? $this->parsed_response['photoset'] : false; 1334 1341 } 1335 1342 1336 function photosets_getList ($user_id = NULL ) {1337 /* http ://www.flickr.com/services/api/flickr.photosets.getList.html */1338 $this->request("flickr.photosets.getList", array("user_id" => $user_id ));1343 function photosets_getList ($user_id = NULL, $page = NULL, $per_page = NULL, $primary_photo_extras = NULL) { 1344 /* https://www.flickr.com/services/api/flickr.photosets.getList.html */ 1345 $this->request("flickr.photosets.getList", array("user_id" => $user_id, 'page' => $page, 'per_page' => $per_page, 'primary_photo_extras' => $primary_photo_extras)); 1339 1346 return $this->parsed_response ? $this->parsed_response['photosets'] : false; 1340 1347 } 1341 1348 1342 1349 function photosets_getPhotos ($photoset_id, $extras = NULL, $privacy_filter = NULL, $per_page = NULL, $page = NULL, $media = NULL) { 1343 /* http ://www.flickr.com/services/api/flickr.photosets.getPhotos.html */1350 /* https://www.flickr.com/services/api/flickr.photosets.getPhotos.html */ 1344 1351 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)); 1345 1352 } 1346 1353 1347 1354 function photosets_orderSets ($photoset_ids) { 1348 /* http ://www.flickr.com/services/api/flickr.photosets.orderSets.html */1355 /* https://www.flickr.com/services/api/flickr.photosets.orderSets.html */ 1349 1356 if (is_array($photoset_ids)) { 1350 1357 $photoset_ids = implode(",", $photoset_ids); … … 1355 1362 1356 1363 function photosets_removePhoto ($photoset_id, $photo_id) { 1357 /* http ://www.flickr.com/services/api/flickr.photosets.removePhoto.html */1364 /* https://www.flickr.com/services/api/flickr.photosets.removePhoto.html */ 1358 1365 $this->request("flickr.photosets.removePhoto", array("photoset_id" => $photoset_id, "photo_id" => $photo_id), TRUE); 1359 1366 return $this->parsed_response ? true : false; 1360 1367 } 1361 1368 1362 1369 function photosets_removePhotos ($photoset_id, $photo_ids) { 1363 /* http ://www.flickr.com/services/api/flickr.photosets.removePhotos.html */1370 /* https://www.flickr.com/services/api/flickr.photosets.removePhotos.html */ 1364 1371 return $this->call('flickr.photosets.removePhotos', array('photoset_id' => $photoset_id, 'photo_ids' => $photo_ids)); 1365 1372 } 1366 1373 1367 1374 function photosets_reorderPhotos ($photoset_id, $photo_ids) { 1368 /* http ://www.flickr.com/services/api/flickr.photosets.reorderPhotos.html */1375 /* https://www.flickr.com/services/api/flickr.photosets.reorderPhotos.html */ 1369 1376 return $this->call('flickr.photosets.reorderPhotos', array('photoset_id' => $photoset_id, 'photo_ids' => $photo_ids)); 1370 1377 } 1371 1378 1372 1379 function photosets_setPrimaryPhoto ($photoset_id, $photo_id) { 1373 /* http ://www.flickr.com/services/api/flickr.photosets.setPrimaryPhoto.html */1380 /* https://www.flickr.com/services/api/flickr.photosets.setPrimaryPhoto.html */ 1374 1381 return $this->call('flickr.photosets.setPrimaryPhoto', array('photoset_id' => $photoset_id, 'photo_id' => $photo_id)); 1375 1382 } … … 1377 1384 /* Photosets Comments Methods */ 1378 1385 function photosets_comments_addComment ($photoset_id, $comment_text) { 1379 /* http ://www.flickr.com/services/api/flickr.photosets.comments.addComment.html */1386 /* https://www.flickr.com/services/api/flickr.photosets.comments.addComment.html */ 1380 1387 $this->request("flickr.photosets.comments.addComment", array("photoset_id" => $photoset_id, "comment_text"=>$comment_text), TRUE); 1381 1388 return $this->parsed_response ? $this->parsed_response['comment'] : false; … … 1383 1390 1384 1391 function photosets_comments_deleteComment ($comment_id) { 1385 /* http ://www.flickr.com/services/api/flickr.photosets.comments.deleteComment.html */1392 /* https://www.flickr.com/services/api/flickr.photosets.comments.deleteComment.html */ 1386 1393 $this->request("flickr.photosets.comments.deleteComment", array("comment_id" => $comment_id), TRUE); 1387 1394 return $this->parsed_response ? true : false; … … 1389 1396 1390 1397 function photosets_comments_editComment ($comment_id, $comment_text) { 1391 /* http ://www.flickr.com/services/api/flickr.photosets.comments.editComment.html */1398 /* https://www.flickr.com/services/api/flickr.photosets.comments.editComment.html */ 1392 1399 $this->request("flickr.photosets.comments.editComment", array("comment_id" => $comment_id, "comment_text"=>$comment_text), TRUE); 1393 1400 return $this->parsed_response ? true : false; … … 1395 1402 1396 1403 function photosets_comments_getList ($photoset_id) { 1397 /* http ://www.flickr.com/services/api/flickr.photosets.comments.getList.html */1404 /* https://www.flickr.com/services/api/flickr.photosets.comments.getList.html */ 1398 1405 $this->request("flickr.photosets.comments.getList", array("photoset_id"=>$photoset_id)); 1399 1406 return $this->parsed_response ? $this->parsed_response['comments'] : false; 1400 1407 } 1401 1408 1402 1409 /* Places Methods */ 1403 1410 function places_find ($query) { 1404 /* http ://www.flickr.com/services/api/flickr.places.find.html */1411 /* https://www.flickr.com/services/api/flickr.places.find.html */ 1405 1412 return $this->call('flickr.places.find', array('query' => $query)); 1406 1413 } 1407 1414 1408 1415 function places_findByLatLon ($lat, $lon, $accuracy = NULL) { 1409 /* http ://www.flickr.com/services/api/flickr.places.findByLatLon.html */1416 /* https://www.flickr.com/services/api/flickr.places.findByLatLon.html */ 1410 1417 return $this->call('flickr.places.findByLatLon', array('lat' => $lat, 'lon' => $lon, 'accuracy' => $accuracy)); 1411 1418 } 1412 1419 1413 1420 function places_getChildrenWithPhotosPublic ($place_id = NULL, $woe_id = NULL) { 1414 /* http ://www.flickr.com/services/api/flickr.places.getChildrenWithPhotosPublic.html */1421 /* https://www.flickr.com/services/api/flickr.places.getChildrenWithPhotosPublic.html */ 1415 1422 return $this->call('flickr.places.getChildrenWithPhotosPublic', array('place_id' => $place_id, 'woe_id' => $woe_id)); 1416 1423 } 1417 1424 1418 1425 function places_getInfo ($place_id = NULL, $woe_id = NULL) { 1419 /* http ://www.flickr.com/services/api/flickr.places.getInfo.html */1426 /* https://www.flickr.com/services/api/flickr.places.getInfo.html */ 1420 1427 return $this->call('flickr.places.getInfo', array('place_id' => $place_id, 'woe_id' => $woe_id)); 1421 1428 } 1422 1429 1423 1430 function places_getInfoByUrl ($url) { 1424 /* http ://www.flickr.com/services/api/flickr.places.getInfoByUrl.html */1431 /* https://www.flickr.com/services/api/flickr.places.getInfoByUrl.html */ 1425 1432 return $this->call('flickr.places.getInfoByUrl', array('url' => $url)); 1426 1433 } 1427 1434 1428 1435 function places_getPlaceTypes () { 1429 /* http ://www.flickr.com/services/api/flickr.places.getPlaceTypes.html */1436 /* https://www.flickr.com/services/api/flickr.places.getPlaceTypes.html */ 1430 1437 return $this->call('flickr.places.getPlaceTypes', array()); 1431 1438 } 1432 1439 1433 1440 function places_getShapeHistory ($place_id = NULL, $woe_id = NULL) { 1434 /* http ://www.flickr.com/services/api/flickr.places.getShapeHistory.html */1441 /* https://www.flickr.com/services/api/flickr.places.getShapeHistory.html */ 1435 1442 return $this->call('flickr.places.getShapeHistory', array('place_id' => $place_id, 'woe_id' => $woe_id)); 1436 1443 } 1437 1444 1438 1445 function places_getTopPlacesList ($place_type_id, $date = NULL, $woe_id = NULL, $place_id = NULL) { 1439 /* http ://www.flickr.com/services/api/flickr.places.getTopPlacesList.html */1446 /* https://www.flickr.com/services/api/flickr.places.getTopPlacesList.html */ 1440 1447 return $this->call('flickr.places.getTopPlacesList', array('place_type_id' => $place_type_id, 'date' => $date, 'woe_id' => $woe_id, 'place_id' => $place_id)); 1441 1448 } 1442 1449 1443 1450 function places_placesForBoundingBox ($bbox, $place_type = NULL, $place_type_id = NULL, $recursive = NULL) { 1444 /* http ://www.flickr.com/services/api/flickr.places.placesForBoundingBox.html */1451 /* https://www.flickr.com/services/api/flickr.places.placesForBoundingBox.html */ 1445 1452 return $this->call('flickr.places.placesForBoundingBox', array('bbox' => $bbox, 'place_type' => $place_type, 'place_type_id' => $place_type_id, 'recursive' => $recursive)); 1446 1453 } 1447 1454 1448 1455 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) { 1449 /* http ://www.flickr.com/services/api/flickr.places.placesForContacts.html */1456 /* https://www.flickr.com/services/api/flickr.places.placesForContacts.html */ 1450 1457 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)); 1451 1458 } 1452 1459 1453 1460 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) { 1454 /* http ://www.flickr.com/services/api/flickr.places.placesForTags.html */1461 /* https://www.flickr.com/services/api/flickr.places.placesForTags.html */ 1455 1462 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)); 1456 1463 } 1457 1464 1458 1465 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) { 1459 /* http ://www.flickr.com/services/api/flickr.places.placesForUser.html */1466 /* https://www.flickr.com/services/api/flickr.places.placesForUser.html */ 1460 1467 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)); 1461 1468 } 1462 1469 1463 1470 function places_resolvePlaceId ($place_id) { 1464 /* http ://www.flickr.com/services/api/flickr.places.resolvePlaceId.html */1471 /* https://www.flickr.com/services/api/flickr.places.resolvePlaceId.html */ 1465 1472 $rsp = $this->call('flickr.places.resolvePlaceId', array('place_id' => $place_id)); 1466 1473 return $rsp ? $rsp['location'] : $rsp; 1467 1474 } 1468 1475 1469 1476 function places_resolvePlaceURL ($url) { 1470 /* http ://www.flickr.com/services/api/flickr.places.resolvePlaceURL.html */1477 /* https://www.flickr.com/services/api/flickr.places.resolvePlaceURL.html */ 1471 1478 $rsp = $this->call('flickr.places.resolvePlaceURL', array('url' => $url)); 1472 1479 return $rsp ? $rsp['location'] : $rsp; 1473 1480 } 1474 1481 1475 1482 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) { 1476 /* http ://www.flickr.com/services/api/flickr.places.tagsForPlace.html */1483 /* https://www.flickr.com/services/api/flickr.places.tagsForPlace.html */ 1477 1484 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)); 1478 1485 } … … 1480 1487 /* Prefs Methods */ 1481 1488 function prefs_getContentType () { 1482 /* http ://www.flickr.com/services/api/flickr.prefs.getContentType.html */1489 /* https://www.flickr.com/services/api/flickr.prefs.getContentType.html */ 1483 1490 $rsp = $this->call('flickr.prefs.getContentType', array()); 1484 1491 return $rsp ? $rsp['person'] : $rsp; 1485 1492 } 1486 1493 1487 1494 function prefs_getGeoPerms () { 1488 /* http ://www.flickr.com/services/api/flickr.prefs.getGeoPerms.html */1495 /* https://www.flickr.com/services/api/flickr.prefs.getGeoPerms.html */ 1489 1496 return $this->call('flickr.prefs.getGeoPerms', array()); 1490 1497 } 1491 1498 1492 1499 function prefs_getHidden () { 1493 /* http ://www.flickr.com/services/api/flickr.prefs.getHidden.html */1500 /* https://www.flickr.com/services/api/flickr.prefs.getHidden.html */ 1494 1501 $rsp = $this->call('flickr.prefs.getHidden', array()); 1495 1502 return $rsp ? $rsp['person'] : $rsp; 1496 1503 } 1497 1504 1498 1505 function prefs_getPrivacy () { 1499 /* http ://www.flickr.com/services/api/flickr.prefs.getPrivacy.html */1506 /* https://www.flickr.com/services/api/flickr.prefs.getPrivacy.html */ 1500 1507 $rsp = $this->call('flickr.prefs.getPrivacy', array()); 1501 1508 return $rsp ? $rsp['person'] : $rsp; 1502 1509 } 1503 1510 1504 1511 function prefs_getSafetyLevel () { 1505 /* http ://www.flickr.com/services/api/flickr.prefs.getSafetyLevel.html */1512 /* https://www.flickr.com/services/api/flickr.prefs.getSafetyLevel.html */ 1506 1513 $rsp = $this->call('flickr.prefs.getSafetyLevel', array()); 1507 1514 return $rsp ? $rsp['person'] : $rsp; … … 1510 1517 /* Reflection Methods */ 1511 1518 function reflection_getMethodInfo ($method_name) { 1512 /* http ://www.flickr.com/services/api/flickr.reflection.getMethodInfo.html */1519 /* https://www.flickr.com/services/api/flickr.reflection.getMethodInfo.html */ 1513 1520 $this->request("flickr.reflection.getMethodInfo", array("method_name" => $method_name)); 1514 1521 return $this->parsed_response ? $this->parsed_response : false; … … 1516 1523 1517 1524 function reflection_getMethods () { 1518 /* http ://www.flickr.com/services/api/flickr.reflection.getMethods.html */1525 /* https://www.flickr.com/services/api/flickr.reflection.getMethods.html */ 1519 1526 $this->request("flickr.reflection.getMethods"); 1520 1527 return $this->parsed_response ? $this->parsed_response['methods']['method'] : false; … … 1523 1530 /* Stats Methods */ 1524 1531 function stats_getCollectionDomains ($date, $collection_id = NULL, $per_page = NULL, $page = NULL) { 1525 /* http ://www.flickr.com/services/api/flickr.stats.getCollectionDomains.html */1532 /* https://www.flickr.com/services/api/flickr.stats.getCollectionDomains.html */ 1526 1533 return $this->call('flickr.stats.getCollectionDomains', array('date' => $date, 'collection_id' => $collection_id, 'per_page' => $per_page, 'page' => $page)); 1527 1534 } 1528 1535 1529 1536 function stats_getCollectionReferrers ($date, $domain, $collection_id = NULL, $per_page = NULL, $page = NULL) { 1530 /* http ://www.flickr.com/services/api/flickr.stats.getCollectionReferrers.html */1537 /* https://www.flickr.com/services/api/flickr.stats.getCollectionReferrers.html */ 1531 1538 return $this->call('flickr.stats.getCollectionReferrers', array('date' => $date, 'domain' => $domain, 'collection_id' => $collection_id, 'per_page' => $per_page, 'page' => $page)); 1532 1539 } 1533 1540 1534 1541 function stats_getCollectionStats ($date, $collection_id) { 1535 /* http ://www.flickr.com/services/api/flickr.stats.getCollectionStats.html */1542 /* https://www.flickr.com/services/api/flickr.stats.getCollectionStats.html */ 1536 1543 return $this->call('flickr.stats.getCollectionStats', array('date' => $date, 'collection_id' => $collection_id)); 1537 1544 } 1538 1545 1539 1546 function stats_getCSVFiles () { 1540 /* http ://www.flickr.com/services/api/flickr.stats.getCSVFiles.html */1547 /* https://www.flickr.com/services/api/flickr.stats.getCSVFiles.html */ 1541 1548 return $this->call('flickr.stats.getCSVFiles', array()); 1542 1549 } 1543 1550 1544 1551 function stats_getPhotoDomains ($date, $photo_id = NULL, $per_page = NULL, $page = NULL) { 1545 /* http ://www.flickr.com/services/api/flickr.stats.getPhotoDomains.html */1552 /* https://www.flickr.com/services/api/flickr.stats.getPhotoDomains.html */ 1546 1553 return $this->call('flickr.stats.getPhotoDomains', array('date' => $date, 'photo_id' => $photo_id, 'per_page' => $per_page, 'page' => $page)); 1547 1554 } 1548 1555 1549 1556 function stats_getPhotoReferrers ($date, $domain, $photo_id = NULL, $per_page = NULL, $page = NULL) { 1550 /* http ://www.flickr.com/services/api/flickr.stats.getPhotoReferrers.html */1557 /* https://www.flickr.com/services/api/flickr.stats.getPhotoReferrers.html */ 1551 1558 return $this->call('flickr.stats.getPhotoReferrers', array('date' => $date, 'domain' => $domain, 'photo_id' => $photo_id, 'per_page' => $per_page, 'page' => $page)); 1552 1559 } 1553 1560 1554 1561 function stats_getPhotosetDomains ($date, $photoset_id = NULL, $per_page = NULL, $page = NULL) { 1555 /* http ://www.flickr.com/services/api/flickr.stats.getPhotosetDomains.html */1562 /* https://www.flickr.com/services/api/flickr.stats.getPhotosetDomains.html */ 1556 1563 return $this->call('flickr.stats.getPhotosetDomains', array('date' => $date, 'photoset_id' => $photoset_id, 'per_page' => $per_page, 'page' => $page)); 1557 1564 } 1558 1565 1559 1566 function stats_getPhotosetReferrers ($date, $domain, $photoset_id = NULL, $per_page = NULL, $page = NULL) { 1560 /* http ://www.flickr.com/services/api/flickr.stats.getPhotosetReferrers.html */1567 /* https://www.flickr.com/services/api/flickr.stats.getPhotosetReferrers.html */ 1561 1568 return $this->call('flickr.stats.getPhotosetReferrers', array('date' => $date, 'domain' => $domain, 'photoset_id' => $photoset_id, 'per_page' => $per_page, 'page' => $page)); 1562 1569 } 1563 1570 1564 1571 function stats_getPhotosetStats ($date, $photoset_id) { 1565 /* http ://www.flickr.com/services/api/flickr.stats.getPhotosetStats.html */1572 /* https://www.flickr.com/services/api/flickr.stats.getPhotosetStats.html */ 1566 1573 return $this->call('flickr.stats.getPhotosetStats', array('date' => $date, 'photoset_id' => $photoset_id)); 1567 1574 } 1568 1575 1569 1576 function stats_getPhotoStats ($date, $photo_id) { 1570 /* http ://www.flickr.com/services/api/flickr.stats.getPhotoStats.html */1577 /* https://www.flickr.com/services/api/flickr.stats.getPhotoStats.html */ 1571 1578 return $this->call('flickr.stats.getPhotoStats', array('date' => $date, 'photo_id' => $photo_id)); 1572 1579 } 1573 1580 1574 1581 function stats_getPhotostreamDomains ($date, $per_page = NULL, $page = NULL) { 1575 /* http ://www.flickr.com/services/api/flickr.stats.getPhotostreamDomains.html */1582 /* https://www.flickr.com/services/api/flickr.stats.getPhotostreamDomains.html */ 1576 1583 return $this->call('flickr.stats.getPhotostreamDomains', array('date' => $date, 'per_page' => $per_page, 'page' => $page)); 1577 1584 } 1578 1585 1579 1586 function stats_getPhotostreamReferrers ($date, $domain, $per_page = NULL, $page = NULL) { 1580 /* http ://www.flickr.com/services/api/flickr.stats.getPhotostreamReferrers.html */1587 /* https://www.flickr.com/services/api/flickr.stats.getPhotostreamReferrers.html */ 1581 1588 return $this->call('flickr.stats.getPhotostreamReferrers', array('date' => $date, 'domain' => $domain, 'per_page' => $per_page, 'page' => $page)); 1582 1589 } 1583 1590 1584 1591 function stats_getPhotostreamStats ($date) { 1585 /* http ://www.flickr.com/services/api/flickr.stats.getPhotostreamStats.html */1592 /* https://www.flickr.com/services/api/flickr.stats.getPhotostreamStats.html */ 1586 1593 return $this->call('flickr.stats.getPhotostreamStats', array('date' => $date)); 1587 1594 } 1588 1595 1589 1596 function stats_getPopularPhotos ($date = NULL, $sort = NULL, $per_page = NULL, $page = NULL) { 1590 /* http ://www.flickr.com/services/api/flickr.stats.getPopularPhotos.html */1597 /* https://www.flickr.com/services/api/flickr.stats.getPopularPhotos.html */ 1591 1598 return $this->call('flickr.stats.getPopularPhotos', array('date' => $date, 'sort' => $sort, 'per_page' => $per_page, 'page' => $page)); 1592 1599 } 1593 1600 1594 1601 function stats_getTotalViews ($date = NULL) { 1595 /* http ://www.flickr.com/services/api/flickr.stats.getTotalViews.html */1602 /* https://www.flickr.com/services/api/flickr.stats.getTotalViews.html */ 1596 1603 return $this->call('flickr.stats.getTotalViews', array('date' => $date)); 1597 1604 } 1598 1605 1599 1606 /* Tags Methods */ 1600 1607 function tags_getClusterPhotos ($tag, $cluster_id) { 1601 /* http ://www.flickr.com/services/api/flickr.tags.getClusterPhotos.html */1608 /* https://www.flickr.com/services/api/flickr.tags.getClusterPhotos.html */ 1602 1609 return $this->call('flickr.tags.getClusterPhotos', array('tag' => $tag, 'cluster_id' => $cluster_id)); 1603 1610 } 1604 1611 1605 1612 function tags_getClusters ($tag) { 1606 /* http ://www.flickr.com/services/api/flickr.tags.getClusters.html */1613 /* https://www.flickr.com/services/api/flickr.tags.getClusters.html */ 1607 1614 return $this->call('flickr.tags.getClusters', array('tag' => $tag)); 1608 1615 } 1609 1616 1610 1617 function tags_getHotList ($period = NULL, $count = NULL) { 1611 /* http ://www.flickr.com/services/api/flickr.tags.getHotList.html */1618 /* https://www.flickr.com/services/api/flickr.tags.getHotList.html */ 1612 1619 $this->request("flickr.tags.getHotList", array("period" => $period, "count" => $count)); 1613 1620 return $this->parsed_response ? $this->parsed_response['hottags'] : false; … … 1615 1622 1616 1623 function tags_getListPhoto ($photo_id) { 1617 /* http ://www.flickr.com/services/api/flickr.tags.getListPhoto.html */1624 /* https://www.flickr.com/services/api/flickr.tags.getListPhoto.html */ 1618 1625 $this->request("flickr.tags.getListPhoto", array("photo_id" => $photo_id)); 1619 1626 return $this->parsed_response ? $this->parsed_response['photo']['tags']['tag'] : false; … … 1621 1628 1622 1629 function tags_getListUser ($user_id = NULL) { 1623 /* http ://www.flickr.com/services/api/flickr.tags.getListUser.html */1630 /* https://www.flickr.com/services/api/flickr.tags.getListUser.html */ 1624 1631 $this->request("flickr.tags.getListUser", array("user_id" => $user_id)); 1625 1632 return $this->parsed_response ? $this->parsed_response['who']['tags']['tag'] : false; … … 1627 1634 1628 1635 function tags_getListUserPopular ($user_id = NULL, $count = NULL) { 1629 /* http ://www.flickr.com/services/api/flickr.tags.getListUserPopular.html */1636 /* https://www.flickr.com/services/api/flickr.tags.getListUserPopular.html */ 1630 1637 $this->request("flickr.tags.getListUserPopular", array("user_id" => $user_id, "count" => $count)); 1631 1638 return $this->parsed_response ? $this->parsed_response['who']['tags']['tag'] : false; … … 1633 1640 1634 1641 function tags_getListUserRaw ($tag = NULL) { 1635 /* http ://www.flickr.com/services/api/flickr.tags.getListUserRaw.html */1642 /* https://www.flickr.com/services/api/flickr.tags.getListUserRaw.html */ 1636 1643 return $this->call('flickr.tags.getListUserRaw', array('tag' => $tag)); 1637 1644 } 1638 1645 1639 1646 function tags_getRelated ($tag) { 1640 /* http ://www.flickr.com/services/api/flickr.tags.getRelated.html */1647 /* https://www.flickr.com/services/api/flickr.tags.getRelated.html */ 1641 1648 $this->request("flickr.tags.getRelated", array("tag" => $tag)); 1642 1649 return $this->parsed_response ? $this->parsed_response['tags'] : false; … … 1644 1651 1645 1652 function test_echo ($args = array()) { 1646 /* http ://www.flickr.com/services/api/flickr.test.echo.html */1653 /* https://www.flickr.com/services/api/flickr.test.echo.html */ 1647 1654 $this->request("flickr.test.echo", $args); 1648 1655 return $this->parsed_response ? $this->parsed_response : false; … … 1650 1657 1651 1658 function test_login () { 1652 /* http ://www.flickr.com/services/api/flickr.test.login.html */1659 /* https://www.flickr.com/services/api/flickr.test.login.html */ 1653 1660 $this->request("flickr.test.login"); 1654 1661 return $this->parsed_response ? $this->parsed_response['user'] : false; … … 1656 1663 1657 1664 function urls_getGroup ($group_id) { 1658 /* http ://www.flickr.com/services/api/flickr.urls.getGroup.html */1665 /* https://www.flickr.com/services/api/flickr.urls.getGroup.html */ 1659 1666 $this->request("flickr.urls.getGroup", array("group_id"=>$group_id)); 1660 1667 return $this->parsed_response ? $this->parsed_response['group']['url'] : false; … … 1662 1669 1663 1670 function urls_getUserPhotos ($user_id = NULL) { 1664 /* http ://www.flickr.com/services/api/flickr.urls.getUserPhotos.html */1671 /* https://www.flickr.com/services/api/flickr.urls.getUserPhotos.html */ 1665 1672 $this->request("flickr.urls.getUserPhotos", array("user_id"=>$user_id)); 1666 1673 return $this->parsed_response ? $this->parsed_response['user']['url'] : false; … … 1668 1675 1669 1676 function urls_getUserProfile ($user_id = NULL) { 1670 /* http ://www.flickr.com/services/api/flickr.urls.getUserProfile.html */1677 /* https://www.flickr.com/services/api/flickr.urls.getUserProfile.html */ 1671 1678 $this->request("flickr.urls.getUserProfile", array("user_id"=>$user_id)); 1672 1679 return $this->parsed_response ? $this->parsed_response['user']['url'] : false; 1673 1680 } 1674 1681 1675 1682 function urls_lookupGallery ($url) { 1676 /* http ://www.flickr.com/services/api/flickr.urls.lookupGallery.html */1683 /* https://www.flickr.com/services/api/flickr.urls.lookupGallery.html */ 1677 1684 return $this->call('flickr.urls.lookupGallery', array('url' => $url)); 1678 1685 } 1679 1686 1680 1687 function urls_lookupGroup ($url) { 1681 /* http ://www.flickr.com/services/api/flickr.urls.lookupGroup.html */1688 /* https://www.flickr.com/services/api/flickr.urls.lookupGroup.html */ 1682 1689 $this->request("flickr.urls.lookupGroup", array("url"=>$url)); 1683 1690 return $this->parsed_response ? $this->parsed_response['group'] : false; … … 1685 1692 1686 1693 function urls_lookupUser ($url) { 1687 /* http ://www.flickr.com/services/api/flickr.photos.notes.edit.html */1694 /* https://www.flickr.com/services/api/flickr.photos.notes.edit.html */ 1688 1695 $this->request("flickr.urls.lookupUser", array("url"=>$url)); 1689 1696 return $this->parsed_response ? $this->parsed_response['user'] : false; … … 1696 1703 var $phpFlickr, $per_page, $method, $args, $results, $global_phpFlickr; 1697 1704 var $total = null, $page = 0, $pages = null, $photos, $_extra = null; 1698 1699 1705 1706 1700 1707 function phpFlickr_pager($phpFlickr, $method = null, $args = null, $per_page = 30) { 1701 1708 $this->per_page = $per_page; … … 1704 1711 $this->set_phpFlickr($phpFlickr); 1705 1712 } 1706 1713 1707 1714 function set_phpFlickr($phpFlickr) { 1708 1715 if ( is_a($phpFlickr, 'phpFlickr') ) { … … 1715 1722 } 1716 1723 } 1717 1724 1718 1725 function __sleep() { 1719 1726 return array( … … 1725 1732 ); 1726 1733 } 1727 1734 1728 1735 function load($page) { 1729 1736 $allowed_methods = array( … … 1732 1739 ); 1733 1740 if ( !in_array($this->method, array_keys($allowed_methods)) ) return false; 1734 1741 1735 1742 if ( $this->phpFlickr->cache ) { 1736 1743 $min = ($page - 1) * $this->per_page; … … 1757 1764 $this->total = $this->results['total']; 1758 1765 $this->pages = ceil($this->results['total'] / $this->per_page); 1759 1766 1760 1767 $this->args['page'] = floor($min/500) + 2; 1761 1768 $this->results = $this->phpFlickr->call($this->method, $this->args); … … 1775 1782 if ( $this->results ) { 1776 1783 $this->results = $this->results[$allowed_methods[$this->method]]; 1777 1784 1778 1785 $this->photos = $this->results['photo']; 1779 1786 $this->total = $this->results['total']; … … 1785 1792 } 1786 1793 } 1787 1794 1788 1795 function get($page = null) { 1789 1796 if ( is_null($page) ) { … … 1799 1806 return array(); 1800 1807 } 1801 1808 1802 1809 function next() { 1803 1810 $this->page++; … … 1809 1816 return array(); 1810 1817 } 1811 1818 1812 1819 } 1813 1820 } -
wp2flickr/trunk/readme.txt
r919244 r959871 5 5 Requires at least: 3.8 6 6 Tested up to: 3.9.1 7 Stable tag: 0.1 37 Stable tag: 0.14 8 8 9 9 Uploads photos from WordPress posts to Flickr. … … 31 31 == Changelog == 32 32 33 = 0.14 = 34 * Flickr HTTPS endpoints (CURL options and some regexpr un phpFlickr) 35 33 36 = 0.13 = 34 37 * Flickr HTTPS endpoints (Flickr API Going SSL-Only) -
wp2flickr/trunk/wp2flickr.php
r919244 r959871 4 4 Plugin URI: http://wp2flickr.com/ 5 5 Description: upload photos from posts to flickr (standard media or YAPB) 6 Version: 0.1 36 Version: 0.14 7 7 Author: Fran Simó 8 8 Author URI: http://fransimo.info/
Note: See TracChangeset
for help on using the changeset viewer.