Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.18.0 #83

Merged
merged 6 commits into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -381,10 +381,6 @@ lib/mux_ruby/models/web_input.rb
lib/mux_ruby/models/web_input_response.rb
lib/mux_ruby/version.rb
mux_ruby.gemspec
spec/api/drm_configurations_api_spec.rb
spec/api_client_spec.rb
spec/configuration_spec.rb
spec/models/drm_configuration_response_spec.rb
spec/models/drm_configuration_spec.rb
spec/models/list_drm_configurations_response_spec.rb
spec/spec_helper.rb
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ group :development, :test do
gem 'rake', '~> 13.0.1'
gem 'pry-byebug'
gem 'rubocop', '~> 0.66.0'
gem 'jaro_winkler', '~>1.5.6'

gem 'solid_assert'
end
5 changes: 3 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
mux_ruby (3.17.0)
mux_ruby (3.18.0)
typhoeus (~> 1.0, >= 1.0.1)

GEM
Expand All @@ -14,7 +14,7 @@ GEM
ethon (0.16.0)
ffi (>= 1.15.0)
ffi (1.16.3)
jaro_winkler (1.5.4)
jaro_winkler (1.5.6)
method_source (1.0.0)
parallel (1.22.1)
parser (3.1.2.0)
Expand Down Expand Up @@ -61,6 +61,7 @@ PLATFORMS
ruby

DEPENDENCIES
jaro_winkler (~> 1.5.6)
mux_ruby!
pry-byebug
rake (~> 13.0.1)
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Not familiar with Mux? Check out https://mux.com/ for more information.
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: v1
- Package version: 3.17.0
- Package version: 3.18.0
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
For more information, please visit [https://docs.mux.com](https://docs.mux.com)

Expand All @@ -40,16 +40,16 @@ gem build mux_ruby.gemspec
Then either install the gem locally:

```shell
gem install ./mux_ruby-3.17.0.gem
gem install ./mux_ruby-3.18.0.gem
```

(for development, run `gem install --dev ./mux_ruby-3.17.0.gem` to install the development dependencies)
(for development, run `gem install --dev ./mux_ruby-3.18.0.gem` to install the development dependencies)

or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).

Finally add this to the Gemfile:

gem 'mux_ruby', '~> 3.17.0'
gem 'mux_ruby', '~> 3.18.0'

### Install from Git

