vzaar_api 2.0.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +2 -0
  3. data/README.md +2 -2
  4. data/lib/vzaar_api/abstract.rb +1 -1
  5. data/lib/vzaar_api/lib/active_object.rb +9 -4
  6. data/lib/vzaar_api/lib/api.rb +2 -1
  7. data/lib/vzaar_api/lib/has_resource_url.rb +7 -4
  8. data/lib/vzaar_api/lib/paged_resource.rb +7 -2
  9. data/lib/vzaar_api/lib/will_paginate.rb +5 -1
  10. data/lib/vzaar_api/playlist.rb +1 -1
  11. data/lib/vzaar_api/signature/abstract.rb +17 -4
  12. data/lib/vzaar_api/signature/multipart.rb +1 -1
  13. data/lib/vzaar_api/signature/single.rb +1 -1
  14. data/lib/vzaar_api/strategy/image/abstract.rb +25 -0
  15. data/lib/vzaar_api/strategy/image/create.rb +21 -0
  16. data/lib/vzaar_api/strategy/image/update.rb +11 -0
  17. data/lib/vzaar_api/strategy/subtitle/create.rb +36 -0
  18. data/lib/vzaar_api/upload/s3.rb +2 -4
  19. data/lib/vzaar_api/version.rb +1 -1
  20. data/lib/vzaar_api/video/subtitle.rb +38 -0
  21. data/lib/vzaar_api/video.rb +8 -1
  22. data/lib/vzaar_api.rb +5 -0
  23. data/spec/fixtures/vcr_cassettes/signature/multipart_201.yml +20 -20
  24. data/spec/fixtures/vcr_cassettes/signature/multipart_422.yml +12 -12
  25. data/spec/fixtures/vcr_cassettes/signature/single_201.yml +20 -20
  26. data/spec/fixtures/vcr_cassettes/signature/single_422.yml +11 -11
  27. data/spec/fixtures/vcr_cassettes/subtitles/create_201.yml +58 -0
  28. data/spec/fixtures/vcr_cassettes/subtitles/create_422.yml +48 -0
  29. data/spec/fixtures/vcr_cassettes/subtitles/create_from_file_201.yml +63 -0
  30. data/spec/fixtures/vcr_cassettes/subtitles/delete_204.yml +52 -0
  31. data/spec/fixtures/vcr_cassettes/subtitles/paginate.yml +58 -0
  32. data/spec/fixtures/vcr_cassettes/subtitles/paginate_first.yml +58 -0
  33. data/spec/fixtures/vcr_cassettes/subtitles/paginate_last.yml +113 -0
  34. data/spec/fixtures/vcr_cassettes/subtitles/paginate_next.yml +113 -0
  35. data/spec/fixtures/vcr_cassettes/subtitles/update_200.yml +113 -0
  36. data/spec/fixtures/vcr_cassettes/subtitles/update_422.yml +104 -0
  37. data/spec/fixtures/vcr_cassettes/upload/multipart_201.yml +162 -144
  38. data/spec/fixtures/vcr_cassettes/upload/multipart_403.yml +12 -116545
  39. data/spec/fixtures/vcr_cassettes/upload/single_201.yml +12 -23353
  40. data/spec/fixtures/vcr_cassettes/upload/single_403.yml +12 -23341
  41. data/spec/fixtures/vcr_cassettes/videos/create/link_201.yml +24 -22
  42. data/spec/fixtures/vcr_cassettes/videos/create/path_201.yml +55 -23394
  43. data/spec/fixtures/vcr_cassettes/videos/image_frame_202.yml +61 -0
  44. data/spec/fixtures/vcr_cassettes/videos/image_frame_422.yml +48 -0
  45. data/spec/fixtures/vcr_cassettes/videos/image_upload_frame_202.yml +62 -0
  46. data/spec/fixtures/vcr_cassettes/videos/image_upload_frame_422.yml +49 -0
  47. data/spec/support/files/drex.jpg +0 -0
  48. data/spec/support/files/fr.vtt +4 -0
  49. data/spec/support/helpers.rb +2 -3
  50. data/spec/support/shared_examples.rb +23 -0
  51. data/spec/vzaar_api/signature/multipart_spec.rb +34 -21
  52. data/spec/vzaar_api/signature/single_spec.rb +27 -16
  53. data/spec/vzaar_api/subtitle_spec.rb +206 -0
  54. data/spec/vzaar_api/upload/s3_spec.rb +40 -37
  55. data/spec/vzaar_api/video_spec.rb +55 -2
  56. metadata +45 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: a66c41aa22b7ac34c00d55f887bd51e67f477326
