Sha256: 28d807d3bc5a53b458da873adee1741a4c5ca89f85a50aefe60b0b7a64d3a929

Contents?: true

Size: 784 Bytes

Versions: 13

Compression:

Stored size: 784 Bytes

Contents

#!/usr/bin/env ruby

require 'mux_ruby'
require 'solid_assert'

SolidAssert.enable_assertions

# Authentication Setup
openapi = MuxRuby.configure do |config|
  config.username = ENV['MUX_TOKEN_ID']
  config.password = ENV['MUX_TOKEN_SECRET']
end

# API Client Initialization
views_api = MuxRuby::VideoViewsApi.new

# ========== list-video-views ==========
video_views = views_api.list_video_views()
assert video_views != nil
assert video_views.data != nil
assert video_views.data.first != nil
assert video_views.data.first.id != nil
puts "list-video_views OK ✅"

# ========== get-video-view ==========
view = views_api.get_video_view(video_views.data.first.id)
assert view != nil
assert view.data != nil
assert view.data.id == video_views.data.first.id
puts "get-video-view OK ✅"

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
mux_ruby-3.20.0 examples/data/exercise-video-views.rb
mux_ruby-3.19.0 examples/data/exercise-video-views.rb
mux_ruby-3.18.0 examples/data/exercise-video-views.rb
mux_ruby-3.17.0 examples/data/exercise-video-views.rb
mux_ruby-3.15.0 examples/data/exercise-video-views.rb
mux_ruby-3.14.0 examples/data/exercise-video-views.rb
mux_ruby-3.13.0 examples/data/exercise-video-views.rb
mux_ruby-3.12.0 examples/data/exercise-video-views.rb
mux_ruby-3.11.1 examples/data/exercise-video-views.rb
mux_ruby-3.11.0 examples/data/exercise-video-views.rb
mux_ruby-3.9.0 examples/data/exercise-video-views.rb
mux_ruby-3.8.0 examples/data/exercise-video-views.rb
mux_ruby-3.7.0 examples/data/exercise-video-views.rb