return photos;
}
private void fetchPhotos(final String tag, List<Photo> photos) throws ClientProtocolException, IOException, URISyntaxException {
HttpResponseDecorator response = (HttpResponseDecorator) rest().get(asMap(
new Object[]{"path", "rest"},
new Object[]{"query", asMap(
new Object[]{"api_key", getConfigValueAsString(FLICKR_API_KEY)},
new Object[]{"method", "flickr.photos.search"},
new Object[]{"tags", tag}
)}
));
NodeChild root = (NodeChild)response.getData();
NodeChild photosNode = (NodeChild)root.children().getAt(0);
int i = 0;
for (Iterator<Node> children = photosNode.childNodes(); i < 3 && children.hasNext(); i++) {
Node photo = children.next();