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
@@ -5,18 +5,18 @@ http_interactions:
|
|
5
5
|
uri: https://app.vzaar.localhost/api/v2/link_uploads
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
|
-
string: '{"url":"http://example.com/video.mp4","uploader":"Ruby-2.0.0
|
8
|
+
string: '{"url":"http://example.com/video.mp4","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 14:46:28 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,41 +25,43 @@ 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 14:46:28 GMT
|
31
31
|
Content-Type:
|
32
32
|
- application/json
|
33
33
|
Content-Length:
|
34
|
-
- '
|
34
|
+
- '1077'
|
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
|
+
- '1543416420'
|
43
|
+
X-Ratelimit-Reset-In:
|
44
|
+
- 32 seconds
|
45
45
|
Cache-Control:
|
46
46
|
- no-store, must-revalidate, private, max-age=0
|
47
47
|
X-Request-Id:
|
48
|
-
-
|
48
|
+
- 95fef00f-95d9-477a-8364-c3e56bc9dc89
|
49
49
|
X-Runtime:
|
50
|
-
- '0.
|
50
|
+
- '0.220439'
|
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
|
+
- '["lmnp9men3dqwoju99pc2","fr1v3v60t14pjh93e8om","h9psmg6qml4a44yzix82","m75qf12yw6yfw5nbcv3x","2mqklapoo3lgc4xonfty","6vrl4p8kpzafih5jdr2i","4v3bgvm31v77b1qxwqo8"]'
|
57
57
|
body:
|
58
58
|
encoding: UTF-8
|
59
|
-
string: '{"data":{"id":
|
60
|
-
|
61
|
-
|
62
|
-
|
59
|
+
string: '{"data":{"id":1293123213,"title":null,"description":null,"state":"processing","private":false,"user_id":103616,"user_login":"qloop1002","account_id":102649,"account_name":"qloop1002","duration":null,"created_at":"2018-11-28T14:46:28.690Z","updated_at":"2018-11-28T14:46:28.690Z","url":"https://vzaar.localhost/videos/1293123213","seo_url":null,"asset_url":"https://view.vzaar.localhost/1293123213/video","poster_url":"https://view.vzaar.localhost/1293123213/image","thumbnail_url":"https://view.vzaar.localhost/1293123213/thumb","embed_code":"<div
|
60
|
+
class=\"vz-container\" style=\"position:relative;padding-bottom:56.25%;overflow:hidden;height:0;max-width:100%;\"><iframe
|
61
|
+
id=\"vzvd-1293123213\" name=\"vzvd-1293123213\" title=\"video player\" type=\"text/html\"
|
62
|
+
width=\"100%\" height=\"100%\" frameborder=\"0\" allowfullscreen allowTransparency=\"true\"
|
63
|
+
src=\"https://view.vzaar.localhost/1293123213/player\" allow=\"autoplay\"
|
64
|
+
class=\"video-player video-player-responsive\" style=\"position:absolute;top:0;left:0;\"></iframe></div>","categories":[],"adverts":[],"renditions":[]}}'
|
63
65
|
http_version:
|
64
|
-
recorded_at:
|
66
|
+
recorded_at: Wed, 28 Nov 2018 14:46:28 GMT
|
65
67
|
recorded_with: VCR 3.0.3
|