Six4Win.WebApi

<back to all web services

GetGameConfig

The following routes are available for this service:
All Verbs/qry/config/game
# frozen_string_literal: true
# encoding: utf-8


require 'json'
require 'servicestack'


module RTPStrategies
    RNG = 0
    ACCUMULATOR = 1
end

class CountdownConfiguration
    include ServiceStack::DTO

    # @return [Integer]
    attr_accessor :lockdown_step_from_end
    # @return [Integer]
    attr_accessor :assert_lockdown_step_from_end

    def self.properties
        {
            lockdown_step_from_end: { name: 'lockdownStepFromEnd' },
            assert_lockdown_step_from_end: { name: 'assertLockdownStepFromEnd' },
        }
    end

end

class DrawConfiguration
    include ServiceStack::DTO

    # @return [Integer]
    attr_accessor :intro_interval_in_ms
    # @return [Integer]
    attr_accessor :animation_interval_in_ms
    # @return [Integer]
    attr_accessor :outro_interval_in_ms

    def self.properties
        {
            intro_interval_in_ms: { name: 'introIntervalInMs' },
            animation_interval_in_ms: { name: 'animationIntervalInMs' },
            outro_interval_in_ms: { name: 'outroIntervalInMs' },
        }
    end

end

class HappyHourConfiguration
    include ServiceStack::DTO

    # @return [TrueClass]
    attr_accessor :is_happy_hour
    # @return [BigDecimal]
    attr_accessor :odds_modifier
    # @return [BigDecimal]
    attr_accessor :round_pool_bonus_pct
    # @return [TrueClass]
    attr_accessor :use_only_round_pool_with_no_optimizations
    # @return [TrueClass]
    attr_accessor :override_syphon_combination_count_per_round_threshold
    # @return [BigDecimal]
    attr_accessor :syphon_combination_count_per_round_threshold_pct_override

    def self.properties
        {
            is_happy_hour: { name: 'isHappyHour' },
            odds_modifier: { name: 'oddsModifier' },
            round_pool_bonus_pct: { name: 'roundPoolBonusPct' },
            use_only_round_pool_with_no_optimizations: { name: 'useOnlyRoundPoolWithNoOptimizations' },
            override_syphon_combination_count_per_round_threshold: { name: 'overrideSyphonCombinationCountPerRoundThreshold' },
            syphon_combination_count_per_round_threshold_pct_override: { name: 'syphonCombinationCountPerRoundThresholdPctOverride' },
        }
    end

end

class RoundConfiguration
    include ServiceStack::DTO

    # @return [RecordList]
    attr_accessor :coefficients
    # @return [TrueClass]
    attr_accessor :is_double_triple_active
    # @return [TrueClass]
    attr_accessor :is_jackpot5_active
    # @return [Integer]
    attr_accessor :countdown_duration_in_seconds
    # @return [CountdownConfiguration]
    attr_accessor :countdown_configuration
    # @return [DrawConfiguration]
    attr_accessor :draw_configuration
    # @return [Integer]
    attr_accessor :results_duration_in_seconds
    # @return [RTPStrategies]
    attr_accessor :rtp_strategy
    # @return [HappyHourConfiguration]
    attr_accessor :happy_hour_configuration

    def self.properties
        {
            coefficients: { name: 'coefficients', type: RecordList },
            is_double_triple_active: { name: 'isDoubleTripleActive' },
            is_jackpot5_active: { name: 'isJackpot5Active' },
            countdown_duration_in_seconds: { name: 'countdownDurationInSeconds' },
            countdown_configuration: { name: 'countdownConfiguration', type: CountdownConfiguration },
            draw_configuration: { name: 'drawConfiguration', type: DrawConfiguration },
            results_duration_in_seconds: { name: 'resultsDurationInSeconds' },
            rtp_strategy: { name: 'rtpStrategy' },
            happy_hour_configuration: { name: 'happyHourConfiguration', type: HappyHourConfiguration },
        }
    end

end

class TimePoint
    include ServiceStack::DTO

    # @return [Integer]
    attr_accessor :hour
    # @return [Integer]
    attr_accessor :minute

    def self.properties
        {
            hour: { name: 'hour' },
            minute: { name: 'minute' },
        }
    end

end

