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
@@ -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-alpha"}'
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.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
- - Fri, 04 Nov 2016 10:52:12 GMT
15
+ - Wed, 28 Nov 2018 14:46:28 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,41 +25,43 @@ http_interactions:
25
25
  message: Created
26
26
  headers:
27
27
  Server:
28
- - nginx/1.10.1
28
+ - nginx
29
29
  Date:
30
- - Fri, 04 Nov 2016 10:52:12 GMT
30
+ - Wed, 28 Nov 2018 14:46:28 GMT
31
31
  Content-Type:
32
32
  - application/json
33
33
  Content-Length:
34
- - '577'
34
+ - '1077'
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
- - '1478256792'
43
- X-RateLimit-Reset-In:
44
- - 60 seconds
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
- - 6b01de44-f1d8-43bf-bf5c-0a61f3e8cc2d
48
+ - 95fef00f-95d9-477a-8364-c3e56bc9dc89
49
49
  X-Runtime:
50
- - '0.167140'
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
- - '["5261k1tcwvkehlzagbzt","4cgrjuu9znv5flechaye","xnttqh4f6tb6mlow6fqp","51m8dv0qththvbewgq13","x64kuijqm7wvs2v4hn7w","huk6yekaaonvewr8gorm","vbeuauig2dkult7iwd88","20346z4sk0xdmgjxe013","ojqf7ud6fx3fp4ugy5qy","a3g9j8ng0wd0z95f8byp"]'
56
+ - '["lmnp9men3dqwoju99pc2","fr1v3v60t14pjh93e8om","h9psmg6qml4a44yzix82","m75qf12yw6yfw5nbcv3x","2mqklapoo3lgc4xonfty","6vrl4p8kpzafih5jdr2i","4v3bgvm31v77b1qxwqo8"]'
57
57
  body:
58
58
  encoding: UTF-8
59
- string: '{"data":{"id":7574826,"title":null,"user_id":79357,"account_id":79357,"description":null,"created_at":"2016-11-04T10:52:12.268Z","updated_at":"2016-11-04T10:52:12.268Z","private":false,"seo_url":null,"url":null,"thumbnail_url":"https://view.vzaar.localhost/7574826/thumb","embed_code":"<iframe
60
- id=\"vzvd-7574826\" name=\"vzvd-7574826\" title=\"video player\" class=\"video-player\"
61
- type=\"text/html\" frameborder=\"0\" allowfullscreen allowTransparency=\"true\"
62
- mozallowfullscreen webkitAllowFullScreen src=\"//view.vzaar.localhost/7574826/player\"></iframe>","renditions":[]}}'
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: Fri, 04 Nov 2016 10:52:12 GMT
66
+ recorded_at: Wed, 28 Nov 2018 14:46:28 GMT
65
67
  recorded_with: VCR 3.0.3