Description

The Flickr API method flickr.groups.pools.getPhotos allows to grab photos from group pools and optionally filter by a tag.
I've extended the Zend_Service_Flickr class for my own use and would love for it to be part of the official release. Below is proposed new function.
The _validateGroupPoolGetPhotos() method is identical to the original _validateUserSearch() short of the addition of 'tags' as a valid option.

I'm not sure the method names are optimal but it was the best I could come up with :/
If I'm making mistakes please bear with me, it's my first post as a contributor.

[UPDATE] Attached suggested improvement as a patch file

Comments

Posted by Joakim Nygård (jokke) on 2008-02-05T06:19:05.000+0000

Patch/diff file for new groupPoolGetPhotos() method

Posted by Darby Felton (darby) on 2008-02-06T08:39:48.000+0000

Looks good to me, thanks for providing this patch! :) Would you be interested in contributing this, accompanying unit tests and documentation?

Tiny thing: I did notice that the {{$query}} parameter can be {{array|string}}, not just {{string}}.

Posted by Joakim Nygård (jokke) on 2008-02-06T16:06:45.000+0000

I would be happy to write the accompanying test and doc. Good find, an array is not a valid input for this method.

Posted by Joakim Nygård (jokke) on 2008-02-06T18:35:45.000+0000

Not sure if the unit tests should be included in the same patch file, but here goes.

Posted by Joakim Nygård (jokke) on 2008-02-06T18:40:19.000+0000

Been having a few issues with my PHPUnit not working with xdebug enabled on my Mac/Leopard install.

I am not sure the testGroupPoolGetPhotosBasic() test is needed - it is basically a copy of the testTagSearchBasic(). The needed files in the _files dir seems to be omitted by svn in generating the diff?

The array bug found by Darby has been fixed.

Could someone please review the patch and check if all is well.

Posted by Joakim Nygård (jokke) on 2008-02-11T15:58:55.000+0000

I'm a fool, forgetting to add the new test files. They are included in the latest diff file.

Posted by Joakim Nygård (jokke) on 2008-02-13T13:18:48.000+0000

Attaching a new diff file with documentation added.
Also corrected a missing valid option user_id.

What is the next step from here?

Posted by Darby Felton (darby) on 2008-03-04T13:57:20.000+0000

I think the next step is to commit the changes to the SVN repository. I'll send your SVN credentials in an e-mail shortly. :)

Posted by Joakim Nygård (jokke) on 2008-03-08T08:13:42.000+0000

Thank you, Darby. Should I patch and commit against HEAD or some specific revision?