/[drupal]/contributions/modules/flickr/flickr.inc
ViewVC logotype

Diff of /contributions/modules/flickr/flickr.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.31.2.2, Mon Mar 16 17:34:49 2009 UTC revision 1.31.2.3, Tue Mar 17 21:56:54 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: flickr.inc,v 1.31.2.1 2009/01/30 10:39:01 paulbooker Exp $  // $Id: flickr.inc,v 1.31.2.2 2009/03/16 17:34:49 paulbooker Exp $
3    
4  define('FLICKR_REST_ENDPOINT', 'http://api.flickr.com/services/rest/');  define('FLICKR_REST_ENDPOINT', 'http://api.flickr.com/services/rest/');
5    
# Line 541  function flickr_set_error($messageOrResp Line 541  function flickr_set_error($messageOrResp
541    }    }
542    watchdog('flickr', $message, array(), WATCHDOG_WARNING);    watchdog('flickr', $message, array(), WATCHDOG_WARNING);
543  }  }
544    
545    /**
546     * @param $nid
547     *   nsid of the group whose photos you want
548     *
549     * @return
550     *   response from the flickr method flickr.photosets.getList
551     *   (http://www.flickr.com/services/api/flickr.photosets.getList.html)
552    */
553    function flickr_get_group_photos($nsid, $page = 1, $other_args = array()){
554      $args = array (
555        'group_id' => $nsid,
556        'page' => $page,
557      );
558    
559      //set per_page to flickr module default if it is not specified in $other_args
560      if (!isset($other_args['per_page'])) {
561        $args['per_page'] = variable_get('flickr_photos_per_page', 20);
562      }
563    
564      $response = flickr_request('flickr.groups.pools.getPhotos', array_merge($args, $other_args));
565      if ($response) {
566        return $response['photos'];
567      }
568      return FALSE;
569    }

Legend:
Removed from v.1.31.2.2  
changed lines
  Added in v.1.31.2.3

  ViewVC Help
Powered by ViewVC 1.1.2