panda 0.2.0 → 0.2.1

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.
data/README.md CHANGED
@@ -4,90 +4,87 @@ Panda gem provides an interface to access the [Panda](http://api.pandastream.com
4
4
 
5
5
  ## Installation
6
6
 
7
- sudo gem install panda -s http://gemcutter.org
7
+ sudo gem install panda -s http://gemcutter.org
8
8
 
9
9
  ## How to use it
10
10
 
11
-
12
- require 'panda'
13
-
11
+ require 'panda'
14
12
 
15
13
  ### Connecting to Panda
16
14
 
17
- Panda.connect!({
18
- :cloud_id => 'cloud_id',
19
- :access_key => 'access_key',
20
- :secret_key => 'secret_key',
21
- :api_host => 'api.pandastream.com'
22
- })
15
+ Panda.connect!({
16
+ :cloud_id => 'cloud_id',
17
+ :access_key => 'access_key',
18
+ :secret_key => 'secret_key',
19
+ :api_host => 'api.pandastream.com'
20
+ })
23
21
 
24
22
  ### Posting a video
25
-
26
- Panda.post('/videos.json', {:source_url => 'http://www.example.com/original_video.mp4'})
27
- =>{"duration"=>nil,
28
- "created_at"=>"2010/01/15 14:48:42 +0000",
29
- "original_filename"=>"panda.mp4",
30
- "updated_at"=>"2010/01/15 14:48:42 +0000",
31
- "source_url"=>"http://www.example.com/original_video.mp4",
32
- "id"=>"12fce296-01e5-11df-ae37-12313902cc92",
33
- "extname"=>".mp4",
34
- "thumbnail_position"=>nil,
35
- "audio_codec"=>nil,
36
- "height"=>nil,
37
- "upload_redirect_url"=>nil,
38
- "fps"=>nil,
39
- "video_codec"=>nil,
40
- "status"=>"processing",
41
- "width"=>nil}
42
-
23
+
24
+ Panda.post('/videos.json', {:source_url => 'http://www.example.com/original_video.mp4'})
25
+ =>{"duration"=>nil,
26
+ "created_at"=>"2010/01/15 14:48:42 +0000",
27
+ "original_filename"=>"panda.mp4",
28
+ "updated_at"=>"2010/01/15 14:48:42 +0000",
29
+ "source_url"=>"http://www.example.com/original_video.mp4",
30
+ "id"=>"12fce296-01e5-11df-ae37-12313902cc92",
31
+ "extname"=>".mp4",
32
+ "thumbnail_position"=>nil,
33
+ "audio_codec"=>nil,
34
+ "height"=>nil,
35
+ "upload_redirect_url"=>nil,
36
+ "fps"=>nil,
37
+ "video_codec"=>nil,
38
+ "status"=>"processing",
39
+ "width"=>nil}
40
+
43
41
  ### Getting all videos
44
42
 
45
- Panda.get('/videos.json')
46
- => [{"duration"=>14010,
47
- "created_at"=>"2010/01/13 16:45:29 +0000",
48
- "original_filename"=>"panda.mp4",
49
- "updated_at"=>"2010/01/13 16:45:35 +0000",
50
- "source_url"=>"http://www.example.com/original_video.mp4",
51
- "id"=>"0ee6b656-0063-11df-a433-1231390041c1",
52
- "extname"=>".mp4",
53
- "thumbnail_position"=>nil,
54
- "audio_codec"=>"aac",
55
- "height"=>240,
56
- "upload_redirect_url"=>nil,
57
- "fps"=>29,
58
- "video_codec"=>"h264",
59
- "status"=>"success",
60
- "width"=>300}]
61
-
62
- ### Getting video encodings
63
-
64
- Panda.get('/videos/0ee6b656-0063-11df-a433-1231390041c1/encodings.json')
65
- => [{"encoder_id"=>nil,
66
- "created_at"=>"2010/01/13 16:45:30 +0000",
67
- "video_id"=>"0ee6b656-0063-11df-a433-1231390041c1",
68
- "video_url"=>
69
- "http://s3.amazonaws.com/panda-videos/0f815986-0063-11df-a433-1231390041c1.flv",
70
- "started_encoding_at"=>"2010/01/13 16:47:35 +0000",
71
- "updated_at"=>"2010/01/13 16:47:40 +0000",
72
- "lock_version"=>7,
73
- "extname"=>".flv",
74
- "encoding_progress"=>87,
75
- "encoding_time"=>3,
76
- "id"=>"0f815986-0063-11df-a433-1231390041c1",
77
- "height"=>240,
78
- "status"=>"success",
79
- "profile_id"=>"00182830-0063-11df-8c8a-1231390041c1",
80
- "width"=>300}]
81
-
43
+ Panda.get('/videos.json')
44
+ => [{"duration"=>14010,
45
+ "created_at"=>"2010/01/13 16:45:29 +0000",
46
+ "original_filename"=>"panda.mp4",
47
+ "updated_at"=>"2010/01/13 16:45:35 +0000",
48
+ "source_url"=>"http://www.example.com/original_video.mp4",
49
+ "id"=>"0ee6b656-0063-11df-a433-1231390041c1",
50
+ "extname"=>".mp4",
51
+ "thumbnail_position"=>nil,
52
+ "audio_codec"=>"aac",
53
+ "height"=>240,
54
+ "upload_redirect_url"=>nil,
55
+ "fps"=>29,
56
+ "video_codec"=>"h264",
57
+ "status"=>"success",
58
+ "width"=>300}]
59
+
60
+ ### Getting video encodings
61
+
62
+ Panda.get('/videos/0ee6b656-0063-11df-a433-1231390041c1/encodings.json')
63
+ => [{"encoder_id"=>nil,
64
+ "created_at"=>"2010/01/13 16:45:30 +0000",
65
+ "video_id"=>"0ee6b656-0063-11df-a433-1231390041c1",
66
+ "video_url"=>
67
+ "http://s3.amazonaws.com/panda-videos/0f815986-0063-11df-a433-1231390041c1.flv",
68
+ "started_encoding_at"=>"2010/01/13 16:47:35 +0000",
69
+ "updated_at"=>"2010/01/13 16:47:40 +0000",
70
+ "lock_version"=>7,
71
+ "extname"=>".flv",
72
+ "encoding_progress"=>87,
73
+ "encoding_time"=>3,
74
+ "id"=>"0f815986-0063-11df-a433-1231390041c1",
75
+ "height"=>240,
76
+ "status"=>"success",
77
+ "profile_id"=>"00182830-0063-11df-8c8a-1231390041c1",
78
+ "width"=>300}]
79
+
82
80
  ### Deleting a video encoding
83
81
 
84
- Panda.delete('/encodings/0f815986-0063-11df-a433-1231390041c1.json')
82
+ Panda.delete('/encodings/0f815986-0063-11df-a433-1231390041c1.json')
85
83
 
86
84
  ### Deleting a video
87
-
88
- Panda.delete('/videos/0ee6b656-0063-11df-a433-1231390041c1.json')
89
-
90
-
85
+
86
+ Panda.delete('/videos/0ee6b656-0063-11df-a433-1231390041c1.json')
87
+
91
88
  Copyright
92
89
  ---------
93
90
 
data/Rakefile CHANGED
@@ -7,7 +7,7 @@ begin
7
7
  gem.name = "panda"
8
8
  gem.summary = %Q{Panda Client}
9
9
  gem.description = %Q{Panda Client}
10
- gem.email = "bambinos@new-bamboo.co.uk"
10
+ gem.email = "info@pandastream.com"
11
11
  gem.homepage = "http://github.com/newbamboo/panda_gem"
12
12
  gem.authors = ["New Bamboo"]
13
13
  gem.add_development_dependency "rspec", ">= 1.2.9"
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.0
1
+ 0.2.1
@@ -1,6 +1,2 @@
1
- require 'rubygems'
2
- require 'hmac'
3
- require 'restclient'
4
-
5
1
  require 'panda/api_authentication'
6
- require 'panda/panda'
2
+ require 'panda/panda'
@@ -1,3 +1,5 @@
1
+ require 'restclient'
2
+
1
3
  module Panda
2
4
  class << self
3
5
 
@@ -40,7 +42,7 @@ module Panda
40
42
  auth_params = {}
41
43
  auth_params['cloud_id'] = @cloud_id
42
44
  auth_params['access_key'] = @access_key
43
- auth_params['timestamp'] = Time.now.iso8601
45
+ auth_params['timestamp'] = Time.now.iso8601(6)
44
46
  auth_params['signature'] = ApiAuthentication.authenticate(verb, request_uri, @api_host, @secret_key, params.merge(auth_params))
45
47
  return auth_params
46
48
  end
@@ -5,13 +5,13 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{panda}
8
- s.version = "0.2.0"
8
+ s.version = "0.2.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["New Bamboo"]
12
- s.date = %q{2010-01-15}
12
+ s.date = %q{2010-01-26}
13
13
  s.description = %q{Panda Client}
14
- s.email = %q{bambinos@new-bamboo.co.uk}
14
+ s.email = %q{info@pandastream.com}
15
15
  s.extra_rdoc_files = [
16
16
  "LICENSE",
17
17
  "README.md"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: panda
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - New Bamboo
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-01-15 00:00:00 +00:00
12
+ date: 2010-01-26 00:00:00 +00:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -63,7 +63,7 @@ dependencies:
63
63
  version: "1.2"
64
64
  version:
65
65
  description: Panda Client
66
- email: bambinos@new-bamboo.co.uk
66
+ email: info@pandastream.com
67
67
  executables: []
68
68
 
69
69
  extensions: []