mux_ruby 1.3.1 → 1.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. checksums.yaml +5 -5
  2. data/Gemfile +2 -1
  3. data/Gemfile.lock +37 -35
  4. data/README.md +6 -1
  5. data/docs/Asset.md +3 -1
  6. data/docs/AssetNonStandardInputReasons.md +16 -0
  7. data/docs/AssetRecordingTimes.md +9 -0
  8. data/docs/AssetsApi.md +54 -0
  9. data/docs/CreateAssetRequest.md +1 -1
  10. data/docs/CreateLiveStreamRequest.md +2 -0
  11. data/docs/CreateUploadRequest.md +1 -0
  12. data/docs/DisableLiveStreamResponse.md +8 -0
  13. data/docs/EnableLiveStreamResponse.md +8 -0
  14. data/docs/LiveStream.md +2 -1
  15. data/docs/LiveStreamsApi.md +104 -0
  16. data/docs/UpdateAssetMasterAccessRequest.md +8 -0
  17. data/docs/Upload.md +1 -0
  18. data/docs/VideoView.md +16 -14
  19. data/examples/data/exercise-errors.rb +1 -1
  20. data/examples/video/exercise-assets.rb +10 -0
  21. data/examples/video/exercise-live-streams.rb +22 -0
  22. data/lib/mux_ruby.rb +5 -0
  23. data/lib/mux_ruby/api/assets_api.rb +61 -0
  24. data/lib/mux_ruby/api/live_streams_api.rb +106 -0
  25. data/lib/mux_ruby/api_client.rb +1 -1
  26. data/lib/mux_ruby/configuration.rb +1 -4
  27. data/lib/mux_ruby/models/asset.rb +34 -13
  28. data/lib/mux_ruby/models/asset_non_standard_input_reasons.rb +335 -0
  29. data/lib/mux_ruby/models/asset_recording_times.rb +195 -0
  30. data/lib/mux_ruby/models/asset_static_renditions_files.rb +4 -4
  31. data/lib/mux_ruby/models/create_asset_request.rb +13 -13
  32. data/lib/mux_ruby/models/create_live_stream_request.rb +24 -4
  33. data/lib/mux_ruby/models/create_upload_request.rb +13 -4
  34. data/lib/mux_ruby/models/disable_live_stream_response.rb +184 -0
  35. data/lib/mux_ruby/models/enable_live_stream_response.rb +184 -0
  36. data/lib/mux_ruby/models/input_settings_overlay_settings.rb +46 -0
  37. data/lib/mux_ruby/models/live_stream.rb +14 -5
  38. data/lib/mux_ruby/models/update_asset_master_access_request.rb +219 -0
  39. data/lib/mux_ruby/models/upload.rb +13 -4
  40. data/lib/mux_ruby/models/video_view.rb +36 -18
  41. data/lib/mux_ruby/version.rb +1 -1
  42. data/spec/api/assets_api_spec.rb +13 -0
  43. data/spec/api/live_streams_api_spec.rb +24 -0
  44. data/spec/models/asset_non_standard_input_reasons_spec.rb +98 -0
  45. data/spec/models/asset_recording_times_spec.rb +40 -0
  46. data/spec/models/asset_spec.rb +18 -6
  47. data/spec/models/asset_static_renditions_files_spec.rb +2 -2
  48. data/spec/models/create_asset_request_spec.rb +6 -6
  49. data/spec/models/create_live_stream_request_spec.rb +12 -0
  50. data/spec/models/create_upload_request_spec.rb +6 -0
  51. data/spec/models/disable_live_stream_response_spec.rb +34 -0
  52. data/spec/models/enable_live_stream_response_spec.rb +34 -0
  53. data/spec/models/input_settings_overlay_settings_spec.rb +8 -0
  54. data/spec/models/live_stream_spec.rb +6 -0
  55. data/spec/models/update_asset_master_access_request_spec.rb +38 -0
  56. data/spec/models/upload_spec.rb +6 -0
  57. data/spec/models/video_view_spec.rb +12 -0
  58. data/test.sh +28 -0
  59. metadata +80 -60
@@ -4,5 +4,5 @@
4
4
  =end
5
5
 
6
6
  module MuxRuby
7
- VERSION = '1.3.1'
7
+ VERSION = '1.7.0'
8
8
  end
@@ -144,6 +144,19 @@ describe 'AssetsApi' do
144
144
  end
145
145
  end
146
146
 
