Implement photosets.getPhotos
KarenS - June 18, 2007 - 20:55
| Project: | Flickr |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | patch (code needs review) |
Description
I'd like to see photosets.getPhotos implemented to return all the photos from a photoset. Patch attached that will add that function.
It could be useful in many ways. I'm using this in a CCK Flickrfield module that allows you to input a photo or photoset id and retrieve the photo, the photoset primary photo, or all photoset photos to display in the field (I'm submitting that module in a separate issue).
| Attachment | Size |
|---|---|
| flickr.inc_.patch | 916 bytes |

#1
here's a re-roll that updates some of the other andrew's code in the sets module to use the function.
#2
here's the patch...
#3
your re-roll looks good to me except for the fact that you are leaving the $set_response variable in there unused. am i missing something? My re-re-roll adds these lines to the patch:
- $set_response = flickr_request('flickr.photosets.getPhotos',- array(
- 'photoset_id'=>$set_id,
- 'page' => $pager_page_array[$element]+1,
- 'per_page' => variable_get('flickr_photos_per_page', 20),
- ));
I am setting this RTBC for you to commit. thanks KarenS and drewish...
#4
i'd like to clean up some of the PHPDoc before we commit this.
#5
I'm unassigning myself for now, but still interested in this idea.
#6
Rerolled latest patch, for Drupal 5.
#7
I applied the patch but it didn't get any more than one photo. Perhaps I am doing something wrong.
Great idea, I hope somebody smarter than me can make it work.
Also, double parenthesis in line 148 spits a syntax error.
thanks,
jmjohn
#8
I couldn't get the patch to apply cleanly at all. But I updated the files "by hand." But like #7, I still just get 1 image using the input filter for sets.
#9
Any update for drupal 6?
See also http://drupal.org/node/262591
Thanks,
Antonio