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.
- checksums.yaml +5 -5
- data/.gitignore +2 -0
- data/README.md +2 -2
- data/lib/vzaar_api/abstract.rb +1 -1
- data/lib/vzaar_api/lib/active_object.rb +9 -4
- data/lib/vzaar_api/lib/api.rb +2 -1
- data/lib/vzaar_api/lib/has_resource_url.rb +7 -4
- data/lib/vzaar_api/lib/paged_resource.rb +7 -2
- data/lib/vzaar_api/lib/will_paginate.rb +5 -1
- data/lib/vzaar_api/playlist.rb +1 -1
- data/lib/vzaar_api/signature/abstract.rb +17 -4
- data/lib/vzaar_api/signature/multipart.rb +1 -1
- data/lib/vzaar_api/signature/single.rb +1 -1
- data/lib/vzaar_api/strategy/image/abstract.rb +25 -0
- data/lib/vzaar_api/strategy/image/create.rb +21 -0
- data/lib/vzaar_api/strategy/image/update.rb +11 -0
- data/lib/vzaar_api/strategy/subtitle/create.rb +36 -0
- data/lib/vzaar_api/upload/s3.rb +2 -4
- data/lib/vzaar_api/version.rb +1 -1
- data/lib/vzaar_api/video/subtitle.rb +38 -0
- data/lib/vzaar_api/video.rb +8 -1
- data/lib/vzaar_api.rb +5 -0
- data/spec/fixtures/vcr_cassettes/signature/multipart_201.yml +20 -20
- data/spec/fixtures/vcr_cassettes/signature/multipart_422.yml +12 -12
- data/spec/fixtures/vcr_cassettes/signature/single_201.yml +20 -20
- data/spec/fixtures/vcr_cassettes/signature/single_422.yml +11 -11
- data/spec/fixtures/vcr_cassettes/subtitles/create_201.yml +58 -0
- data/spec/fixtures/vcr_cassettes/subtitles/create_422.yml +48 -0
- data/spec/fixtures/vcr_cassettes/subtitles/create_from_file_201.yml +63 -0
- data/spec/fixtures/vcr_cassettes/subtitles/delete_204.yml +52 -0
- data/spec/fixtures/vcr_cassettes/subtitles/paginate.yml +58 -0
- data/spec/fixtures/vcr_cassettes/subtitles/paginate_first.yml +58 -0
- data/spec/fixtures/vcr_cassettes/subtitles/paginate_last.yml +113 -0
- data/spec/fixtures/vcr_cassettes/subtitles/paginate_next.yml +113 -0
- data/spec/fixtures/vcr_cassettes/subtitles/update_200.yml +113 -0
- data/spec/fixtures/vcr_cassettes/subtitles/update_422.yml +104 -0
- data/spec/fixtures/vcr_cassettes/upload/multipart_201.yml +162 -144
- data/spec/fixtures/vcr_cassettes/upload/multipart_403.yml +12 -116545
- data/spec/fixtures/vcr_cassettes/upload/single_201.yml +12 -23353
- data/spec/fixtures/vcr_cassettes/upload/single_403.yml +12 -23341
- data/spec/fixtures/vcr_cassettes/videos/create/link_201.yml +24 -22
- data/spec/fixtures/vcr_cassettes/videos/create/path_201.yml +55 -23394
- data/spec/fixtures/vcr_cassettes/videos/image_frame_202.yml +61 -0
- data/spec/fixtures/vcr_cassettes/videos/image_frame_422.yml +48 -0
- data/spec/fixtures/vcr_cassettes/videos/image_upload_frame_202.yml +62 -0
- data/spec/fixtures/vcr_cassettes/videos/image_upload_frame_422.yml +49 -0
- data/spec/support/files/drex.jpg +0 -0
- data/spec/support/files/fr.vtt +4 -0
- data/spec/support/helpers.rb +2 -3
- data/spec/support/shared_examples.rb +23 -0
- data/spec/vzaar_api/signature/multipart_spec.rb +34 -21
- data/spec/vzaar_api/signature/single_spec.rb +27 -16
- data/spec/vzaar_api/subtitle_spec.rb +206 -0
- data/spec/vzaar_api/upload/s3_spec.rb +40 -37
- data/spec/vzaar_api/video_spec.rb +55 -2
- metadata +45 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 8b2a8bb6c3c1e32cf3a7fecd0d5323fc1fba1972a774b6502aadd1c00352aeb0
|
4
|
+
data.tar.gz: f34001576b71d42580328f96d3c0623df78ad150b9ab3cd98f5d7d63030dd892
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 482edfd45da157a5aec9acc3a8d1b71cc40c825ee1a5417198c29d9ce8a0b40cd0051dea5d257307046794fb774b7ce8b3b60d72dc98b6dcbba04b31b52f2f62
|
7
|
+
data.tar.gz: 6b7293a4df35e0850ea3237fc79136887d69a8301b22975ff0f41ce9384bf66944285f6500a637774db98ee4ef500e137b074e57987e02ca04c5cfa73ce2bc5f
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -15,7 +15,7 @@ Ruby 2.2+
|
|
15
15
|
## Installation
|
16
16
|
|
17
17
|
```
|
18
|
-
gem install
|
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.
|
42
|
+
Usage instructions and examples are available on [vzaar's documentation site](https://developer.vzaar.com).
|
43
43
|
|
44
44
|
|
45
45
|
## Contributing
|
data/lib/vzaar_api/abstract.rb
CHANGED
@@ -22,8 +22,9 @@ module VzaarApi
|
|
22
22
|
|
23
23
|
module ClassMethods
|
24
24
|
def create(attrs)
|
25
|
-
|
26
|
-
new
|
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(
|
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
|
data/lib/vzaar_api/lib/api.rb
CHANGED
@@ -23,7 +23,8 @@ module VzaarApi
|
|
23
23
|
end
|
24
24
|
|
25
25
|
def post(url, body = {})
|
26
|
-
|
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 =
|
18
|
-
|
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
|
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(
|
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
|
data/lib/vzaar_api/playlist.rb
CHANGED
@@ -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, :
|
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
|
@@ -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,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
|
data/lib/vzaar_api/upload/s3.rb
CHANGED
@@ -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
|
data/lib/vzaar_api/version.rb
CHANGED
@@ -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
|
data/lib/vzaar_api/video.rb
CHANGED
@@ -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
|
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.
|
11
|
+
- HTTPClient/1.0 (2.8.3, ruby 2.3.0 (2015-12-25))
|
12
12
|
Accept:
|
13
13
|
- "*/*"
|
14
14
|
Date:
|
15
|
-
-
|
15
|
+
- Wed, 28 Nov 2018 11:12:15 GMT
|
16
16
|
X-Auth-Token:
|
17
|
-
-
|
17
|
+
- pVrjGuKWP27U_kz4anfy
|
18
18
|
X-Client-Id:
|
19
|
-
-
|
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
|
28
|
+
- nginx
|
29
29
|
Date:
|
30
|
-
-
|
30
|
+
- Wed, 28 Nov 2018 11:12:16 GMT
|
31
31
|
Content-Type:
|
32
32
|
- application/json
|
33
33
|
Content-Length:
|
34
|
-
- '
|
34
|
+
- '1066'
|
35
35
|
Connection:
|
36
36
|
- keep-alive
|
37
|
-
X-
|
37
|
+
X-Ratelimit-Limit:
|
38
38
|
- '200'
|
39
|
-
X-
|
39
|
+
X-Ratelimit-Remaining:
|
40
40
|
- '199'
|
41
|
-
X-
|
42
|
-
- '
|
43
|
-
X-
|
44
|
-
-
|
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
|
-
-
|
48
|
+
- 80747688-ff96-489e-849a-3e77424192cb
|
49
49
|
X-Runtime:
|
50
|
-
- '
|
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
|
-
- '["
|
56
|
+
- '["wzqk5h1llxroowv76or","x6d0sryoaznh4tbj83i2","8fwa4v4jf9bmwd6vvqr","wng1g0lxjpf0d1m0xiff","t9k7dkc5tnuowk9auwey","smpx96fbyoyotkt4xebh","xr2g8orikxxkzhefaeec","osnz4pgxt5ivkz457xt7","lemn2tp0lc9pfn64elxq","pt82m4whmu8qyhjv5fia"]'
|
57
57
|
body:
|
58
58
|
encoding: UTF-8
|
59
|
-
string: '{"data":{"
|
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:
|
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
|
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.
|
11
|
+
- HTTPClient/1.0 (2.8.3, ruby 2.3.0 (2015-12-25))
|
12
12
|
Accept:
|
13
13
|
- "*/*"
|
14
14
|
Date:
|
15
|
-
-
|
15
|
+
- Wed, 28 Nov 2018 11:12:16 GMT
|
16
16
|
X-Auth-Token:
|
17
|
-
-
|
17
|
+
- pVrjGuKWP27U_kz4anfy
|
18
18
|
X-Client-Id:
|
19
|
-
-
|
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
|
28
|
+
- nginx
|
29
29
|
Date:
|
30
|
-
-
|
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
|
-
-
|
40
|
+
- a04de2f9-a812-4df0-97e6-f7ee36b336e1
|
41
41
|
X-Runtime:
|
42
|
-
- '0.
|
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:
|
50
|
+
http_version:
|
51
|
+
recorded_at: Wed, 28 Nov 2018 11:12:16 GMT
|
52
52
|
recorded_with: VCR 3.0.3
|