grabbio 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -32,7 +32,6 @@ module Grabbio
32
32
  hash = sign_request(@api_secret, parameters[1..-1])
33
33
  parameters += "&hash=#{hash}"
34
34
  url = API_URL+API_VERSION+"/videos.json#{parameters}"
35
- p url
36
35
  make_request(url)
37
36
  end
38
37
 
data/lib/grabbio/utils.rb CHANGED
@@ -20,7 +20,6 @@ module Grabbio
20
20
  end
21
21
 
22
22
  def sign_request(secret_key, parameters)
23
- p parameters
24
23
  Base64.encode64(OpenSSL::HMAC.digest(OpenSSL::Digest::Digest.new('sha1'), secret_key,parameters)).chomp.gsub(/\n/,'')
25
24
  end
26
25
 
@@ -1,4 +1,4 @@
1
1
  module Grabbio
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
4
4
 
data/readme.md ADDED
@@ -0,0 +1,98 @@
1
+ grabbio gem
2
+ ==============
3
+ The [grabbio platform](http://grabb.io) is an API that allows you to generate
4
+ thumbnails in a variety of styles.
5
+
6
+ Installation
7
+ ------------
8
+
9
+ gem install grabbio
10
+
11
+ Usage
12
+ -----
13
+
14
+ ###Basic
15
+
16
+ In its most basic form, the only required parameters are source, upload_url and
17
+ your api keys.
18
+
19
+ grabbio = Grabbio.new(YOUR_API_KEY, YOUR_API_SECRET);
20
+ grabbio.grab(SOURCE_URL, UPLOAD_URL)
21
+
22
+ ###Advanced
23
+
24
+ All the parameters in the [grabbio documentation](http://grabb.io/documentation)
25
+ are supported and passed through as a parameters hash. Here are a few examples:
26
+
27
+ ####320x240 Gif, Capsheet and Individual uploaded to an S3 bucket in developer mode
28
+ grabbio = Grabbio.new(YOUR_API_KEY, YOUR_API_SECRET);
29
+ grabbio.grab(SOURCE_URL, UPLOAD_URL, :developer_mode => true,
30
+ :gif_framerate => 30,
31
+ :thumbnail_styles => "individual,gif,capsheet",
32
+ :capsheet_columns => 3,
33
+ :width => 320,
34
+ :height => 240)
35
+
36
+ ####180x240 Capsheet uploaded to FTP with a callback
37
+ grabbio = Grabbio.new(YOUR_API_KEY, YOUR_API_SECRET);
38
+ grabbio.grab(SOURCE_URL, UPLOAD_URL, :thumbnail_styles => "capsheet",
39
+ :width => 180,
40
+ :height => 240,
41
+ :callback_url => CALLBACK_URL)
42
+
43
+ ####Return
44
+ All calls return an object if the request is valid, otherwise a GrabbioError is raised
45
+ with the error message retured from the site.
46
+
47
+ The response object looks like:
48
+ {"video"=>
49
+ {"callback_url"=>nil,
50
+ "cost"=>1,
51
+ "created_at"=>"2011-04-08T12:28:34Z",
52
+ "developer_mode"=>false,
53
+ "external_id"=>nil,
54
+ "filename"=>"CxRcyVX70y",
55
+ "id"=>311,
56
+ "number_of_thumbnails"=>1,
57
+ "scale_mode"=>"pad",
58
+ "source"=>"http://example.com/video.avi",
59
+ "source_type"=>"http",
60
+ "status"=>"pending",
61
+ "thumbnail_format"=>"jpg",
62
+ "thumbnail_types"=>"individual",
63
+ "updated_at"=>"2011-04-08T12:28:34Z",
64
+ "upload_placeholders"=>true,
65
+ "upload_type"=>"s3",
66
+ "requested_thumbnails"=>
67
+ [{
68
+ "thumbnail"=>
69
+ {"created_at"=>"2011-04-08T12:28:36Z",
70
+ "filename"=>"CxRcyVX70y_120x90_0.jpg",
71
+ "height"=>90, "id"=>1165,
72
+ "order"=>0,
73
+ "thumbnail_type"=>"individual",
74
+ "updated_at"=>"2011-04-08T12:28:36Z",
75
+ "video_id"=>311,
76
+ "width"=>120}
77
+ }]
78
+ }
79
+ }
80
+
81
+
82
+
83
+ Example Thumbnails
84
+ ------------------
85
+ ###Individual
86
+ ![Individual Thumbnail](http://grabb.io/images/individual_example_0.jpg)
87
+ ![Individual Thumbnail](http://grabb.io/images/individual_example_1.jpg)
88
+ ![Individual Thumbnail](http://grabb.io/images/individual_example_2.jpg)
89
+ ![Individual Thumbnail](http://grabb.io/images/individual_example_3.jpg)
90
+ ![Individual Thumbnail](http://grabb.io/images/individual_example_4.jpg)
91
+ ![Individual Thumbnail](http://grabb.io/images/individual_example_5.jpg)
92
+
93
+ ###Gif
94
+ ![GIF](http://grabb.io/images/gif_example.gif)
95
+
96
+ ###Capsheet
97
+ ![Capsheet Example](http://grabb.io/images/capsheet_example.jpg)
98
+
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 3
9
- version: 0.0.3
8
+ - 4
9
+ version: 0.0.4
10
10
  platform: ruby
11
11
  authors:
12
12
  - Gazler
@@ -36,6 +36,7 @@ files:
36
36
  - lib/grabbio/client.rb
37
37
  - lib/grabbio/utils.rb
38
38
  - lib/grabbio/version.rb
39
+ - readme.md
39
40
  has_rdoc: true
40
41
  homepage: http://github.com/Gazler/
41
42
  licenses: []