I''m returning my photos to my site, but I''m want to limit the
result to
like 5 photos or something. Right now, it''s returning all of my public
photos.
What I''m attempting is to do some sort of counter loop in the view to
limit this, but it seems like the API would have a count or a limit
option.
Does anyone know how to limit the photos returned by
"user.tag(''red'')"???
If not, do you know of a good way to loop through and limit the results
to only showing 5 photos?
Thanks a bunch!
--
Posted via http://www.ruby-forum.com/.
On 19/07/06 16:58 +0200, ry an wrote:> I''m returning my photos to my site, but I''m want to limit the result to > like 5 photos or something. Right now, it''s returning all of my public > photos. > > What I''m attempting is to do some sort of counter loop in the view to > limit this, but it seems like the API would have a count or a limit > option. >Without looking at the flickr API, the source for flickr.rb does not appear to support such an option.> Does anyone know how to limit the photos returned by > "user.tag(''red'')"??? > > If not, do you know of a good way to loop through and limit the results > to only showing 5 photos? >user.tags(''red'')[0..4] should get the first five in the collection. Good Luck, Jason
Awesome. Thanks! -- Posted via http://www.ruby-forum.com/.
The Rails/flickr screencast at http://media.rubyonrails.org/video/flickr-rails-ajax.mov shows a way to limit the number returned. They''re getting the pics a different way, but perhaps you can adapt what they are doing to your purposes. - foobario -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060719/cebd49dd/attachment.html