grimen-page_glimpse 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.textile +12 -6
- metadata +1 -1
data/README.textile
CHANGED
@@ -24,28 +24,34 @@ You'll need a API key, which you can get for *free* here:
|
|
24
24
|
|
25
25
|
h2. Usage/Examples
|
26
26
|
|
27
|
-
|
27
|
+
Initialize:
|
28
28
|
|
29
29
|
<pre>snapper = PageGlimse.new('ec0ccd....26df') # => nil</pre>
|
30
30
|
|
31
|
-
|
31
|
+
Tell PageGlimpse to generate a webpage thumbnail:
|
32
32
|
|
33
33
|
<pre>snapper.request!('http://mypage.com') # => true/false</pre>
|
34
34
|
|
35
|
-
|
35
|
+
Check if thumbnail exists for a webpage:
|
36
36
|
|
37
37
|
<pre>snapper.exists?('http://techcrunch.com', :size => :medium) # => true/false</pre>
|
38
38
|
|
39
|
-
|
39
|
+
Get direct URL for a cached webpage thumbnail image:
|
40
|
+
|
41
|
+
<pre>snapper.thumbnail_url('http://techcrunch.com', :size => :large) # => 'http://images.pageglimpse.com/v1/thumbnails?url=http://techcrunch.com&size=large&devkey=ec0ccd....26df'</pre>
|
42
|
+
|
43
|
+
Get thumbnail (PNG image) for a webpage:
|
40
44
|
|
41
45
|
<pre>snapper.thumbnail('http://techcrunch.com', :size => :small) # => [raw PNG data]</pre>
|
42
46
|
|
43
|
-
|
47
|
+
Save thumbnail into a file (PNG image) for a webpage:
|
44
48
|
|
45
49
|
<pre>snapper.save!('http://techcrunch.com', :size => :large) # => true/false</pre>
|
46
50
|
|
47
|
-
|
51
|
+
h2. More?
|
48
52
|
|
49
53
|
Yes, all the PageGlimpse API options are supported but not documented in this README right now. Peep the code and read more about the options: "http://www.pageglimpse.com/features/api":http://www.pageglimpse.com/features/api.
|
50
54
|
|
55
|
+
h2. License
|
56
|
+
|
51
57
|
Copyright (c) Jonas Grimfelt, released under the MIT-license.
|