browshot.rb

Browshot is available on Rubygems.

The source code is available on gitbub.

Full API

#!/usr/bin/env ruby

require 'browshot'

client = Browshot.new('my_key')

version = client.api_version()
puts "API version : #{version}\n\n"

screenshot = client.screenshot_create('http://www.google.fr/', { 'instance_id' => 12 })
[...]
info  = @browshot.screenshot_info(screenshot['id'])
if (info['status'] == 'finished')
    thumbnail = client.screenshot_thumbnail(screenshot['id'], { 'width' => 480 })
end
[..]

screenshot = client.screenshot_create('http://www.google.de/', { 'cache' => 0, 'delay' => 10 });

Simple API

#!/usr/bin/env ruby

require 'browshot'

client = Browshot.new('my_key')

data = client.simple_file('/tmp/myfile.png', {'url' => 'http://mobilito.net/', 'instance_id' => 12})
if (data[:code].to_i == 200)
    puts "Screenshot finished"
end
Try it for free

close

sign up for free account

Already have an account?

no credit card required

About Us

Browshot is a web service to create real time web screenshots in a multitude of virtual devices, including mobile devices like the iPhone 3 & 4, iPad, Android Nexus, etc.

You can use the web dashboard, or our full-featured API.

  • Real time screenshots

  • 15+ mobile devices: iPhone, iPad, Android, etc.

  • 30+ desktop resolutions

  • Fast and reliable

  • Thumbnails of any size, any ratio

  • Full API, open-source libraries

Share