Expand Down
4 changes: 3 additions & 1 deletion docs/Asset.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
| **max_stored_resolution** | **String** | This field is deprecated. Please use `resolution_tier` instead. The maximum resolution that has been stored for the asset. The asset may be delivered at lower resolutions depending on the device and bandwidth, however it cannot be delivered at a higher value than is stored. | [optional] |
| **resolution_tier** | **String** | The resolution tier that the asset was ingested at, affecting billing for ingest & storage. This field also represents the highest resolution tier that the content can be delivered at, however the actual resolution may be lower depending on the device, bandwidth, and exact resolution of the uploaded asset. | [optional] |
| **max_resolution_tier** | **String** | Max resolution tier can be used to control the maximum `resolution_tier` your asset is encoded, stored, and streamed at. If not set, this defaults to `1080p`. | [optional] |
| **encoding_tier** | **String** | The encoding tier informs the cost, quality, and available platform features for the asset. By default the `smart` encoding tier is used. [See the guide for more details.](https://docs.mux.com/guides/use-encoding-tiers) | [optional] |
| **encoding_tier** | **String** | This field is deprecated. Please use `video_quality` instead. The encoding tier informs the cost, quality, and available platform features for the asset. By default the `smart` encoding tier is used. [See the video quality guide for more details.](https://docs.mux.com/guides/use-encoding-tiers) | [optional] |
| **video_quality** | **String** | The video quality controls the cost, quality, and available platform features for the asset. By default the `plus` video quality is used. This field replaces the deprecated `encoding_tier` value. [See the video quality guide for more details.](https://docs.mux.com/guides/use-encoding-tiers) | [optional] |
| **max_stored_frame_rate** | **Float** | The maximum frame rate that has been stored for the asset. The asset may be delivered at lower frame rates depending on the device and bandwidth, however it cannot be delivered at a higher value than is stored. This field may return -1 if the frame rate of the input cannot be reliably determined. | [optional] |
| **aspect_ratio** | **String** | The aspect ratio of the asset in the form of `width:height`, for example `16:9`. | [optional] |
| **playback_ids** | [**Array<PlaybackID>**](PlaybackID.md) | An array of Playback ID objects. Use these to create HLS playback URLs. See [Play your videos](https://docs.mux.com/guides/play-your-videos) for more details. | [optional] |
Expand Down Expand Up @@ -47,6 +48,7 @@ instance = MuxRuby::Asset.new(
resolution_tier: null,
max_resolution_tier: null,
encoding_tier: null,
video_quality: null,
max_stored_frame_rate: null,
aspect_ratio: null,
playback_ids: null,
Expand Down
6 changes: 4 additions & 2 deletions docs/CreateAssetRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
| **master_access** | **String** | Specify what level (if any) of support for master access. Master access can be enabled temporarily for your asset to be downloaded. See the [Download your videos guide](https://docs.mux.com/guides/enable-static-mp4-renditions) for more information. | [optional] |
| **test** | **Boolean** | Marks the asset as a test asset when the value is set to true. A Test asset can help evaluate the Mux Video APIs without incurring any cost. There is no limit on number of test assets created. Test asset are watermarked with the Mux logo, limited to 10 seconds, deleted after 24 hrs. | [optional] |
| **max_resolution_tier** | **String** | Max resolution tier can be used to control the maximum `resolution_tier` your asset is encoded, stored, and streamed at. If not set, this defaults to `1080p`. | [optional] |
| **encoding_tier** | **String** | The encoding tier informs the cost, quality, and available platform features for the asset. By default the `smart` encoding tier is used. [See the guide for more details.](https://docs.mux.com/guides/use-encoding-tiers) | [optional] |
| **encoding_tier** | **String** | This field is deprecated. Please use `video_quality` instead. The encoding tier informs the cost, quality, and available platform features for the asset. By default the `smart` encoding tier is used. [See the video quality guide for more details.](https://docs.mux.com/guides/use-encoding-tiers) | [optional] |
| **video_quality** | **String** | The video quality controls the cost, quality, and available platform features for the asset. By default the `plus` video quality is used. This field replaces the deprecated `encoding_tier` value. [See the video quality guide for more details.](https://docs.mux.com/guides/use-encoding-tiers) | [optional] |

## Example

Expand All @@ -32,7 +33,8 @@ instance = MuxRuby::CreateAssetRequest.new(
master_access: null,
test: null,
max_resolution_tier: null,
encoding_tier: null
encoding_tier: null,
video_quality: null
)
```

4 changes: 3 additions & 1 deletion docs/DeliveryReport.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
| **asset_state** | **String** | The state of the asset. | [optional] |
| **asset_duration** | **Float** | The duration of the asset in seconds. | [optional] |
| **asset_resolution_tier** | **String** | The resolution tier that the asset was ingested at, affecting billing for ingest & storage | [optional] |
| **asset_encoding_tier** | **String** | The encoding tier that the asset was ingested at. [See the encoding tiers guide for more details.](https://docs.mux.com/guides/use-encoding-tiers) | [optional] |
| **asset_encoding_tier** | **String** | This field is deprecated. Please use `asset_video_quality` instead. The encoding tier that the asset was ingested at. [See the video quality guide for more details.](https://docs.mux.com/guides/use-encoding-tiers) | [optional] |
| **asset_video_quality** | **String** | The video quality that the asset was ingested at. This field replaces `asset_encoding_tier`. [See the video quality guide for more details.](https://docs.mux.com/guides/use-encoding-tiers) | [optional] |
| **delivered_seconds** | **Float** | Total number of delivered seconds during this time window. | [optional] |
| **delivered_seconds_by_resolution** | [**DeliveryReportDeliveredSecondsByResolution**](DeliveryReportDeliveredSecondsByResolution.md) | | [optional] |

Expand All @@ -31,6 +32,7 @@ instance = MuxRuby::DeliveryReport.new(
asset_duration: null,
asset_resolution_tier: null,
asset_encoding_tier: null,
asset_video_quality: null,
delivered_seconds: null,
delivered_seconds_by_resolution: null
)
Expand Down
2 changes: 1 addition & 1 deletion gen/generator-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
"gemSourceLocation": "https://github.com/muxinc/mux-ruby",
"gemLicense": "MIT",
"moduleName": "MuxRuby",
"gemVersion": "3.17.0"
"gemVersion": "3.18.0"
}
2 changes: 1 addition & 1 deletion gen/templates/README.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Its up to you to manage your token and secret. In our examples, we read them fro
### Example Usage
Below is a quick example of using Mux Ruby to list the Video assets stored in your Mux account.

Be sure to also checkout the [exmples directory](examples/):
Be sure to also checkout the [examples directory](examples/):
* [List Assets, Live Streams, Signing Keys, and Uploads.](examples/video/list-everything.rb)
* [Create an Asset, wait for it to become availiable, and print its playback URL](examples/video/ingest.rb)
* [Create a new Live Stream and retrieve its Stream key.](examples/video/create-live-stream.rb)
Expand Down
26 changes: 24 additions & 2 deletions lib/mux_ruby/models/asset.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,12 @@ class Asset
# Max resolution tier can be used to control the maximum `resolution_tier` your asset is encoded, stored, and streamed at. If not set, this defaults to `1080p`.
attr_accessor :max_resolution_tier

# The encoding tier informs the cost, quality, and available platform features for the asset. By default the `smart` encoding tier is used. [See the guide for more details.](https://docs.mux.com/guides/use-encoding-tiers)
# This field is deprecated. Please use `video_quality` instead. The encoding tier informs the cost, quality, and available platform features for the asset. By default the `smart` encoding tier is used. [See the video quality guide for more details.](https://docs.mux.com/guides/use-encoding-tiers)
attr_accessor :encoding_tier

# The video quality controls the cost, quality, and available platform features for the asset. By default the `plus` video quality is used. This field replaces the deprecated `encoding_tier` value. [See the video quality guide for more details.](https://docs.mux.com/guides/use-encoding-tiers)
attr_accessor :video_quality

# The maximum frame rate that has been stored for the asset. The asset may be delivered at lower frame rates depending on the device and bandwidth, however it cannot be delivered at a higher value than is stored. This field may return -1 if the frame rate of the input cannot be reliably determined.
attr_accessor :max_stored_frame_rate

Expand Down Expand Up @@ -125,6 +128,7 @@ def self.attribute_map
:'resolution_tier' => :'resolution_tier',
:'max_resolution_tier' => :'max_resolution_tier',
:'encoding_tier' => :'encoding_tier',
:'video_quality' => :'video_quality',
:'max_stored_frame_rate' => :'max_stored_frame_rate',
:'aspect_ratio' => :'aspect_ratio',
:'playback_ids' => :'playback_ids',
Expand Down Expand Up @@ -164,6 +168,7 @@ def self.openapi_types
:'resolution_tier' => :'String',
:'max_resolution_tier' => :'String',
:'encoding_tier' => :'String',
:'video_quality' => :'String',
:'max_stored_frame_rate' => :'Float',
:'aspect_ratio' => :'String',
:'playback_ids' => :'Array<PlaybackID>',
Expand Down Expand Up @@ -240,6 +245,10 @@ def initialize(attributes = {})
self.encoding_tier = attributes[:'encoding_tier']
end

if attributes.key?(:'video_quality')
self.video_quality = attributes[:'video_quality']
end

if attributes.key?(:'max_stored_frame_rate')
self.max_stored_frame_rate = attributes[:'max_stored_frame_rate']
end
Expand Down Expand Up @@ -353,6 +362,8 @@ def valid?
return false unless max_resolution_tier_validator.valid?(@max_resolution_tier)
encoding_tier_validator = EnumAttributeValidator.new('String', ["smart", "baseline"])
return false unless encoding_tier_validator.valid?(@encoding_tier)
video_quality_validator = EnumAttributeValidator.new('String', ["basic", "plus"])
return false unless video_quality_validator.valid?(@video_quality)
master_access_validator = EnumAttributeValidator.new('String', ["temporary", "none"])
return false unless master_access_validator.valid?(@master_access)
mp4_support_validator = EnumAttributeValidator.new('String', ["standard", "none", "capped-1080p", "audio-only", "audio-only,capped-1080p"])
Expand Down Expand Up @@ -412,6 +423,16 @@ def encoding_tier=(encoding_tier)
@encoding_tier = encoding_tier
end

# Custom attribute writer method checking allowed values (enum).
# @param [Object] video_quality Object to be assigned
def video_quality=(video_quality)
validator = EnumAttributeValidator.new('String', ["basic", "plus"])
unless validator.valid?(video_quality)
fail ArgumentError, "invalid value for \"video_quality\", must be one of #{validator.allowable_values}."
end
@video_quality = video_quality
end

# Custom attribute writer method checking allowed values (enum).
# @param [Object] master_access Object to be assigned
def master_access=(master_access)
Expand Down Expand Up @@ -455,6 +476,7 @@ def ==(o)
resolution_tier == o.resolution_tier &&
max_resolution_tier == o.max_resolution_tier &&
encoding_tier == o.encoding_tier &&
video_quality == o.video_quality &&
max_stored_frame_rate == o.max_stored_frame_rate &&
aspect_ratio == o.aspect_ratio &&
playback_ids == o.playback_ids &&
Expand Down Expand Up @@ -486,7 +508,7 @@ def eql?(o)
# Calculates hash code according to all attributes.
# @return [Integer] Hash code
def hash
[id, created_at, status, duration, max_stored_resolution, resolution_tier, max_resolution_tier, encoding_tier, max_stored_frame_rate, aspect_ratio, playback_ids, tracks, errors, per_title_encode, upload_id, is_live, passthrough, live_stream_id, master, master_access, mp4_support, source_asset_id, normalize_audio, static_renditions, recording_times, non_standard_input_reasons, test, ingest_type].hash
[id, created_at, status, duration, max_stored_resolution, resolution_tier, max_resolution_tier, encoding_tier, video_quality, max_stored_frame_rate, aspect_ratio, playback_ids, tracks, errors, per_title_encode, upload_id, is_live, passthrough, live_stream_id, master, master_access, mp4_support, source_asset_id, normalize_audio, static_renditions, recording_times, non_standard_input_reasons, test, ingest_type].hash
end

# Builds the object from hash
Expand Down
32 changes: 27 additions & 5 deletions lib/mux_ruby/models/create_asset_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,12 @@ class CreateAssetRequest
# Max resolution tier can be used to control the maximum `resolution_tier` your asset is encoded, stored, and streamed at. If not set, this defaults to `1080p`.
attr_accessor :max_resolution_tier

# The encoding tier informs the cost, quality, and available platform features for the asset. By default the `smart` encoding tier is used. [See the guide for more details.](https://docs.mux.com/guides/use-encoding-tiers)
# This field is deprecated. Please use `video_quality` instead. The encoding tier informs the cost, quality, and available platform features for the asset. By default the `smart` encoding tier is used. [See the video quality guide for more details.](https://docs.mux.com/guides/use-encoding-tiers)
attr_accessor :encoding_tier

# The video quality controls the cost, quality, and available platform features for the asset. By default the `plus` video quality is used. This field replaces the deprecated `encoding_tier` value. [See the video quality guide for more details.](https://docs.mux.com/guides/use-encoding-tiers)
attr_accessor :video_quality

class EnumAttributeValidator
attr_reader :datatype
attr_reader :allowable_values
Expand Down Expand Up @@ -82,7 +85,8 @@ def self.attribute_map
:'master_access' => :'master_access',
:'test' => :'test',
:'max_resolution_tier' => :'max_resolution_tier',
:'encoding_tier' => :'encoding_tier'
:'encoding_tier' => :'encoding_tier',
:'video_quality' => :'video_quality'
}
end

Expand All @@ -104,7 +108,8 @@ def self.openapi_types
:'master_access' => :'String',
:'test' => :'Boolean',
:'max_resolution_tier' => :'String',
:'encoding_tier' => :'String'
:'encoding_tier' => :'String',
:'video_quality' => :'String'
}
end

Expand Down Expand Up @@ -180,6 +185,10 @@ def initialize(attributes = {})
if attributes.key?(:'encoding_tier')
self.encoding_tier = attributes[:'encoding_tier']
end

if attributes.key?(:'video_quality')
self.video_quality = attributes[:'video_quality']
end
end

# Show invalid properties with the reasons. Usually used together with valid?
Expand All @@ -200,6 +209,8 @@ def valid?
return false unless max_resolution_tier_validator.valid?(@max_resolution_tier)
encoding_tier_validator = EnumAttributeValidator.new('String', ["smart", "baseline"])
return false unless encoding_tier_validator.valid?(@encoding_tier)
video_quality_validator = EnumAttributeValidator.new('String', ["basic", "plus"])
return false unless video_quality_validator.valid?(@video_quality)
true
end

Expand Down Expand Up @@ -243,6 +254,16 @@ def encoding_tier=(encoding_tier)
@encoding_tier = encoding_tier
end

# Custom attribute writer method checking allowed values (enum).
# @param [Object] video_quality Object to be assigned
def video_quality=(video_quality)
validator = EnumAttributeValidator.new('String', ["basic", "plus"])
unless validator.valid?(video_quality)
fail ArgumentError, "invalid value for \"video_quality\", must be one of #{validator.allowable_values}."
end
@video_quality = video_quality
end

# Checks equality by comparing each attribute.
# @param [Object] Object to be compared
def ==(o)
Expand All @@ -258,7 +279,8 @@ def ==(o)
master_access == o.master_access &&
test == o.test &&
max_resolution_tier == o.max_resolution_tier &&
encoding_tier == o.encoding_tier
encoding_tier == o.encoding_tier &&
video_quality == o.video_quality
end

# @see the `==` method
Expand All @@ -270,7 +292,7 @@ def eql?(o)
# Calculates hash code according to all attributes.
# @return [Integer] Hash code
def hash
[input, playback_policy, advanced_playback_policies, per_title_encode, passthrough, mp4_support, normalize_audio, master_access, test, max_resolution_tier, encoding_tier].hash
[input, playback_policy, advanced_playback_policies, per_title_encode, passthrough, mp4_support, normalize_audio, master_access, test, max_resolution_tier, encoding_tier, video_quality].hash
end

# Builds the object from hash
Expand Down
Loading
Loading