4
- data.tar.gz: aabba334cffe595e17690a893a0eabc8a5a0dc3f
2
+ SHA256:
3
+ metadata.gz: 8b2a8bb6c3c1e32cf3a7fecd0d5323fc1fba1972a774b6502aadd1c00352aeb0
4
+ data.tar.gz: f34001576b71d42580328f96d3c0623df78ad150b9ab3cd98f5d7d63030dd892
5
5
  SHA512:
6
- metadata.gz: 8d39461adbe0756c34809fb76ca493fb1686d74ab3f4910c2cbfdb1340fc38255b5647f4d91c1cb10cdcd956e82146003f307659ec59ca7c4df97b1ad5d09c15
7
- data.tar.gz: 4159a4a63fa90ef7f28306bd045fe6dda90828ee137bc2eaa7265cb158dc0e33870d5dc3b5245d273f2378dc39076a148f1732b28966945be56ec8fb37e4af71
6
+ metadata.gz: 482edfd45da157a5aec9acc3a8d1b71cc40c825ee1a5417198c29d9ce8a0b40cd0051dea5d257307046794fb774b7ce8b3b60d72dc98b6dcbba04b31b52f2f62
7
+ data.tar.gz: 6b7293a4df35e0850ea3237fc79136887d69a8301b22975ff0f41ce9384bf66944285f6500a637774db98ee4ef500e137b074e57987e02ca04c5cfa73ce2bc5f
data/.gitignore CHANGED
@@ -11,3 +11,5 @@ test*.rb
11
11
  .ruby-gemset
12
12
  .ruby-version
13
13
  tags
14
+ .#*
15
+ *mp4
data/README.md CHANGED
@@ -15,7 +15,7 @@ Ruby 2.2+
15
15
  ## Installation
16
16
 
17
17
  ```
18
- gem install vzaar --version
18
+ gem install vzaar_api
19
19
  ```
20
20
 
21
21
 
@@ -39,7 +39,7 @@ VzaarApi.auth_token = '<your-auth-token>'
39
39
  VzaarApi.client_id = '<your-client-id>'