147
+ # unit tests for update_asset_master_access
148
+ # Update master access
149
+ # Allows you add temporary access to the master (highest-quality) version of the asset in MP4 format. A URL will be created that can be used to download the master version for 24 hours. After 24 hours Master Access will revert to \"none\". This master version is not optimized for web and not meant to be streamed, only downloaded for purposes like archiving or editing the video offline.
150
+ # @param asset_id The asset ID.
151
+ # @param update_asset_master_access_request
152
+ # @param [Hash] opts the optional parameters
153
+ # @return [AssetResponse]
154
+ describe 'update_asset_master_access test' do
155
+ it 'should work' do
156
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
157
+ end
158
+ end
159
+
147
160
  # unit tests for update_asset_mp4_support
148
161
  # Update MP4 support
149
162
  # Allows you add or remove mp4 support for assets that were created without it. Currently there are two values supported in this request, `standard` and `none`. `none` means that an asset *does not* have mp4 support, so submitting a request with `mp4_support` set to `none` will delete the mp4 assets from the asset in question.
@@ -97,6 +97,30 @@ describe 'LiveStreamsApi' do
97
97
  end
98
98
  end
99
99
 
100
+ # unit tests for disable_live_stream
101
+ # Disable a live stream
102
+ # Disables a live stream, making it reject incoming RTMP streams until re-enabled.
103
+ # @param live_stream_id The live stream ID
104
+ # @param [Hash] opts the optional parameters
105
+ # @return [DisableLiveStreamResponse]
106
+ describe 'disable_live_stream test' do
107
+ it 'should work' do
108
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
109
+ end
110
+ end
111
+
112
+ # unit tests for enable_live_stream
113
+ # Enable a live stream
114
+ # Enables a live stream, allowing it to accept an incoming RTMP stream.
115
+ # @param live_stream_id The live stream ID
116
+ # @param [Hash] opts the optional parameters
117
+ # @return [EnableLiveStreamResponse]
118
+ describe 'enable_live_stream test' do
119
+ it 'should work' do
120
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
121
+ end
122
+ end
123
+
100
124
  # unit tests for get_live_stream
101
125
  # Retrieve a live stream
102
126
  # Retrieves the details of a live stream that has previously been created. Supply the unique live stream ID that was returned from your previous request, and Mux will return the corresponding live stream information. The same information is returned when creating a live stream.
@@ -0,0 +1,98 @@
1
+ =begin
2
+ # Mux Ruby - Copyright 2019 Mux Inc.
3
+ # NOTE: This file is auto generated. Do not edit this file manually.
4
+ =end
5
+
6
+ require 'spec_helper'
7
+ require 'json'
8
+ require 'date'
9
+
10
+ # Unit tests for MuxRuby::AssetNonStandardInputReasons
11
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
12
+ # Please update as you see appropriate
13
+ describe 'AssetNonStandardInputReasons' do
14
+ before do
15
+ # run before each test
16
+ @instance = MuxRuby::AssetNonStandardInputReasons.new
17
+ end
18
+
19
+ after do
20
+ # run after each test
21
+ end
22
+
23
+ describe 'test an instance of AssetNonStandardInputReasons' do
24
+ it 'should create an instance of AssetNonStandardInputReasons' do
25
+ expect(@instance).to be_instance_of(MuxRuby::AssetNonStandardInputReasons)
26
+ end
27
+ end
28
+ describe 'test attribute "video_codec"' do
29
+ it 'should work' do
30
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
31
+ end
32
+ end
33
+
34
+ describe 'test attribute "audio_codec"' do
35
+ it 'should work' do
36
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
37
+ end
38
+ end
39
+
40
+ describe 'test attribute "video_gop_size"' do
41
+ it 'should work' do
42
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
43
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["high"])
44
+ # validator.allowable_values.each do |value|
45
+ # expect { @instance.video_gop_size = value }.not_to raise_error
46
+ # end
47
+ end
48
+ end
49
+
50
+ describe 'test attribute "video_frame_rate"' do
51
+ it 'should work' do
52
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
53
+ end
54
+ end
55
+
56
+ describe 'test attribute "video_resolution"' do
57
+ it 'should work' do
58
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
59
+ end
60
+ end
61
+
62
+ describe 'test attribute "pixel_aspect_ratio"' do
63
+ it 'should work' do
64
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
65
+ end
66
+ end
67
+
68
+ describe 'test attribute "video_edit_list"' do
69
+ it 'should work' do
70
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
71
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["non-standard"])
72
+ # validator.allowable_values.each do |value|
73
+ # expect { @instance.video_edit_list = value }.not_to raise_error
74
+ # end
75
+ end
76
+ end
77
+
78
+ describe 'test attribute "audio_edit_list"' do
79
+ it 'should work' do
80
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
81
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["non-standard"])
82
+ # validator.allowable_values.each do |value|
83
+ # expect { @instance.audio_edit_list = value }.not_to raise_error
84
+ # end
85
+ end
86
+ end
87
+
88
+ describe 'test attribute "unexpected_media_file_parameters"' do
89
+ it 'should work' do
90
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
91
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["non-standard"])
92
+ # validator.allowable_values.each do |value|
93
+ # expect { @instance.unexpected_media_file_parameters = value }.not_to raise_error
94
+ # end
95
+ end
96
+ end
97
+
98
+ end
@@ -0,0 +1,40 @@
1
+ =begin
2
+ # Mux Ruby - Copyright 2019 Mux Inc.
3
+ # NOTE: This file is auto generated. Do not edit this file manually.
4
+ =end
5
+
6
+ require 'spec_helper'
7
+ require 'json'
8
+ require 'date'
9
+
10
+ # Unit tests for MuxRuby::AssetRecordingTimes
11
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
12
+ # Please update as you see appropriate
13
+ describe 'AssetRecordingTimes' do
14
+ before do
15
+ # run before each test
16
+ @instance = MuxRuby::AssetRecordingTimes.new
17
+ end
18
+
19
+ after do
20
+ # run after each test
21
+ end
22
+
23
+ describe 'test an instance of AssetRecordingTimes' do
24
+ it 'should create an instance of AssetRecordingTimes' do
25
+ expect(@instance).to be_instance_of(MuxRuby::AssetRecordingTimes)
26
+ end
27
+ end
28
+ describe 'test attribute "started_at"' do
29
+ it 'should work' do
30
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
31
+ end
32
+ end
33
+
34
+ describe 'test attribute "duration"' do
35
+ it 'should work' do
36
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
37
+ end
38
+ end
39
+
40
+ end
@@ -85,12 +85,6 @@ describe 'Asset' do
85
85
  end
