Forums | Admin

Discussion Forums: help

Start New Thread Start New Thread

 

By: Trevor Schroeder
RE: wrong content type in unauth mode [ reply ]  
2006-07-22 12:02
I generally keep the arguments in the same order as they are in Flickr's online documentation. Failing that, you can always glance at the rflickr source. It's messy, but it works.

I've got a decent hack for implementing keyword arguments while maintaining backwards compatibility, so look for that down the road.

By: Thomas Landspurg
RE: wrong content type in unauth mode [ reply ]  
2006-07-21 14:08
But how can we get information on the various objects/field of the API?

for instance, what are the "nil" attribute in the photo.search? equivalent of the flickr API parameters?

By: Trevor Schroeder
RE: wrong content type in unauth mode [ reply ]  
2006-07-09 11:31
There are a couple of mistakes above. The instantiation should be:

flickr = Flickr.new(nil, 'd85e46dced857d8512159aecf4338f75')

because you're not using a token cache file.

Secondly, the search should be

photos = flickr.photos.search(nil, params[:tags], nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 24)

It sucks, I know, but Ruby doesn't support keyword parameter passing like you're trying to use. In hindsight, it might have been better to pass in a Hash of parameter => value pairs.

By: David Murphy
RE: wrong content type in unauth mode [ reply ]  
2006-07-07 02:06
OK.. bit of a follow up. I managed to get a token created, and it appears to try to use it whenever i make a request, but now i get 'Unknown User' errors. I am still curious how I would make the call without having to do authentication. Any hints?

By: David Murphy
wrong content type in unauth mode [ reply ]  
2006-07-05 03:42
I want to switch to rflickr as it returns more data than flickr.rb did. But when I try to do something simple like search for photos based on a tag, I run into all sorts of problems. Do I still need to worry about things other than just my API token if I am doing anon requests?

In a nutshell, I do this:
flickr = Flickr.new('d85e46dced857d8512159aecf4338f75')
flickr.auth_mode = false
photos = flickr.photos.search(:tags => params[:tags], :per_page => '24')

but that bombs. with the wrong content type error. Do I need to get into the frob stuff? I'm new to ruby/rails, so I apologize for simple questions :)
dave