ZF-2565: Add support for flickr.groups.pools.getPhotos


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


Patch/diff file for new groupPoolGetPhotos() method

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}}.

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

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

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.

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

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

What is the next step from here?

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. :)

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

You should commit your changes to the HEAD of trunk.

Resolved in SVN 8733-8734

If you committed a patch for this issue, added unit tests and probably added some docu which describe it,

then you should close this issue, as "resolved" ;-)

Closed after commit

Did this make it in to 1.5.0?

It is not included in 1.5.0.

Zend_Service_Flickr seems to be at revision 8064 in 1.5.0 whereas latest commit related to this issue is revision 8733 (and 8886 for accompanying tests).

Merging revisions 8733 and 8734 to the release-1.5 branch would get these features into the next mini release (1.5.2), or as they are new features, they could wait for next minor release (1.6.0).

Merged to release-1.5 branch in r9433

Updating for the 1.6.0 release.