| All Verbs | /qry/feed |
|---|
import Foundation
import ServiceStack
public class GetFeed : Codable
{
required public init(){}
}
public class Feed : Codable
{
public var id:String
public var round:Round
public var lastJackpot5Info:Jackpot5Info
public var superWinInfo:SuperWinInfo
public var globalCodePotInfo:GlobalCodePotInfo
required public init(){}
}
public class Round : Codable
{
public var id:String
public var createdAt:Date
public var updatedAt:Date
public var shouldStartAtUtc:Date
public var startedAtUtc:Date
public var status:RoundStatus
public var configuration:RoundConfiguration
public var sequence:String
public var jackpot5Info:Jackpot5Info
public var superWinInfo:SuperWinInfo
public var globalCodePotInfo:GlobalCodePotInfo
public var progress:RoundProgress
public var isLocked:Bool
public var isCalculated:Bool
required public init(){}
}
public enum RoundStatus : Int, Codable
{
case Pending = 0
case InProgress = 1
case Ended = 2
}
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 Jackpot5Info : Codable
{
public var isHit:Bool
public var amountAccumulated:Double
public var amountAwarded:Double
public var nrOfWinners:Int
public var jackPot5Winners:[JackPot5Winner]
required public init(){}
}
public class JackPot5Winner : Codable
{
public var betId:String
public var nrOfCombinations:Int
public var winningsAmount:Double
public var origin:Origin
public var bettor:Ref
public var payload:[String:String]
required public init(){}
}
public class Origin : Codable
{
public var application:BettingApp
public var ip:String
public var organization:RefEx
public var region:Ref
public var locationGroup:Ref
public var location:RefEx
public var device:RefEx
public var clerk:Ref
required public init(){}
}
public class BettingApp : Codable
{
public var name:String
public var version:String
required public init(){}
}
public class RefEx : Ref
{
public var data:RecordDictionary<String, String>
required public init(){ super.init() }
private enum CodingKeys : String, CodingKey {
case data
}
required public init(from decoder: Decoder) throws {
try super.init(from: decoder)
let container = try decoder.container(keyedBy: CodingKeys.self)
data = try container.decodeIfPresent(RecordDictionary<String, String>.self, forKey: .data)
}
public override func encode(to encoder: Encoder) throws {
try super.encode(to: encoder)
var container = encoder.container(keyedBy: CodingKeys.self)
if data != nil { try container.encode(data, forKey: .data) }
}
}
public class Ref : Codable
{
public var id:String
public var val:String
required public init(){}
}
public class RecordDictionary<TKey : Codable, TVal : Codable> : List<TKey:TVal>
{
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 SuperWinInfo : Codable
{
public var isActive:Bool
public var winner:SuperWinWinner
public var availableAmount:Double
public var allPrizesAwarded:Bool
required public init(){}
}
public class SuperWinWinner : Codable
{
public var isDrawn:Bool
public var drawnAtUtc:Date
public var roundId:String
public var betId:String
public var slipId:String
public var origin:Origin
public var bettor:Ref
public var code:String
public var amount:Double
public var locationAddressOrBettorInfo:String
required public init(){}
}
public class GlobalCodePotInfo : Codable
{
public var isActive:Bool
public var isDrawn:Bool
public var winner:WinnerByCode
public var inertCode:String
public var accumulation:Double
required public init(){}
}
public class WinnerByCode : Codable
{
public var roundId:String
public var drawnAtUtc:Date
public var slipId:String
public var betId:String
public var code:String
public var amount:Double
public var origin:Origin
public var bettor:Ref
public var locationAddressOrBettorInfo:String
required public init(){}
}
public class RoundProgress : Codable
{
public var stage:Stages
public var step:Int
public var steps:Int
public var utcTimestamp:Date
required public init(){}
}
public enum Stages : Int, Codable
{
case None = 0
case Countdown = 1
case Processing = 2
case Draw = 3
case Results = 4
}
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/feed HTTP/1.1
Host: s4w2.api.bettor.cc
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
id: String,
round:
{
id: String,
createdAt: 0001-01-01,
updatedAt: 0001-01-01,
shouldStartAtUtc: 0001-01-01,
startedAtUtc: 0001-01-01,
status: 0,
configuration:
{
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
}
},
sequence: String,
jackpot5Info:
{
isHit: False,
amountAccumulated: 0,
amountAwarded: 0,
nrOfWinners: 0,
jackPot5Winners:
[
{
betId: String,
nrOfCombinations: 0,
winningsAmount: 0,
origin:
{
application:
{
name: String,
version: String
},
ip: String,
organization:
{
data:
{
String: String
},
id: String,
val: String
},
region:
{
id: String,
val: String
},
locationGroup:
{
id: String,
val: String
},
location:
{
data:
{
String: String
},
id: String,
val: String
},
device:
{
data:
{
String: String
},
id: String,
val: String
},
clerk:
{
id: String,
val: String
}
},
bettor:
{
id: String,
val: String
},
payload:
{
String: String
}
}
]
},
superWinInfo:
{
isActive: False,
winner:
{
isDrawn: False,
drawnAtUtc: 0001-01-01,
roundId: String,
betId: String,
slipId: String,
origin:
{
application:
{
name: String,
version: String
},
ip: String,
organization:
{
data:
{
String: String
},
id: String,
val: String
},
region:
{
id: String,
val: String
},
locationGroup:
{
id: String,
val: String
},
location:
{
data:
{
String: String
},
id: String,
val: String
},
device:
{
data:
{
String: String
},
id: String,
val: String
},
clerk:
{
id: String,
val: String
}
},
bettor:
{
id: String,
val: String
},
code: String,
amount: 0,
locationAddressOrBettorInfo: String
},
availableAmount: 0,
allPrizesAwarded: False
},
globalCodePotInfo:
{
isActive: False,
isDrawn: True,
winner:
{
roundId: String,
drawnAtUtc: 0001-01-01,
slipId: String,
betId: String,
code: String,
amount: 0,
origin:
{
application:
{
name: String,
version: String
},
ip: String,
organization:
{
data:
{
String: String
},
id: String,
val: String
},
region:
{
id: String,
val: String
},
locationGroup:
{
id: String,
val: String
},
location:
{
data:
{
String: String
},
id: String,
val: String
},
device:
{
data:
{
String: String
},
id: String,
val: String
},
clerk:
{
id: String,
val: String
}
},
bettor:
{
id: String,
val: String
},
locationAddressOrBettorInfo: String
},
inertCode: String,
accumulation: 0
},
progress:
{
stage: 0,
step: 0,
steps: 0,
utcTimestamp: 0001-01-01
},
isLocked: False,
isCalculated: False
},
lastJackpot5Info:
{
isHit: False,
amountAccumulated: 0,
amountAwarded: 0,
nrOfWinners: 0,
jackPot5Winners:
[
{
betId: String,
nrOfCombinations: 0,
winningsAmount: 0,
origin:
{
application:
{
name: String,
version: String
},
ip: String,
organization:
{
data:
{
String: String
},
id: String,
val: String
},
region:
{
id: String,
val: String
},
locationGroup:
{
id: String,
val: String
},
location:
{
data:
{
String: String
},
id: String,
val: String
},
device:
{
data:
{
String: String
},
id: String,
val: String
},
clerk:
{
id: String,
val: String
}
},
bettor:
{
id: String,
val: String
},
payload:
{
String: String
}
}
]
},
superWinInfo:
{
isActive: False,
winner:
{
isDrawn: False,
drawnAtUtc: 0001-01-01,
roundId: String,
betId: String,
slipId: String,
origin:
{
application:
{
name: String,
version: String
},
ip: String,
organization:
{
data:
{
String: String
},
id: String,
val: String
},
region:
{
id: String,
val: String
},
locationGroup:
{
id: String,
val: String
},
location:
{
data:
{
String: String
},
id: String,
val: String
},
device:
{
data:
{
String: String
},
id: String,
val: String
},
clerk:
{
id: String,
val: String
}
},
bettor:
{
id: String,
val: String
},
code: String,
amount: 0,
locationAddressOrBettorInfo: String
},
availableAmount: 0,
allPrizesAwarded: False
},
globalCodePotInfo:
{
isActive: False,
isDrawn: True,
winner:
{
roundId: String,
drawnAtUtc: 0001-01-01,
slipId: String,
betId: String,
code: String,
amount: 0,
origin:
{
application:
{
name: String,
version: String
},
ip: String,
organization:
{
data:
{
String: String
},
id: String,
val: String
},
region:
{
id: String,
val: String
},
locationGroup:
{
id: String,
val: String
},
location:
{
data:
{
String: String
},
id: String,
val: String
},
device:
{
data:
{
String: String
},
id: String,
val: String
},
clerk:
{
id: String,
val: String
}
},
bettor:
{
id: String,
val: String
},
locationAddressOrBettorInfo: String
},
inertCode: String,
accumulation: 0
}
}