Six4Win.WebApi

<back to all web services

GetDraw

The following routes are available for this service:
All Verbs/qry/rounds/draw
import Foundation
import ServiceStack

public class GetDraw : Codable
{
    public var id:String

    required public init(){}
}

public class Draw : Codable
{
    public var id:String
    public var sequence:String
    public var inputAccumulation:[Pool]
    public var outputAccumulation:[Pool]
    public var outcome:RoundOutcome

    required public init(){}
}

public class Pool : Codable
{
    public var id:Int
    public var name:String
    public var coefficient:Double
    public var rtp:Double
    public var threshold:Double
    public var balance:Double
    public var rrtp:Double
    public var rBalance:Double

    required public init(){}
}

public class RoundOutcome : Codable
{
    public var draw:[DrawItem]
    public var customBetOutcomes:[CustomBetOutcome]
    public var lcpWinners:[WinnerByCode]
    public var superWinInfo:SuperWinInfo
    public var jackpot5Info:Jackpot5Info
    public var globalCodePotInfo:GlobalCodePotInfo
    public var stake:Double
    public var betCount:Int
    public var winnings:Double
    public var balance:Double
    public var returnToPlayer:Double
    public var winCount:Int
    public var slipWinCount:Int
    public var winCountPct:Float
    public var slipCount:Int
    public var unitBetCount:Int

    required public init(){}
}

public class DrawItem : Codable
{
    public var ordinal:Int
    public var number:Int
    public var coefficient:Float
    public var isDoubleTriple:Bool
    public var constitutesJackpot:Bool
    public var hits:Int
    public var win:Double

    required public init(){}
}

public class CustomBetOutcome : Codable
{
    public var type:CustomBetType
    public var coef:Float
    public var winCount:Int
    public var win:Double
    public var isWin:Bool
    public var results:String

    required public init(){}
}

public enum CustomBetType : Int, Codable
{
    case FirstNumberOdd = 4
    case FirstNumberEven = 5
    case FirstNumberLessThan24_5 = 6
    case FirstNumberGreaterThan24_5 = 7
    case SumOfFirstFiveLessThan122_5 = 8
    case SumOfFirstFiveGreaterThan122_5 = 9
    case FirstColor1 = 10
    case FirstColor2 = 11
    case FirstColor3 = 12
    case FirstColor4 = 13
    case FirstColor5 = 14
    case FirstColor6 = 15
    case FirstColor7 = 16
    case FirstColor8 = 17
    case MoreOddNumbers = 18
    case MoreEvenNumbers = 19
}

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 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 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 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(){}
}


Swift GetDraw 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/rounds/draw HTTP/1.1 
Host: s4w2.api.bettor.cc 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

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

{
	id: String,
	sequence: String,
	inputAccumulation: 
	[
		{
			id: 0,
			name: String,
			amount: 0,
			reserveAmount: 0
		}
	],
	outputAccumulation: 
	[
		{
			id: 0,
			name: String,
			amount: 0,
			reserveAmount: 0
		}
	],
	outcome: 
	{
		draw: 
		[
			{
				ordinal: 0,
				number: 0,
				coefficient: 0,
				isDoubleTriple: False,
				constitutesJackpot: False,
				hits: 0,
				win: 0
			}
		],
		customBetOutcomes: 
		[
			{
				type: 4,
				coef: 0,
				winCount: 0,
				win: 0,
				isWin: False,
				results: String
			}
		],
		lcpWinners: 
		[
			{
				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
			}
		],
		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
		},
		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
					}
				}
			]
		},
		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
		},
		stake: 0,
		betCount: 0,
		winnings: 0,
		balance: 0,
		returnToPlayer: 0,
		winCount: 0,
		slipWinCount: 0,
		winCountPct: 0,
		slipCount: 0,
		unitBetCount: 0
	}
}