Repository is archived
No commit activity in last 3 years
No release in over 3 years
A Ruby library for the PageGlimpse.com service
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.2.2
~> 0.9.5

Runtime

~> 1.1.6
~> 0.1.1
 Project Readme

Page Glimpse¶ ↑

PageGlimpse.com is a SaaS provider which has a REST API for downloading website thumbnails by URI. This library wraps that interface to provide a Ruby-like means of interacting with it.

Note: The author of this gem is entirely unaffiliated with the PageGlimpse.com web service.

Getting Started¶ ↑

The following example shows how to use the PageGlimpse API:

gem 'page_glimpse'
require 'page_glimpse'

PageGlimpse.developer_key = 'abc123def456ghi789jkl123mno456pq'

if PageGlimpse.exist?('http://www.github.com')
  image = PageGlimpse.get('http://www.github.com')
  puts "Image type:     #{image.content_type}"    # => "image/jpeg"
  puts "Image size:     #{image.content_length}"  # => 2572
  puts "Image filename: #{image.filename}"        # => nil or a name

  # Save the transmitted binary (image.content) as a local file
  File.open('github.jpg', File::CREAT|File::WRONLY|File::TRUNC) do |file|
    file.write image.content
  end
else
  PageGlimpse.queue('http://www.github.com')
  # and then try back later ...
end

Problems?¶ ↑

If you’re having troubles with or questions about the Page Glimpse web service, please email them to support [at] PageGlimpse.com.

If you’re having issues with this Ruby library, specifically, please open a (or update an existing!) ticket on Lighthouse.

Contributing¶ ↑

To contribute to this library, fork it on GitHub and follow the contribution guide provided for the Ruby on Rails project.

PageGlimpse.com is owned and operated by RADSense Software, Copyright © 2006 - 2009. Any and all questions about the Page Glimpse service should be directed toward support [at] PageGlimpse.com.

Copyright © 2009 Nathaniel E. Bibler.

Released under the MIT License. See the LICENSE file for more details.