class TimeInterval
    include ServiceStack::DTO

    # @return [TimePoint]
    attr_accessor :start
    # @return [TimePoint]
    attr_accessor :end

    def self.properties
        {
            start: { name: 'start', type: TimePoint },
            end: { name: 'end', type: TimePoint },
        }
    end

end

class HappyHourItem
    include ServiceStack::DTO

    # @return [Integer]
    attr_accessor :id
    # @return [TimeInterval]
    attr_accessor :interval
    # @return [BigDecimal]
    attr_accessor :odds_modifier
    # @return [BigDecimal]
    attr_accessor :round_pool_bonus_pct

    def self.properties
        {
            id: { name: 'id' },
            interval: { name: 'interval', type: TimeInterval },
            odds_modifier: { name: 'oddsModifier' },
            round_pool_bonus_pct: { name: 'roundPoolBonusPct' },
        }
    end

end

class HappyHourConfig
    include ServiceStack::DTO

    # @return [TrueClass]
    attr_accessor :is_active
    # @return [List]
    attr_accessor :items
    # @return [TrueClass]
    attr_accessor :use_only_round_pool_with_no_optimizations
    # @return [TrueClass]
    attr_accessor :override_syphon_combination_count_per_round_threshold
    # @return [BigDecimal]
    attr_accessor :syphon_combination_count_per_round_threshold_pct_override

    def self.properties
        {
            is_active: { name: 'isActive' },
            items: { name: 'items', type: [HappyHourItem] },
            use_only_round_pool_with_no_optimizations: { name: 'useOnlyRoundPoolWithNoOptimizations' },
            override_syphon_combination_count_per_round_threshold: { name: 'overrideSyphonCombinationCountPerRoundThreshold' },
            syphon_combination_count_per_round_threshold_pct_override: { name: 'syphonCombinationCountPerRoundThresholdPctOverride' },
        }
    end

end

class GameConfiguration
    include ServiceStack::DTO

    # @return [String]
    attr_accessor :id
    # @return [Integer]
    attr_accessor :queue_size
    # @return [RoundConfiguration]
    attr_accessor :round_configuration
    # @return [HappyHourConfig]
    attr_accessor :happy_hour_config

    def self.properties
        {
            id: { name: 'id' },
            queue_size: { name: 'queueSize' },
            round_configuration: { name: 'roundConfiguration', type: RoundConfiguration },
            happy_hour_config: { name: 'happyHourConfig', type: HappyHourConfig },
        }
    end

end

class GetGameConfig
    include ServiceStack::DTO

    # @return [String]
    attr_accessor :location_id

    def self.properties
        {
            location_id: { name: 'locationId' },
        }
    end

    def response_type() = GameConfiguration
    def get_type_name() = 'GetGameConfig'
end

class RecordList < Array
end

Ruby GetGameConfig DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /qry/config/game HTTP/1.1 
Host: s4w1.api.bettor.webhop.biz 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	locationId: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	id: String,
	queueSize: 0,
	roundConfiguration: 
	{
		coefficients: 
		[
			0
		],
		isDoubleTripleActive: False,
		isJackpot5Active: False,
		countdownDurationInSeconds: 0,
		countdownConfiguration: 
		{
			lockdownStepFromEnd: 0,
			assertLockdownStepFromEnd: 0
		},
		drawConfiguration: 
		{
			introIntervalInMs: 0,
			animationIntervalInMs: 0,
			outroIntervalInMs: 0
		},
		resultsDurationInSeconds: 0,
		rtpStrategy: 0,
		happyHourConfiguration: 
		{
			isHappyHour: False,
			oddsModifier: 0,
			roundPoolBonusPct: 0,
			useOnlyRoundPoolWithNoOptimizations: False,
			overrideSyphonCombinationCountPerRoundThreshold: False,
			syphonCombinationCountPerRoundThresholdPctOverride: 0
		}
	},
	happyHourConfig: 
	{
		isActive: False,
		items: 
		[
			{
				id: 0,
				interval: 
				{
					start: 
					{
						hour: 0,
						minute: 0
					},
					end: 
					{
						hour: 0,
						minute: 0
					}
				},
				oddsModifier: 0,
				roundPoolBonusPct: 0
			}
		],
		useOnlyRoundPoolWithNoOptimizations: False,
		overrideSyphonCombinationCountPerRoundThreshold: False,
		syphonCombinationCountPerRoundThresholdPctOverride: 0
	}
}