| All Verbs | /qry/config/game |
|---|
import Foundation
import ServiceStack
public class GetGameConfig : Codable
{
public var locationId:String
required public init(){}
}
public class GameConfiguration : Codable
{
public var id:String
public var queueSize:Int
public var roundConfiguration:RoundConfiguration
public var happyHourConfig:HappyHourConfig
required public init(){}
}
public class RoundConfiguration : Codable
{
public var coefficients:RecordList<Float>
public var isDoubleTripleActive:Bool
public var isJackpot5Active:Bool
public var countdownDurationInSeconds:Int
public var countdownConfiguration:CountdownConfiguration
public var drawConfiguration:DrawConfiguration
public var resultsDurationInSeconds:Int
public var rtpStrategy:RTPStrategies
public var happyHourConfiguration:HappyHourConfiguration
required public init(){}
}
public class RecordList<T : Codable> : List<T>
{
required public init(){ super.init() }
required public init(from decoder: Decoder) throws {
try super.init(from: decoder)
}
public override func encode(to encoder: Encoder) throws {
try super.encode(to: encoder)
}
}
public class CountdownConfiguration : Codable
{
public var lockdownStepFromEnd:Int
public var assertLockdownStepFromEnd:Int
required public init(){}
}
public class DrawConfiguration : Codable
{
public var introIntervalInMs:Int
public var animationIntervalInMs:Int
public var outroIntervalInMs:Int
required public init(){}
}
public enum RTPStrategies : Int, Codable
{
case RNG = 0
case Accumulator = 1
}
public class HappyHourConfiguration : Codable
{
public var isHappyHour:Bool
public var oddsModifier:Double
public var roundPoolBonusPct:Double
required public init(){}
}
public class HappyHourConfig : Codable
{
public var isActive:Bool
public var items:[HappyHourItem]
required public init(){}
}
public class HappyHourItem : Codable
{
public var id:Int
@TimeSpan public var interval:TimeInterval
public var oddsModifier:Double
public var roundPoolBonusPct:Double
required public init(){}
}
public class TimeInterval : Codable
{
public var start:TimePoint
public var end:TimePoint
required public init(){}
}
public class TimePoint : Codable
{
public var hour:Int
public var minute:Int
required public init(){}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=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: s4w2.api.bettor.cc
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
}
},
happyHourConfig:
{
isActive: False,
items:
[
{
id: 0,
interval:
{
start:
{
hour: 0,
minute: 0
},
end:
{
hour: 0,
minute: 0
}
},
oddsModifier: 0,
roundPoolBonusPct: 0
}
]
}
}