I had the same issue, I had to modify the flickr.rb code. Replace the photos
method in the User class with:
def photos(opts=Hash.new)
opts[''user_id''] = @id
@client.people_getPublicPhotos(opts)[''photos''][''photo''].collect
{ |photo| Photo.new(photo[''id'']) }
# what about non-public photos?
end
Then call it like this:
user.photos({''per_page''=>6.to_s})
Make sure you pass the parameters as a Hash and the per_page value is a string
and not a numeric value otherwise you will get a FixNum exception.
cheers,
scott
----------------------------------------------------------------------------------------------------
What''s an Intel chip doing in a Mac? A whole lor more that
it''s ever done in a PC.
My Digital Life - http://scottwalter.com/blog
Pro:Blog - http://scottwalter.com/problog
Snippets - http://snippets.scottwalter.com
----- Original Message ----
From: Damien Timewell <mail@damientimewell.com>
To: rails@lists.rubyonrails.org
Sent: Saturday, June 24, 2006 6:27:38 AM
Subject: [Rails] using flickr.rb
Does anyone have any experience with using flickr.rb? Seems the only
thing which is documented for it is searching through your photos.
Anyway, all I''m trying to do is return a list of my 20 most recent
photos, but nothing seems to work.
doing this returns 100 photos for a given user (which takes all day to
load)
@flickr = Flickr.new ''API KEY''
@user = @flickr.users(''USERNAME'')
render :partial => "/posts/photo", :collection => @user.photos
if I try to add options to @user.photos like (:per_page => 20) it
doesn''t work.
Any ideas?
--
Posted via http://www.ruby-forum.com/.
_______________________________________________
Rails mailing list
Rails@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://wrath.rubyonrails.org/pipermail/rails/attachments/20060624/340770dc/attachment.html