mux_ruby 3.3.1 → 3.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +13 -7
- data/docs/Asset.md +1 -1
- data/docs/AssetNonStandardInputReasons.md +2 -2
- data/docs/AssetResponse.md +1 -1
- data/docs/AssetsApi.md +8 -0
- data/docs/Broadcast.md +30 -0
- data/docs/BroadcastLayout.md +15 -0
- data/docs/BroadcastResolution.md +15 -0
- data/docs/BroadcastResponse.md +18 -0
- data/docs/BroadcastStatus.md +15 -0
- data/docs/CreateBroadcastRequest.md +26 -0
- data/docs/CreateLiveStreamRequest.md +3 -1
- data/docs/CreatePlaybackIDResponse.md +1 -1
- data/docs/CreatePlaybackRestrictionRequest.md +1 -1
- data/docs/CreateSimulcastTargetRequest.md +1 -1
- data/docs/CreateSpaceRequest.md +22 -0
- data/docs/CreateTrackResponse.md +1 -1
- data/docs/DirectUploadsApi.md +6 -0
- data/docs/GetAssetPlaybackIDResponse.md +1 -1
- data/docs/GetLiveStreamPlaybackIDResponse.md +1 -1
- data/docs/IncidentResponse.md +1 -1
- data/docs/InputSettings.md +3 -3
- data/docs/ListSpacesResponse.md +18 -0
- data/docs/LiveStream.md +3 -1
- data/docs/LiveStreamResponse.md +1 -1
- data/docs/LiveStreamsApi.md +16 -4
- data/docs/MetricsApi.md +3 -3
- data/docs/PlaybackRestrictionResponse.md +1 -1
- data/docs/PlaybackRestrictionsApi.md +6 -6
- data/docs/RealTimeApi.md +2 -2
- data/docs/SigningKeyResponse.md +1 -1
- data/docs/SimulcastTargetResponse.md +1 -1
- data/docs/Space.md +30 -0
- data/docs/SpaceResponse.md +18 -0
- data/docs/SpaceStatus.md +15 -0
- data/docs/SpaceType.md +15 -0
- data/docs/SpacesApi.md +658 -0
- data/docs/StartSpaceBroadcastResponse.md +18 -0
- data/docs/StopSpaceBroadcastResponse.md +18 -0
- data/docs/Track.md +9 -7
- data/docs/UpdateLiveStreamRequest.md +3 -1
- data/docs/UpdateReferrerDomainRestrictionRequest.md +37 -5
- data/docs/UploadResponse.md +1 -1
- data/docs/VideoViewResponse.md +1 -1
- data/gen/generator-config.json +1 -1
- data/gen/templates/README.mustache +9 -3
- data/lib/mux_ruby/api/assets_api.rb +8 -0
- data/lib/mux_ruby/api/direct_uploads_api.rb +6 -0
- data/lib/mux_ruby/api/live_streams_api.rb +14 -2
- data/lib/mux_ruby/api/metrics_api.rb +5 -5
- data/lib/mux_ruby/api/playback_restrictions_api.rb +9 -9
- data/lib/mux_ruby/api/real_time_api.rb +2 -2
- data/lib/mux_ruby/api/spaces_api.rb +619 -0
- data/lib/mux_ruby/models/abridged_video_view.rb +7 -0
- data/lib/mux_ruby/models/asset.rb +1 -1
- data/lib/mux_ruby/models/asset_non_standard_input_reasons.rb +2 -2
- data/lib/mux_ruby/models/broadcast.rb +305 -0
- data/lib/mux_ruby/models/broadcast_layout.rb +37 -0
- data/lib/mux_ruby/models/broadcast_resolution.rb +41 -0
- data/lib/mux_ruby/models/broadcast_response.rb +223 -0
- data/lib/mux_ruby/models/broadcast_status.rb +37 -0
- data/lib/mux_ruby/models/create_broadcast_request.rb +266 -0
- data/lib/mux_ruby/models/create_live_stream_request.rb +40 -4
- data/lib/mux_ruby/models/create_simulcast_target_request.rb +1 -1
- data/lib/mux_ruby/models/create_space_request.rb +242 -0
- data/lib/mux_ruby/models/input_settings.rb +3 -3
- data/lib/mux_ruby/models/list_spaces_response.rb +225 -0
- data/lib/mux_ruby/models/live_stream.rb +40 -4
- data/lib/mux_ruby/models/space.rb +301 -0
- data/lib/mux_ruby/models/space_response.rb +223 -0
- data/lib/mux_ruby/models/space_status.rb +37 -0
- data/lib/mux_ruby/models/space_type.rb +36 -0
- data/lib/mux_ruby/models/start_space_broadcast_response.rb +218 -0
- data/lib/mux_ruby/models/stop_space_broadcast_response.rb +218 -0
- data/lib/mux_ruby/models/track.rb +32 -10
- data/lib/mux_ruby/models/update_live_stream_request.rb +40 -4
- data/lib/mux_ruby/models/update_referrer_domain_restriction_request.rb +74 -179
- data/lib/mux_ruby/models/video_view.rb +103 -0
- data/lib/mux_ruby/version.rb +1 -1
- data/lib/mux_ruby.rb +15 -0
- data/spec/api/spaces_api_spec.rb +149 -0
- data/spec/models/broadcast_layout_spec.rb +28 -0
- data/spec/models/broadcast_resolution_spec.rb +28 -0
- data/spec/models/broadcast_response_spec.rb +34 -0
- data/spec/models/broadcast_spec.rb +70 -0
- data/spec/models/broadcast_status_spec.rb +28 -0
- data/spec/models/create_broadcast_request_spec.rb +58 -0
- data/spec/models/create_space_request_spec.rb +46 -0
- data/spec/models/list_spaces_response_spec.rb +34 -0
- data/spec/models/space_response_spec.rb +34 -0
- data/spec/models/space_spec.rb +70 -0
- data/spec/models/space_status_spec.rb +28 -0
- data/spec/models/space_type_spec.rb +28 -0
- data/spec/models/start_space_broadcast_response_spec.rb +34 -0
- data/spec/models/stop_space_broadcast_response_spec.rb +34 -0
- metadata +159 -99
@@ -14,196 +14,91 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module MuxRuby
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
# Returns all the JSON keys this model knows about
|
25
|
-
def self.acceptable_attributes
|
26
|
-
attribute_map.values
|
27
|
-
end
|
28
|
-
|
29
|
-
# Attribute type mapping.
|
30
|
-
def self.openapi_types
|
31
|
-
{
|
32
|
-
}
|
33
|
-
end
|
34
|
-
|
35
|
-
# List of attributes with nullable: true
|
36
|
-
def self.openapi_nullable
|
37
|
-
Set.new([
|
38
|
-
])
|
39
|
-
end
|
40
|
-
|
41
|
-
# Initializes the object
|
42
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
43
|
-
def initialize(attributes = {})
|
44
|
-
if (!attributes.is_a?(Hash))
|
45
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `MuxRuby::UpdateReferrerDomainRestrictionRequest` initialize method"
|
17
|
+
module UpdateReferrerDomainRestrictionRequest
|
18
|
+
class << self
|
19
|
+
# List of class defined in oneOf (OpenAPI v3)
|
20
|
+
def openapi_one_of
|
21
|
+
[
|
22
|
+
:'ReferrerDomainRestriction'
|
23
|
+
]
|
46
24
|
end
|
47
25
|
|
48
|
-
#
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
# @return true if the model is valid
|
66
|
-
def valid?
|
67
|
-
true
|
68
|
-
end
|
69
|
-
|
70
|
-
# Checks equality by comparing each attribute.
|
71
|
-
# @param [Object] Object to be compared
|
72
|
-
def ==(o)
|
73
|
-
return true if self.equal?(o)
|
74
|
-
self.class == o.class
|
75
|
-
end
|
76
|
-
|
77
|
-
# @see the `==` method
|
78
|
-
# @param [Object] Object to be compared
|
79
|
-
def eql?(o)
|
80
|
-
self == o
|
81
|
-
end
|
82
|
-
|
83
|
-
# Calculates hash code according to all attributes.
|
84
|
-
# @return [Integer] Hash code
|
85
|
-
def hash
|
86
|
-
[].hash
|
87
|
-
end
|
88
|
-
|
89
|
-
# Builds the object from hash
|
90
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
91
|
-
# @return [Object] Returns the model itself
|
92
|
-
def self.build_from_hash(attributes)
|
93
|
-
new.build_from_hash(attributes)
|
94
|
-
end
|
95
|
-
|
96
|
-
# Builds the object from hash
|
97
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
98
|
-
# @return [Object] Returns the model itself
|
99
|
-
def build_from_hash(attributes)
|
100
|
-
return nil unless attributes.is_a?(Hash)
|
101
|
-
self.class.openapi_types.each_pair do |key, type|
|
102
|
-
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
103
|
-
self.send("#{key}=", nil)
|
104
|
-
elsif type =~ /\AArray<(.*)>/i
|
105
|
-
# check to ensure the input is an array given that the attribute
|
106
|
-
# is documented as an array but the input is not
|
107
|
-
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
108
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
26
|
+
# Builds the object
|
27
|
+
# @param [Mixed] Data to be matched against the list of oneOf items
|
28
|
+
# @return [Object] Returns the model or the data itself
|
29
|
+
def build(data)
|
30
|
+
# Go through the list of oneOf items and attempt to identify the appropriate one.
|
31
|
+
# Note:
|
32
|
+
# - We do not attempt to check whether exactly one item matches.
|
33
|
+
# - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
|
34
|
+
# due to the way the deserialization is made in the base_object template (it just casts without verifying).
|
35
|
+
# - TODO: scalar values are defacto behaving as if they were nullable.
|
36
|
+
# - TODO: logging when debugging is set.
|
37
|
+
openapi_one_of.each do |klass|
|
38
|
+
begin
|
39
|
+
next if klass == :AnyType # "nullable: true"
|
40
|
+
typed_data = find_and_cast_into_type(klass, data)
|
41
|
+
return typed_data if typed_data
|
42
|
+
rescue # rescue all errors so we keep iterating even if the current item lookup raises
|
109
43
|
end
|
110
|
-
elsif !attributes[self.class.attribute_map[key]].nil?
|
111
|
-
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
112
44
|
end
|
113
|
-
end
|
114
45
|
|
115
|
-
|
116
|
-
end
|
117
|
-
|
118
|
-
# Deserializes the data based on type
|
119
|
-
# @param string type Data type
|
120
|
-
# @param string value Value to be deserialized
|
121
|
-
# @return [Object] Deserialized data
|
122
|
-
def _deserialize(type, value)
|
123
|
-
case type.to_sym
|
124
|
-
when :Time
|
125
|
-
Time.parse(value)
|
126
|
-
when :Date
|
127
|
-
Date.parse(value)
|
128
|
-
when :String
|
129
|
-
value.to_s
|
130
|
-
when :Integer
|
131
|
-
value.to_i
|
132
|
-
when :Float
|
133
|
-
value.to_f
|
134
|
-
when :Boolean
|
135
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
136
|
-
true
|
137
|
-
else
|
138
|
-
false
|
139
|
-
end
|
140
|
-
when :Object
|
141
|
-
# generic object (usually a Hash), return directly
|
142
|
-
value
|
143
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
144
|
-
inner_type = Regexp.last_match[:inner_type]
|
145
|
-
value.map { |v| _deserialize(inner_type, v) }
|
146
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
147
|
-
k_type = Regexp.last_match[:k_type]
|
148
|
-
v_type = Regexp.last_match[:v_type]
|
149
|
-
{}.tap do |hash|
|
150
|
-
value.each do |k, v|
|
151
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
152
|
-
end
|
153
|
-
end
|
154
|
-
else # model
|
155
|
-
# models (e.g. Pet) or oneOf
|
156
|
-
klass = MuxRuby.const_get(type)
|
157
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
46
|
+
openapi_one_of.include?(:AnyType) ? data : nil
|
158
47
|
end
|
159
|
-
end
|
160
|
-
|
161
|
-
# Returns the string representation of the object
|
162
|
-
# @return [String] String presentation of the object
|
163
|
-
def to_s
|
164
|
-
to_hash.to_s
|
165
|
-
end
|
166
48
|
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
49
|
+
private
|
50
|
+
|
51
|
+
SchemaMismatchError = Class.new(StandardError)
|
52
|
+
|
53
|
+
# Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse.
|
54
|
+
def find_and_cast_into_type(klass, data)
|
55
|
+
return if data.nil?
|
56
|
+
|
57
|
+
case klass.to_s
|
58
|
+
when 'Boolean'
|
59
|
+
return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass)
|
60
|
+
when 'Float'
|
61
|
+
return data if data.instance_of?(Float)
|
62
|
+
when 'Integer'
|
63
|
+
return data if data.instance_of?(Integer)
|
64
|
+
when 'Time'
|
65
|
+
return Time.parse(data)
|
66
|
+
when 'Date'
|
67
|
+
return Date.parse(data)
|
68
|
+
when 'String'
|
69
|
+
return data if data.instance_of?(String)
|
70
|
+
when 'Object' # "type: object"
|
71
|
+
return data if data.instance_of?(Hash)
|
72
|
+
when /\AArray<(?<sub_type>.+)>\z/ # "type: array"
|
73
|
+
if data.instance_of?(Array)
|
74
|
+
sub_type = Regexp.last_match[:sub_type]
|
75
|
+
return data.map { |item| find_and_cast_into_type(sub_type, item) }
|
76
|
+
end
|
77
|
+
when /\AHash<String, (?<sub_type>.+)>\z/ # "type: object" with "additionalProperties: { ... }"
|
78
|
+
if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) }
|
79
|
+
sub_type = Regexp.last_match[:sub_type]
|
80
|
+
return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) }
|
81
|
+
end
|
82
|
+
else # model
|
83
|
+
const = MuxRuby.const_get(klass)
|
84
|
+
if const
|
85
|
+
if const.respond_to?(:openapi_one_of) # nested oneOf model
|
86
|
+
model = const.build(data)
|
87
|
+
return model if model
|
88
|
+
else
|
89
|
+
# raise if data contains keys that are not known to the model
|
90
|
+
raise unless (data.keys - const.acceptable_attributes).empty?
|
91
|
+
model = const.build_from_hash(data)
|
92
|
+
return model if model && model.valid?
|
93
|
+
end
|
94
|
+
end
|
182
95
|
end
|
183
96
|
|
184
|
-
|
97
|
+
raise # if no match by now, raise
|
98
|
+
rescue
|
99
|
+
raise SchemaMismatchError, "#{data} doesn't match the #{klass} type"
|
185
100
|
end
|
186
|
-
hash
|
187
101
|
end
|
188
|
-
|
189
|
-
# Outputs non-array value in the form of hash
|
190
|
-
# For object, use to_hash. Otherwise, just return the value
|
191
|
-
# @param [Object] value Any valid value
|
192
|
-
# @return [Hash] Returns the value in the form of hash
|
193
|
-
def _to_hash(value)
|
194
|
-
if value.is_a?(Array)
|
195
|
-
value.compact.map { |v| _to_hash(v) }
|
196
|
-
elsif value.is_a?(Hash)
|
197
|
-
{}.tap do |hash|
|
198
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
199
|
-
end
|
200
|
-
elsif value.respond_to? :to_hash
|
201
|
-
value.to_hash
|
202
|
-
else
|
203
|
-
value
|
204
|
-
end
|
205
|
-
end
|
206
|
-
|
207
102
|
end
|
208
103
|
|
209
104
|
end
|
@@ -515,6 +515,109 @@ module MuxRuby
|
|
515
515
|
# List of attributes with nullable: true
|
516
516
|
def self.openapi_nullable
|
517
517
|
Set.new([
|
518
|
+
:'view_total_upscaling',
|
519
|
+
:'preroll_ad_asset_hostname',
|
520
|
+
:'player_source_domain',
|
521
|
+
:'region',
|
522
|
+
:'viewer_user_agent',
|
523
|
+
:'preroll_requested',
|
524
|
+
:'page_type',
|
525
|
+
:'startup_score',
|
526
|
+
:'view_seek_duration',
|
527
|
+
:'country_name',
|
528
|
+
:'player_source_height',
|
529
|
+
:'longitude',
|
530
|
+
:'buffering_count',
|
531
|
+
:'video_duration',
|
532
|
+
:'player_source_type',
|
533
|
+
:'city',
|
534
|
+
:'platform_description',
|
535
|
+
:'video_startup_preroll_request_time',
|
536
|
+
:'viewer_device_name',
|
537
|
+
:'video_series',
|
538
|
+
:'viewer_application_name',
|
539
|
+
:'view_total_content_playback_time',
|
540
|
+
:'cdn',
|
541
|
+
:'player_instance_id',
|
542
|
+
:'video_language',
|
543
|
+
:'player_source_width',
|
544
|
+
:'player_error_message',
|
545
|
+
:'player_mux_plugin_version',
|
546
|
+
:'playback_score',
|
547
|
+
:'page_url',
|
548
|
+
:'metro',
|
549
|
+
:'view_max_request_latency',
|
550
|
+
:'requests_for_first_preroll',
|
551
|
+
:'view_total_downscaling',
|
552
|
+
:'latitude',
|
553
|
+
:'player_source_host_name',
|
554
|
+
:'mux_embed_version',
|
555
|
+
:'player_language',
|
556
|
+
:'page_load_time',
|
557
|
+
:'viewer_device_category',
|
558
|
+
:'video_startup_preroll_load_time',
|
559
|
+
:'player_version',
|
560
|
+
:'watch_time',
|
561
|
+
:'player_source_stream_type',
|
562
|
+
:'preroll_ad_tag_hostname',
|
563
|
+
:'viewer_device_manufacturer',
|
564
|
+
:'rebuffering_score',
|
565
|
+
:'experiment_name',
|
566
|
+
:'viewer_os_version',
|
567
|
+
:'buffering_duration',
|
568
|
+
:'player_view_count',
|
569
|
+
:'player_software',
|
570
|
+
:'player_load_time',
|
571
|
+
:'platform_summary',
|
572
|
+
:'video_encoding_variant',
|
573
|
+
:'player_width',
|
574
|
+
:'view_seek_count',
|
575
|
+
:'viewer_experience_score',
|
576
|
+
:'view_error_id',
|
577
|
+
:'video_variant_name',
|
578
|
+
:'preroll_played',
|
579
|
+
:'viewer_application_engine',
|
580
|
+
:'viewer_os_architecture',
|
581
|
+
:'player_error_code',
|
582
|
+
:'buffering_rate',
|
583
|
+
:'player_name',
|
584
|
+
:'view_average_request_throughput',
|
585
|
+
:'video_producer',
|
586
|
+
:'error_type_id',
|
587
|
+
:'video_id',
|
588
|
+
:'continent_code',
|
589
|
+
:'video_content_type',
|
590
|
+
:'viewer_os_family',
|
591
|
+
:'player_poster',
|
592
|
+
:'view_average_request_latency',
|
593
|
+
:'video_variant_id',
|
594
|
+
:'player_source_duration',
|
595
|
+
:'player_source_url',
|
596
|
+
:'video_title',
|
597
|
+
:'rebuffer_percentage',
|
598
|
+
:'time_to_first_frame',
|
599
|
+
:'viewer_user_id',
|
600
|
+
:'video_stream_type',
|
601
|
+
:'player_startup_time',
|
602
|
+
:'viewer_application_version',
|
603
|
+
:'view_max_downscale_percentage',
|
604
|
+
:'view_max_upscale_percentage',
|
605
|
+
:'country_code',
|
606
|
+
:'isp',
|
607
|
+
:'player_height',
|
608
|
+
:'asn',
|
609
|
+
:'asn_name',
|
610
|
+
:'quality_score',
|
611
|
+
:'player_software_version',
|
612
|
+
:'player_mux_plugin_name',
|
613
|
+
:'sub_property_id',
|
614
|
+
:'player_remote_played',
|
615
|
+
:'view_max_playhead_position',
|
616
|
+
:'view_playing_time',
|
617
|
+
:'view_session_id',
|
618
|
+
:'viewer_connection_type',
|
619
|
+
:'viewer_device_model',
|
620
|
+
:'weighted_average_bitrate'
|
518
621
|
])
|
519
622
|
end
|
520
623
|
|
data/lib/mux_ruby/version.rb
CHANGED
data/lib/mux_ruby.rb
CHANGED
@@ -27,12 +27,19 @@ require 'mux_ruby/models/asset_response'
|
|
27
27
|
require 'mux_ruby/models/asset_static_renditions'
|
28
28
|
require 'mux_ruby/models/asset_static_renditions_files'
|
29
29
|
require 'mux_ruby/models/breakdown_value'
|
30
|
+
require 'mux_ruby/models/broadcast'
|
31
|
+
require 'mux_ruby/models/broadcast_layout'
|
32
|
+
require 'mux_ruby/models/broadcast_resolution'
|
33
|
+
require 'mux_ruby/models/broadcast_response'
|
34
|
+
require 'mux_ruby/models/broadcast_status'
|
30
35
|
require 'mux_ruby/models/create_asset_request'
|
36
|
+
require 'mux_ruby/models/create_broadcast_request'
|
31
37
|
require 'mux_ruby/models/create_live_stream_request'
|
32
38
|
require 'mux_ruby/models/create_playback_id_request'
|
33
39
|
require 'mux_ruby/models/create_playback_id_response'
|
34
40
|
require 'mux_ruby/models/create_playback_restriction_request'
|
35
41
|
require 'mux_ruby/models/create_simulcast_target_request'
|
42
|
+
require 'mux_ruby/models/create_space_request'
|
36
43
|
require 'mux_ruby/models/create_track_request'
|
37
44
|
require 'mux_ruby/models/create_track_response'
|
38
45
|
require 'mux_ruby/models/create_upload_request'
|
@@ -87,6 +94,7 @@ require 'mux_ruby/models/list_real_time_dimensions_response_data'
|
|
87
94
|
require 'mux_ruby/models/list_real_time_metrics_response'
|
88
95
|
require 'mux_ruby/models/list_related_incidents_response'
|
89
96
|
require 'mux_ruby/models/list_signing_keys_response'
|
97
|
+
require 'mux_ruby/models/list_spaces_response'
|
90
98
|
require 'mux_ruby/models/list_uploads_response'
|
91
99
|
require 'mux_ruby/models/list_video_view_exports_response'
|
92
100
|
require 'mux_ruby/models/list_video_views_response'
|
@@ -113,6 +121,12 @@ require 'mux_ruby/models/signing_key'
|
|
113
121
|
require 'mux_ruby/models/signing_key_response'
|
114
122
|
require 'mux_ruby/models/simulcast_target'
|
115
123
|
require 'mux_ruby/models/simulcast_target_response'
|
124
|
+
require 'mux_ruby/models/space'
|
125
|
+
require 'mux_ruby/models/space_response'
|
126
|
+
require 'mux_ruby/models/space_status'
|
127
|
+
require 'mux_ruby/models/space_type'
|
128
|
+
require 'mux_ruby/models/start_space_broadcast_response'
|
129
|
+
require 'mux_ruby/models/stop_space_broadcast_response'
|
116
130
|
require 'mux_ruby/models/track'
|
117
131
|
require 'mux_ruby/models/update_asset_mp4_support_request'
|
118
132
|
require 'mux_ruby/models/update_asset_master_access_request'
|
@@ -141,6 +155,7 @@ require 'mux_ruby/api/metrics_api'
|
|
141
155
|
require 'mux_ruby/api/playback_id_api'
|
142
156
|
require 'mux_ruby/api/playback_restrictions_api'
|
143
157
|
require 'mux_ruby/api/real_time_api'
|
158
|
+
require 'mux_ruby/api/spaces_api'
|
144
159
|
require 'mux_ruby/api/url_signing_keys_api'
|
145
160
|
require 'mux_ruby/api/video_views_api'
|
146
161
|
|
@@ -0,0 +1,149 @@
|
|
1
|
+
=begin
|
2
|
+
#Mux API
|
3
|
+
|
4
|
+
#Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v1
|
7
|
+
Contact: devex@mux.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 5.0.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
|
16
|
+
# Unit tests for MuxRuby::SpacesApi
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
18
|
+
# Please update as you see appropriate
|
19
|
+
describe 'SpacesApi' do
|
20
|
+
before do
|
21
|
+
# run before each test
|
22
|
+
@api_instance = MuxRuby::SpacesApi.new
|
23
|
+
end
|
24
|
+
|
25
|
+
after do
|
26
|
+
# run after each test
|
27
|
+
end
|
28
|
+
|
29
|
+
describe 'test an instance of SpacesApi' do
|
30
|
+
it 'should create an instance of SpacesApi' do
|
31
|
+
expect(@api_instance).to be_instance_of(MuxRuby::SpacesApi)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# unit tests for create_space
|
36
|
+
# Create a space
|
37
|
+
# Create a new space. Spaces are used to build [real-time video applications.](https://mux.com/real-time-video)
|
38
|
+
# @param create_space_request
|
39
|
+
# @param [Hash] opts the optional parameters
|
40
|
+
# @return [SpaceResponse]
|
41
|
+
describe 'create_space test' do
|
42
|
+
it 'should work' do
|
43
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
# unit tests for create_space_broadcast
|
48
|
+
# Create a space broadcast
|
49
|
+
# Creates a new broadcast. Broadcasts are used to create composited versions of your space, which can be broadcast to live streams. **Note:** By default only a single broadcast destination can be specified. Contact Mux support if you need more.
|
50
|
+
# @param space_id The space ID.
|
51
|
+
# @param create_broadcast_request
|
52
|
+
# @param [Hash] opts the optional parameters
|
53
|
+
# @return [BroadcastResponse]
|
54
|
+
describe 'create_space_broadcast test' do
|
55
|
+
it 'should work' do
|
56
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
# unit tests for delete_space
|
61
|
+
# Delete a space
|
62
|
+
# Deletes a space. Spaces can only be deleted when `idle`.
|
63
|
+
# @param space_id The space ID.
|
64
|
+
# @param [Hash] opts the optional parameters
|
65
|
+
# @return [nil]
|
66
|
+
describe 'delete_space test' do
|
67
|
+
it 'should work' do
|
68
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
# unit tests for delete_space_broadcast
|
73
|
+
# Delete a space broadcast
|
74
|
+
# Deletes a single broadcast of a specific space. Broadcasts can only be deleted when `idle`.
|
75
|
+
# @param space_id The space ID.
|
76
|
+
# @param broadcast_id The broadcast ID.
|
77
|
+
# @param [Hash] opts the optional parameters
|
78
|
+
# @return [nil]
|
79
|
+
describe 'delete_space_broadcast test' do
|
80
|
+
it 'should work' do
|
81
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
# unit tests for get_space
|
86
|
+
# Retrieve a space
|
87
|
+
# Retrieves the details of a space that has previously been created. Supply the unique space ID that was returned from your create space request, and Mux will return the information about the corresponding space. The same information is returned when creating a space.
|
88
|
+
# @param space_id The space ID.
|
89
|
+
# @param [Hash] opts the optional parameters
|
90
|
+
# @return [SpaceResponse]
|
91
|
+
describe 'get_space test' do
|
92
|
+
it 'should work' do
|
93
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
97
|
+
# unit tests for get_space_broadcast
|
98
|
+
# Retrieve space broadcast
|
99
|
+
# Retrieves the details of a broadcast of a specific space.
|
100
|
+
# @param space_id The space ID.
|
101
|
+
# @param broadcast_id The broadcast ID.
|
102
|
+
# @param [Hash] opts the optional parameters
|
103
|
+
# @return [BroadcastResponse]
|
104
|
+
describe 'get_space_broadcast test' do
|
105
|
+
it 'should work' do
|
106
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
107
|
+
end
|
108
|
+
end
|
109
|
+
|
110
|
+
# unit tests for list_spaces
|
111
|
+
# List spaces
|
112
|
+
# List all spaces in the current enviroment.
|
113
|
+
# @param [Hash] opts the optional parameters
|
114
|
+
# @option opts [Integer] :limit Number of items to include in the response
|
115
|
+
# @option opts [Integer] :page Offset by this many pages, of the size of `limit`
|
116
|
+
# @return [ListSpacesResponse]
|
117
|
+
describe 'list_spaces test' do
|
118
|
+
it 'should work' do
|
119
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
123
|
+
# unit tests for start_space_broadcast
|
124
|
+
# Start a space broadcast
|
125
|
+
# Starts broadcasting a space to the associated destination.
|
126
|
+
# @param space_id The space ID.
|
127
|
+
# @param broadcast_id The broadcast ID.
|
128
|
+
# @param [Hash] opts the optional parameters
|
129
|
+
# @return [StartSpaceBroadcastResponse]
|
130
|
+
describe 'start_space_broadcast test' do
|
131
|
+
it 'should work' do
|
132
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
133
|
+
end
|
134
|
+
end
|
135
|
+
|
136
|
+
# unit tests for stop_space_broadcast
|
137
|
+
# Stop a space broadcast
|
138
|
+
# Stops broadcasting a space, causing the destination live stream to become idle. This API also automatically calls `complete` on the destination live stream. Broadcasts are also automatically stopped when a space becomes idle.
|
139
|
+
# @param space_id The space ID.
|
140
|
+
# @param broadcast_id The broadcast ID.
|
141
|
+
# @param [Hash] opts the optional parameters
|
142
|
+
# @return [StopSpaceBroadcastResponse]
|
143
|
+
describe 'stop_space_broadcast test' do
|
144
|
+
it 'should work' do
|
145
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
149
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
=begin
|
2
|
+
#Mux API
|
3
|
+
|
4
|
+
#Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v1
|
7
|
+
Contact: devex@mux.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 5.0.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
require 'date'
|
16
|
+
|
17
|
+
# Unit tests for MuxRuby::BroadcastLayout
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
|
+
# Please update as you see appropriate
|
20
|
+
describe MuxRuby::BroadcastLayout do
|
21
|
+
let(:instance) { MuxRuby::BroadcastLayout.new }
|
22
|
+
|
23
|
+
describe 'test an instance of BroadcastLayout' do
|
24
|
+
it 'should create an instance of BroadcastLayout' do
|
25
|
+
expect(instance).to be_instance_of(MuxRuby::BroadcastLayout)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
=begin
|
2
|
+
#Mux API
|
3
|
+
|
4
|
+
#Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v1
|
7
|
+
Contact: devex@mux.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 5.0.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
require 'date'
|
16
|
+
|
17
|
+
# Unit tests for MuxRuby::BroadcastResolution
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
|
+
# Please update as you see appropriate
|
20
|
+
describe MuxRuby::BroadcastResolution do
|
21
|
+
let(:instance) { MuxRuby::BroadcastResolution.new }
|
22
|
+
|
23
|
+
describe 'test an instance of BroadcastResolution' do
|
24
|
+
it 'should create an instance of BroadcastResolution' do
|
25
|
+
expect(instance).to be_instance_of(MuxRuby::BroadcastResolution)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
=begin
|
2
|
+
#Mux API
|
3
|
+
|
4
|
+
#Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v1
|
7
|
+
Contact: devex@mux.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 5.0.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
require 'date'
|
16
|
+
|
17
|
+
# Unit tests for MuxRuby::BroadcastResponse
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
|
+
# Please update as you see appropriate
|
20
|
+
describe MuxRuby::BroadcastResponse do
|
21
|
+
let(:instance) { MuxRuby::BroadcastResponse.new }
|
22
|
+
|
23
|
+
describe 'test an instance of BroadcastResponse' do
|
24
|
+
it 'should create an instance of BroadcastResponse' do
|
25
|
+
expect(instance).to be_instance_of(MuxRuby::BroadcastResponse)
|
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
|