40
40
  ```
41
41
 
42
- Usage instructions and examples are available on [vzaar's documentation site](https://vzaar.readme.io).
42
+ Usage instructions and examples are available on [vzaar's documentation site](https://developer.vzaar.com).
43
43
 
44
44
 
45
45
  ## Contributing
@@ -1,9 +1,9 @@
1
1
  module VzaarApi
2
2
  class Abstract
3
+ attr_reader :scope_id
3
4
 
4
5
  def initialize(attrs = {}); end
5
6
 
6
7
  def update_from_attributes(attrs); end
7
-
8
8
  end
9
9
  end
@@ -22,8 +22,9 @@ module VzaarApi
22
22
 
23
23
  module ClassMethods
24
24
  def create(attrs)
25
- response = Lib::Api.new.post(resource_url, attrs)
26
- new response.data
25
+ scope_id = attrs.delete :scope_id
26
+ response = Lib::Api.new.post(resource_url(nil, scope_id), attrs)
27
+ new response.data.merge(scope_id: scope_id)
27
28
  end
28
29
  end
29
30
  end
@@ -36,7 +37,11 @@ module VzaarApi
36
37
  module InstanceMethods
37
38
  def save
38
39
  if changed?
39
- response = Lib::Api.new.patch(resource_url(id), changed_attributes)
40
+ response = Lib::Api.new.patch(
41
+ resource_url(id, scope_id),
42
+ changed_attributes
43
+ )
44
+
40
45
  update_from_attributes response.data
41
46
  saved!
42
47
  end
@@ -81,7 +86,7 @@ module VzaarApi
81
86
 
82
87
  module InstanceMethods
83
88
  def delete
84
- Lib::Api.new.delete(resource_url(id))
89
+ Lib::Api.new.delete(resource_url(id, scope_id))
85
90
  true
86
91
  end
87
92
  end
@@ -23,7 +23,8 @@ module VzaarApi
23
23
  end
24
24
 
25
25
  def post(url, body = {})
26
- handle_response http_client.post(url, body.to_json, headers)
26
+ args = block_given? ? yield(body, headers) : [body.to_json, headers]
27
+ handle_response http_client.post url, *args
27
28
  end
28
29
 
29
30
  def handle_response(response)
@@ -8,14 +8,17 @@ module VzaarApi
8
8
  end
9
9
 
10
10
  module InstanceMethods
11
- def resource_url(path = nil)
12
- self.class.resource_url(path)
11
+ def resource_url(path = nil, scope_id = nil)
12
+ self.class.resource_url(path, scope_id)
13
13
  end
14
14
  end
15
15
 
16
16
  module ClassMethods
17
- def resource_url(path = nil)
18
- Api.resource_url self::ENDPOINT, path
17
+ def resource_url(path=nil, scope_id=nil)
18
+ ep = self::ENDPOINT
19
+ args = ep.is_a?(Proc) ? [ep.call(scope_id, path), nil] : [ep, path]
20
+
21
+ Api.resource_url *args
19
22
  end
20
23
  end
21
24
 
@@ -2,12 +2,14 @@ module VzaarApi
2
2
  module Lib
3
3
  class PagedResource
4
4
 
5
- attr_reader :query, :meta, :collection, :resource_class, :resource_url
5
+ attr_reader :query, :meta, :collection, :resource_class, :resource_url,
6
+ :scope_id
6
7
 
7
8
  def initialize(query = {})
8
9
  @query = query.dup
9
10
  @resource_class = @query.delete(:resource_class)
10
11
  @resource_url = @query.delete(:resource_url)
12
+ @scope_id = @query.delete(:scope_id)
11
13
  @loaded = false
12
14
  end
13
15
 
@@ -72,7 +74,10 @@ module VzaarApi
72
74
  end
73
75
 
74
76
  def build_collection(items)
75
- items.map { |attrs| resource_class.new attrs }
77
+ items.map do |attrs|
78
+ attrs = scope_id ? attrs.merge(scope_id: scope_id) : attrs
79
+ resource_class.new attrs
80
+ end
76
81
  end
77
82
 
78
83
  end
@@ -12,7 +12,11 @@ module VzaarApi
12
12
  end
13
13
 
14
14
  def paginate(query = {})
15
- args = query.merge({ resource_url: resource_url, resource_class: self })
15
+ args = query.merge(
16
+ resource_url: resource_url(nil, query[:scope_id]),
17
+ resource_class: self
18
+ )
19
+
16
20
  Lib::PagedResource.new(args)
17
21
  end
18
22
  end
@@ -10,7 +10,7 @@ module VzaarApi
10
10
 
11
11
  ATTR_ACCESSORS = %i(
12
12
  category_id title sort_by sort_order private dimensions max_vids
13
- position autoplay continuous_play max_vids
13
+ position autoplay continuous_play max_vids video_ids
14
14
  ).freeze
15
15
 
16
16
  prepend Lib::HasAttributes
@@ -5,20 +5,27 @@ module VzaarApi
5
5
  include Lib::HasResourceUrl
6
6
 
7
7
  attr_reader :access_key_id, :acl, :bucket, :content_type,
8
- :guid, :key, :policy, :signature, :success_action_status,
9
- :upload_hostname
8
+ :guid, :key, :policy, :success_action_status,
9
+ :upload_hostname, :x_amz_headers
10
+
11
+ X_AMZ_HEADERS = [
12
+ "x-amz-credential",
13
+ "x-amz-algorithm",
14
+ "x-amz-date",
15
+ "x-amz-signature"
16
+ ]
17
+
10
18
 
11
19
  def initialize(attrs = {})
12
20
  @access_key_id = attrs[:access_key_id]
13
21
  @acl = attrs[:acl]
14
22
  @bucket = attrs[:bucket]
15
- @content_type = attrs[:content_type]
16
23
  @guid = attrs[:guid]
17
24
  @key = attrs[:key]
18
25
  @policy = attrs[:policy]
19
- @signature = attrs[:signature]
20
26
  @success_action_status = attrs[:success_action_status]
21
27
  @upload_hostname = attrs[:upload_hostname]
28
+ @x_amz_headers = build_x_amz_headers(attrs)
22
29
  after_initialize(attrs)
23
30
  end
24
31
 
@@ -35,6 +42,12 @@ module VzaarApi
35
42
  new Lib::Api.new.post(resource_url, attrs).data
36
43
  end
37
44
 
45
+ def build_x_amz_headers(attrs)
46
+ X_AMZ_HEADERS.reduce({}) do |col, key|
47
+ col[key] = attrs[key.to_sym]
48
+ col
49
+ end
50
+ end
38
51
  end
39
52
  end
40
53
  end
@@ -4,7 +4,7 @@ module VzaarApi
4
4
 
5
5
  include Lib::HasResourceUrl
6
6
 
7
- ENDPOINT = 'signature/multipart'
7
+ ENDPOINT = 'signature/multipart/2'
8
8
 
9
9
  attr_reader :upload_hostname, :part_size, :part_size_in_bytes, :parts
10
10
 
@@ -2,7 +2,7 @@ module VzaarApi
2
2
  module Signature
3
3
  class Single < Abstract
4
4
 
5
- ENDPOINT = 'signature/single'
5
+ ENDPOINT = 'signature/single/2'
6
6
 
7
7
  def after_initialize(attrs = {})
8
8
  # no-op in this class
@@ -0,0 +1,25 @@
1
+ module VzaarApi
2
+ module Strategy
3
+ module Image
4
+ class Abstract
5
+
6
+ attr_reader :video_id, :attrs, :video_class
7
+
8
+ def initialize(video_id, attrs, video_class)
9
+ @attrs = attrs
10
+ @video_id = video_id
11
+ @video_class = video_class
12
+ end
13
+
14
+ def execute
15
+ raise 'not implemented'
16
+ end
17
+
18
+ def url
19
+ path = File.join(video_class::ENDPOINT, video_id.to_s, "image")
20
+ Lib::Api.resource_url path
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,21 @@
1
+ module VzaarApi
2
+ module Strategy
3
+ module Image
4
+ class Create < Abstract
5
+ def execute
6
+ path = attrs[:path]
7
+ raise Error.new('Invalid parameters: path is missing') unless path
8
+
9
+ File.open(path, "r") do |file|
10
+ res = Lib::Api.new.post(url, image: file) do |body, headers|
11
+ headers.delete('Content-Type')
12
+ [body, headers]
13
+ end
14
+
15
+ video_class.new res.data
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,11 @@
1
+ module VzaarApi
2
+ module Strategy
3
+ module Image
4
+ class Update < Abstract
5
+ def execute
6
+ video_class.new Lib::Api.new.patch(url, attrs).data
7
+ end
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,36 @@
1
+ module VzaarApi
2
+ module Strategy
3
+ module Subtitle
4
+ class Create
5
+ attr_reader :video_id, :attrs, :klass
6
+
7
+ def initialize(video_id, attrs, klass)
8
+ @attrs = attrs
9
+ @video_id = video_id
10
+ @klass = klass
11
+ end
12
+
13
+ def execute
14
+ res = attrs[:file] ? create_from_file : Lib::Api.new.post(url, attrs)
15
+ klass.new res.data.merge(scope_id: video_id)
16
+ end
17
+
18
+ private
19
+
20
+ def create_from_file
21
+ File.open(attrs[:file], "r") do |file|
22
+ Lib::Api.new.post(url, attrs.merge(file: file)) do |body, headers|
23
+ headers.delete('Content-Type')
24
+ [body, headers]
25
+ end
26
+ end
27
+ end
28
+
29
+ def url
30
+ path = VzaarApi::Video::Subtitle::ENDPOINT.call(video_id, nil)
31
+ Lib::Api.resource_url path
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
@@ -9,7 +9,7 @@ module VzaarApi
9
9
 
10
10
  def_delegators :@signature, :access_key_id, :acl, :bucket,
11
11
  :guid, :key, :multipart?, :part_size_in_bytes, :policy,
12
- :success_action_status, :upload_hostname
12
+ :success_action_status, :upload_hostname, :x_amz_headers
13
13
 
14
14
  def initialize(attrs, signature)
15
15
  @attrs = attrs.dup
@@ -64,10 +64,8 @@ module VzaarApi
64
64
  'bucket' => bucket,
65
65
  'success_action_status' => success_action_status,
66
66
  'policy' => policy,
67
- 'AWSAccessKeyId' => access_key_id,
68
- 'signature' => signature.signature,
69
67
  'x-amz-meta-uploader' => UPLOADER
70
- }
68
+ }.merge! x_amz_headers
71
69
  end
72
70
 
73
71
  def http_client
@@ -1,4 +1,4 @@
1
1
  module VzaarApi
2
- VERSION = '2.0.0'
2
+ VERSION = '2.0.1'
3
3
  UPLOADER = 'Ruby-2.0.0'
4
4
  end
@@ -0,0 +1,38 @@
1
+ module VzaarApi
2
+ class Video
3
+ class Subtitle < Abstract
4
+ ENDPOINT = Proc.new do |video_id, subtitle_id|
5
+ File.join 'videos', video_id.to_s, 'subtitles', subtitle_id.to_s
6
+ end
7
+
8
+ ATTR_READERS = [:id,
9
+ :code,
10
+ :title,
11
+ :language,
12
+ :created_at,
13
+ :updated_at
14
+ ].freeze
15
+
16
+ ATTR_ACCESSORS = [:code].freeze
17
+
18
+ prepend Lib::HasAttributes
19
+ include Lib::HasResourceUrl
20
+ include Lib::ActiveObject::Create
21
+ include Lib::ActiveObject::Save
22
+ include Lib::ActiveObject::Delete
23
+ include Lib::WillPaginate
24
+
25
+ def initialize(attrs = {})
26
+ @scope_id = attrs.delete(:scope_id)
27
+ end
28
+
29
+ def self.paginate(video_id, query = {})
30
+ super query.merge(scope_id: video_id)
31
+ end
32
+
33
+ def self.create(video_id, attrs = {})
34
+ VzaarApi::Strategy::Subtitle::Create.new(video_id, attrs, self).execute
35
+ end
36
+ end
37
+ end
38
+ end
@@ -1,6 +1,5 @@
1
1
  module VzaarApi
2
2
  class Video < Abstract
3
-
4
3
  ENDPOINT = 'videos'
5
4
 
6
5
  ATTR_READERS = [:id, :user_id, :account_id, :categories,
@@ -25,6 +24,14 @@ module VzaarApi
25
24
  Strategy::Video::Create.new(attrs, self).execute
26
25
  end
27
26
 
27
+ def self.set_image_frame(video_id, attrs = {})
28
+ Strategy::Image::Update.new(video_id, attrs, self).execute
29
+ end
30
+
31
+ def self.upload_image_frame(video_id, attrs = {})
32
+ Strategy::Image::Create.new(video_id, attrs, self).execute
33
+ end
34
+
28
35
  private
29
36
 
30
37
  def update_from_attributes(attrs)
data/lib/vzaar_api.rb CHANGED
@@ -23,8 +23,13 @@ require 'vzaar_api/legacy_rendition'
23
23
  require 'vzaar_api/link_upload'
24
24
  require 'vzaar_api/playlist'
25
25
  require 'vzaar_api/rendition'
26
+ require 'vzaar_api/strategy/image/abstract'
27
+ require 'vzaar_api/strategy/image/update'
28
+ require 'vzaar_api/strategy/image/create'
29
+ require 'vzaar_api/strategy/subtitle/create'
26
30
  require 'vzaar_api/strategy/video/create'
27
31
  require 'vzaar_api/video'
32
+ require 'vzaar_api/video/subtitle'
28
33
 
29
34
  require 'vzaar_api/signature/abstract'
30
35
  require 'vzaar_api/signature/factory'
@@ -2,21 +2,21 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://app.vzaar.localhost/api/v2/signature/multipart
5
+ uri: https://app.vzaar.localhost/api/v2/signature/multipart/2
6
6
  body:
7
7
  encoding: UTF-8
8
- string: '{"filename":"video.mp4","filesize":25165824,"uploader":"Ruby-2.0.0-alpha"}'
8
+ string: '{"filename":"video.mp4","filesize":25165824,"uploader":"Ruby-2.0.0"}'
9
9
  headers:
10
10
  User-Agent:
11
- - HTTPClient/1.0 (2.8.2.4, ruby 2.3.1 (2016-04-26))
11
+ - HTTPClient/1.0 (2.8.3, ruby 2.3.0 (2015-12-25))
12
12
  Accept:
13
13
  - "*/*"
14
14
  Date:
15
- - Thu, 03 Nov 2016 17:12:08 GMT
15
+ - Wed, 28 Nov 2018 11:12:15 GMT
16
16
  X-Auth-Token:
17
- - TUGXzNL17ypaougMYpR3
17
+ - pVrjGuKWP27U_kz4anfy
18
18
  X-Client-Id:
19
- - lair-tend72
19
+ - glide-franca-raise
20
20
  Content-Type:
21
21
  - application/json
22
22
  response:
@@ -25,38 +25,38 @@ http_interactions:
25
25
  message: Created
26
26
  headers:
27
27
  Server:
28
- - nginx/1.10.1
28
+ - nginx
29
29
  Date:
30
- - Thu, 03 Nov 2016 17:12:10 GMT
30
+ - Wed, 28 Nov 2018 11:12:16 GMT
31
31
  Content-Type:
32
32
  - application/json
33
33
  Content-Length:
34
- - '1018'
34
+ - '1066'
35
35
  Connection:
36
36
  - keep-alive
37
- X-RateLimit-Limit:
37
+ X-Ratelimit-Limit:
38
38
  - '200'
39
- X-RateLimit-Remaining:
39
+ X-Ratelimit-Remaining:
40
40
  - '199'
41
- X-RateLimit-Reset:
42
- - '1478193188'
43
- X-RateLimit-Reset-In:
44
- - 60 seconds
41
+ X-Ratelimit-Reset:
42
+ - '1543403580'
43
+ X-Ratelimit-Reset-In:
44
+ - 45 seconds
45
45
  Cache-Control:
46
46
  - no-store, must-revalidate, private, max-age=0
47
47
  X-Request-Id:
48
- - a63fc572-b759-4a88-a6e3-6a2311612cb1
48
+ - 80747688-ff96-489e-849a-3e77424192cb
49
49
  X-Runtime:
50
- - '1.670516'
50
+ - '0.956148'
51
51
  Set-Cookie:
52
52
  - __profilin=p%3Dt; path=/
53
53
  - __profilin=p%3Dt; path=/
54
54
  - __profilin=p%3Dt; path=/
55
55
  X-Miniprofiler-Ids:
56
- - '["1yxtukjg4moaigyh1xsu","4cgrjuu9znv5flechaye","xnttqh4f6tb6mlow6fqp","51m8dv0qththvbewgq13","x64kuijqm7wvs2v4hn7w","huk6yekaaonvewr8gorm","vbeuauig2dkult7iwd88","20346z4sk0xdmgjxe013","ojqf7ud6fx3fp4ugy5qy","a3g9j8ng0wd0z95f8byp"]'
56
+ - '["wzqk5h1llxroowv76or","x6d0sryoaznh4tbj83i2","8fwa4v4jf9bmwd6vvqr","wng1g0lxjpf0d1m0xiff","t9k7dkc5tnuowk9auwey","smpx96fbyoyotkt4xebh","xr2g8orikxxkzhefaeec","osnz4pgxt5ivkz457xt7","lemn2tp0lc9pfn64elxq","pt82m4whmu8qyhjv5fia"]'
57
57
  body:
58
58
  encoding: UTF-8
59
- string: '{"data":{"access_key_id":"access_key_id","key":"vzaar/t8d/ec9/source/t8dec9434bcc64622b68d1dc16f3ddffap/${filename}","acl":"private","policy":"policy","signature":"signature","success_action_status":"201","content_type":"binary/octet-stream","guid":"guid","bucket":"vzaar-upload-development","upload_hostname":"https://vzaar-upload-development.s3.amazonaws.com","part_size":"5MB","part_size_in_bytes":5242880,"parts":5}}'
59
+ string: '{"data":{"x-amz-credential":"credential","x-amz-algorithm":"AWS4-HMAC-SHA256","x-amz-date":"date","x-amz-signature":"signature","key":"vzaar/tjY/fV-/source/tjYfV-j3o754/${filename}","acl":"private","policy":"policy","success_action_status":"201","guid":"tjYfV-j3o754","bucket":"vzaar-upload-development","upload_hostname":"https://vzaar-upload-development.s3.amazonaws.com","part_size":"5MB","part_size_in_bytes":5242880,"parts":5}}'
60
60
  http_version:
61
- recorded_at: Thu, 03 Nov 2016 17:12:10 GMT
61
+ recorded_at: Wed, 28 Nov 2018 11:12:16 GMT
62
62
  recorded_with: VCR 3.0.3
@@ -2,21 +2,21 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://app.vzaar.localhost/api/v2/signature/multipart
5
+ uri: https://app.vzaar.localhost/api/v2/signature/multipart/2
6
6
  body:
7
7
  encoding: UTF-8
8
- string: '{"filename":"video.mp4","filesize":null,"uploader":"Ruby-2.0.0-alpha"}'
8
+ string: '{"filename":"video.mp4","filesize":null,"uploader":"Ruby-2.0.0"}'
9
9
  headers:
10
10
  User-Agent:
11
- - HTTPClient/1.0 (2.8.2.4, ruby 2.3.1 (2016-04-26))
11
+ - HTTPClient/1.0 (2.8.3, ruby 2.3.0 (2015-12-25))
12
12
  Accept:
13
13
  - "*/*"
14
14
  Date:
15
- - Thu, 03 Nov 2016 17:25:50 GMT
15
+ - Wed, 28 Nov 2018 11:12:16 GMT
16
16
  X-Auth-Token:
17
- - TUGXzNL17ypaougMYpR3
17
+ - pVrjGuKWP27U_kz4anfy
18
18
  X-Client-Id:
19
- - lair-tend72
19
+ - glide-franca-raise
20
20
  Content-Type:
21
21
  - application/json
22
22
  response:
@@ -25,9 +25,9 @@ http_interactions:
25
25
  message: Unprocessable Entity
26
26
  headers:
27
27
  Server:
28
- - nginx/1.10.1
28
+ - nginx
29
29
  Date:
30
- - Thu, 03 Nov 2016 17:25:50 GMT
30
+ - Wed, 28 Nov 2018 11:12:16 GMT
31
31
  Content-Type:
32
32
  - application/json
33
33
  Content-Length:
@@ -37,9 +37,9 @@ http_interactions:
37
37
  Cache-Control:
38
38
  - no-cache
39
39
  X-Request-Id:
40
- - bfb53109-118e-47b8-9afd-abee3e4305f4
40
+ - a04de2f9-a812-4df0-97e6-f7ee36b336e1
41
41
  X-Runtime:
42
- - '0.050045'
42
+ - '0.077673'
43
43
  Set-Cookie:
44
44
  - __profilin=p%3Dt; path=/
45
45
  - __profilin=p%3Dt; path=/
@@ -47,6 +47,6 @@ http_interactions:
47
47
  encoding: UTF-8
48
48
  string: '{"errors":[{"message":"Invalid parameters","detail":"Filesize must
49
49
  be between 5MB and 5TB"}]}'
50
- http_version:
51
- recorded_at: Thu, 03 Nov 2016 17:25:50 GMT
50
+ http_version:
51
+ recorded_at: Wed, 28 Nov 2018 11:12:16 GMT
52
52
  recorded_with: VCR 3.0.3