Sha256: 353a4dd2e42828251245af7954d121e359f5327b40e4b4f8be9f65ffbd54760e
Contents?: true
Size: 1.77 KB
Versions: 2
Compression:
Stored size: 1.77 KB
Contents
= Page Glimpse {PageGlimpse.com}[http://www.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. <b>Note:</b> 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 == Contributing To contribute to this library, fork it on {GitHub}[http://www.github.com/nbibler/page_glimpse] and follow the {contribution guide}[https://rails.lighthouseapp.com/projects/8994/sending-patches] provided for the Ruby on Rails project. == Copyright PageGlimpse.com is owned and operated by {RADSense Software}[http://www.radsense.com/], Copyright (c) 2006 - 2009. Any and all questions about the Page Glimpse service should be directed toward <tt>support [at] PageGlimpse.com</tt>. Copyright (c) 2009 {Nathaniel E. Bibler}[http://www.nathanielbibler.com]. Released under the MIT License. See the LICENSE file for more details.
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
nbibler-page_glimpse-0.0.2 | README.rdoc |
page_glimpse-0.0.2 | README.rdoc |