Implement photosets.getPhotos
KarenS - June 18, 2007 - 20:55
| Project: | Flickr |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | paulbooker |
| Status: | 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
#10
I worked a bit on the patch of #6:
- fixed syntax error reported in #7
- there were some bugs in the refactoring (forgotten translation of $set_response['photoset'] to $photoset)
- worked a bit on PHPdoc
patch works on my setup
At glass.dimly and Shai: the patch does not change the behavior of the input filter for sets, there is only some refactoring under the hood. It's invisible above the surface, but it should make it simpler to implement your feature request.
#11
#12
coming back to this after we have released a stable 1.0 version of this module
#13
Would you provide a recent patch for review.
Best, Paul
#14
#15
This one should do it
#16
(title update)
#17
As best I can tell this has been committed. If I'm wrong please feel free to reopen.
#18
Oops, wrong issue. Sorry.
I'm reviewing this and I think it's a good idea. I'm holding off on committing it until I get through some of the rest of the issue queue, to make sure it doesn't adversely affect anything else in the queue.
#19
fixing the title. we use the status field to indicate that there's a patch.
didn't try applying the patch but aside from some indenting issues it looks okay to me.