86
86
  end
87
87
 
88
- describe 'test attribute "demo"' do
89
- it 'should work' do
90
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
91
- end
92
- end
93
-
94
88
  describe 'test attribute "errors"' do
95
89
  it 'should work' do
96
90
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -159,4 +153,22 @@ describe 'Asset' do
159
153
  end
160
154
  end
161
155
 
156
+ describe 'test attribute "recording_times"' do
157
+ it 'should work' do
158
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
159
+ end
160
+ end
161
+
162
+ describe 'test attribute "non_standard_input_reasons"' do
163
+ it 'should work' do
164
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
165
+ end
166
+ end
167
+
168
+ describe 'test attribute "test"' do
169
+ it 'should work' do
170
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
171
+ end
172
+ end
173
+
162
174
  end
@@ -28,7 +28,7 @@ describe 'AssetStaticRenditionsFiles' do
28
28
  describe 'test attribute "name"' do
29
29
  it 'should work' do
30
30
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
31
- # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["low.mp4", "medium.mp4", "high.mp4"])
31
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["low.mp4", "medium.mp4", "high.mp4", "audio.m4a"])
32
32
  # validator.allowable_values.each do |value|
33
33
  # expect { @instance.name = value }.not_to raise_error
34
34
  # end
@@ -38,7 +38,7 @@ describe 'AssetStaticRenditionsFiles' do
38
38
  describe 'test attribute "ext"' do
39
39
  it 'should work' do
40
40
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
41
- # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["mp4"])
41
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["mp4", "m4a"])
42
42
  # validator.allowable_values.each do |value|
43
43
  # expect { @instance.ext = value }.not_to raise_error
44
44
  # end
@@ -37,12 +37,6 @@ describe 'CreateAssetRequest' do
37
37
  end
38
38
  end
39
39
 
40
- describe 'test attribute "demo"' do
41
- it 'should work' do
42
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
43
- end
44
- end
45
-
46
40
  describe 'test attribute "per_title_encode"' do
47
41
  it 'should work' do
48
42
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -81,4 +75,10 @@ describe 'CreateAssetRequest' do
81
75
  end
82
76
  end
83
77
 
78
+ describe 'test attribute "test"' do
79
+ it 'should work' do
80
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
81
+ end
82
+ end
83
+
84
84
  end
@@ -55,4 +55,16 @@ describe 'CreateLiveStreamRequest' do
55
55
  end
56
56
  end
57
57
 
58
+ describe 'test attribute "test"' do
59
+ it 'should work' do
60
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
61
+ end
62
+ end
63
+
64
+ describe 'test attribute "simulcast_targets"' do
65
+ it 'should work' do
66
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
67
+ end
68
+ end
69
+
58
70
  end
@@ -43,4 +43,10 @@ describe 'CreateUploadRequest' do
43
43
  end
44
44
  end
45
45
 
46
+ describe 'test attribute "test"' do
47
+ it 'should work' do
48
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
49
+ end
50
+ end
51
+
46
52
  end
