thmbnl.com Ruby API
Version 1.0 - 2/26/08
Requirements:
Usage:
require 'Thmbnl'
t = Thmbnl.new( :consumer_key => 'CONSUMER_KEY',
:consumer_secret => 'CONSUMER_SECRET',
:token => 'TOKEN',
:token_secret => 'TOKEN_SECRET' )
# Find thumbnail URLs
url = t.find("http://www.thmbnl.com", :size => 100)
puts url
# Add a URL to the Thmbnl queue for thumbnailing
if t.create("http://www.thmbnl.com")
puts "OK!"
else
puts t.error
end
Methods:
find( url, size ) - Returns a thumbnail URL for a specified site/size.
params:
url : valid http/https URL
size: 60, 100, 160, 320, 800 (pixel widths)
returns:
URL of thumbnail image for the specified site/size
create( url ) - Add a URL to the Thmbnl.com queue to be thumbnailed.
params:
url: valid http/https url
returns (boolean):
true:
Thmbnl creation was successful. The URL has been added to the queue and a thumbnail should be available shortly.
false:
Thmbnl creation failed. See error() for details.
error()
returns:
Last error from Thmbnl. May include:
Comments (0)
You don't have permission to comment on this page.