Sha256: e562e9e4707e62cf9fd9108f318b6ce1c92eba3bae91c7d68a5a0292da8627cc

Contents?: true

Size: 811 Bytes

Versions: 31

Compression:

Stored size: 811 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
dimensions_api = MuxRuby::DimensionsApi.new

# ========== list-dimensions ==========
dimensions = dimensions_api.list_dimensions()
assert dimensions != nil
assert dimensions.data != nil
assert dimensions.data.basic != nil
assert dimensions.data.advanced != nil
puts "list-dimensions OK ✅"

# ========== list-dimension-values ==========
dimension_values = dimensions_api.list_dimension_values("browser", {:timeframe => ['7:days']})
assert dimension_values != nil
assert dimension_values.data != nil
puts "list-dimension-values OK ✅"

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
mux_ruby-3.2.0 examples/data/exercise-dimensions.rb
mux_ruby-3.1.0 examples/data/exercise-dimensions.rb
mux_ruby-3.0.0 examples/data/exercise-dimensions.rb
mux_ruby-2.2.0 examples/data/exercise-dimensions.rb
mux_ruby-2.1.1 examples/data/exercise-dimensions.rb
mux_ruby-2.1.0 examples/data/exercise-dimensions.rb
mux_ruby-2.0.0 examples/data/exercise-dimensions.rb
mux_ruby-2.0.0.pre.rc.2 examples/data/exercise-dimensions.rb
mux_ruby-2.0.0.pre.rc.1 examples/data/exercise-dimensions.rb
mux_ruby-1.9.0 examples/data/exercise-dimensions.rb
mux_ruby-1.8.1 examples/data/exercise-dimensions.rb