@@ -0,0 +1,34 @@
1
+ =begin
2
+ # Mux Ruby - Copyright 2019 Mux Inc.
3
+ # NOTE: This file is auto generated. Do not edit this file manually.
4
+ =end
5
+
6
+ require 'spec_helper'
7
+ require 'json'
8
+ require 'date'
9
+
10
+ # Unit tests for MuxRuby::DisableLiveStreamResponse
11
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
12
+ # Please update as you see appropriate
13
+ describe 'DisableLiveStreamResponse' do
14
+ before do
15
+ # run before each test
16
+ @instance = MuxRuby::DisableLiveStreamResponse.new
17
+ end
18
+
19
+ after do
20
+ # run after each test
21
+ end
22
+
23
+ describe 'test an instance of DisableLiveStreamResponse' do
24
+ it 'should create an instance of DisableLiveStreamResponse' do
25
+ expect(@instance).to be_instance_of(MuxRuby::DisableLiveStreamResponse)
26
+ end
27
+ end
28
+ describe 'test attribute "data"' do
29
+ it 'should work' do
30
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
31
+ end
32
+ end
33
+
34
+ end
@@ -0,0 +1,34 @@
1
+ =begin
2
+ # Mux Ruby - Copyright 2019 Mux Inc.
3
+ # NOTE: This file is auto generated. Do not edit this file manually.
4
+ =end
5
+
6
+ require 'spec_helper'
7
+ require 'json'
8
+ require 'date'
9
+
10
+ # Unit tests for MuxRuby::EnableLiveStreamResponse
11
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
12
+ # Please update as you see appropriate
13
+ describe 'EnableLiveStreamResponse' do
14
+ before do
15
+ # run before each test
16
+ @instance = MuxRuby::EnableLiveStreamResponse.new
17
+ end
18
+
19
+ after do
20
+ # run after each test
21
+ end
22
+
23
+ describe 'test an instance of EnableLiveStreamResponse' do
24
+ it 'should create an instance of EnableLiveStreamResponse' do
25
+ expect(@instance).to be_instance_of(MuxRuby::EnableLiveStreamResponse)
26
+ end
27
+ end
28
+ describe 'test attribute "data"' do
29
+ it 'should work' do
30
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
31
+ end
32
+ end
33
+
34
+ end
@@ -28,6 +28,10 @@ describe 'InputSettingsOverlaySettings' do
28
28
  describe 'test attribute "vertical_align"' do
29
29
  it 'should work' do
30
30
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
31
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["top", "middle", "bottom"])
32
+ # validator.allowable_values.each do |value|
33
+ # expect { @instance.vertical_align = value }.not_to raise_error
34
+ # end
31
35
  end
32
36
  end
33
37
 
@@ -40,6 +44,10 @@ describe 'InputSettingsOverlaySettings' do
40
44
  describe 'test attribute "horizontal_align"' do
41
45
  it 'should work' do
42
46
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
47
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["left", "center", "right"])
48
+ # validator.allowable_values.each do |value|
49
+ # expect { @instance.horizontal_align = value }.not_to raise_error
50
+ # end
43
51
  end
44
52
  end
45
53
 
@@ -97,4 +97,10 @@ describe 'LiveStream' do
97
97
  end
98
98
  end
99
99
 
100
+ describe 'test attribute "test"' do
101
+ it 'should work' do
102
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
103
+ end
104
+ end
105
+
100
106
  end
@@ -0,0 +1,38 @@
1
+ =begin
2
+ # Mux Ruby - Copyright 2019 Mux Inc.
3
+ # NOTE: This file is auto generated. Do not edit this file manually.
4
+ =end
5
+
6
+ require 'spec_helper'
7
+ require 'json'
8
+ require 'date'
9
+
10
+ # Unit tests for MuxRuby::UpdateAssetMasterAccessRequest
11
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
12
+ # Please update as you see appropriate
13
+ describe 'UpdateAssetMasterAccessRequest' do
14
+ before do
15
+ # run before each test
16
+ @instance = MuxRuby::UpdateAssetMasterAccessRequest.new
17
+ end
18
+
19
+ after do
20
+ # run after each test
21
+ end
22
+
23
+ describe 'test an instance of UpdateAssetMasterAccessRequest' do
24
+ it 'should create an instance of UpdateAssetMasterAccessRequest' do
25
+ expect(@instance).to be_instance_of(MuxRuby::UpdateAssetMasterAccessRequest)
26
+ end
27
+ end
28
+ describe 'test attribute "master_access"' do
29
+ it 'should work' do
30
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
31
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["temporary", "none"])
32
+ # validator.allowable_values.each do |value|
33
+ # expect { @instance.master_access = value }.not_to raise_error
34
+ # end
35
+ end
36
+ end
37
+
38
+ end