| All Verbs | /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 lastJackpotInfo:JackpotInfo
required public init(){}
}
public class Round : Codable
{
public var id:String
public var createdAt:Date
public var updatedAt:Date
public var status:RoundStatus
public var configuration:RoundConfiguration
public var odds:[Int:Outcome]
public var jackpotInfo:JackpotInfo
public var sequence:String
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 countdownDurationInSeconds:Int
public var raceDurationInSeconds:Int
public var resultsDurationInSeconds:Int
public var rtpStrategy:RTPStrategies
required public init(){}
}
public enum RTPStrategies : Int, Codable
{
case RNG = 0
case Default = 1
}
public class Outcome : Codable
{
public var id:Int
public var odds:Float
public var status:OutcomeStatus
required public init(){}
}
public enum OutcomeStatus : Int, Codable
{
case Unknown = 0
case Lost = 1
case Won = 2
case Void = 3
}
public class JackpotInfo : Codable
{
public var isGiven:Bool
public var id:String
public var slipId:String
public var jpId:String
public var amount:Double
public var locationId:String
public var locationName:String
public var addressLine:String
public var amountAccumulated:Double
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 Race = 3
case Results = 4
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /feed HTTP/1.1
Host: grh1.api.bettor.webhop.biz
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<GetFeed xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Greyhounds.WebApi.ServiceModel" />
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<Feed xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Greyhounds.ReadModel">
<Id>String</Id>
<LastJackpotInfo>
<AddressLine>String</AddressLine>
<Amount>0</Amount>
<AmountAccumulated>0</AmountAccumulated>
<Id>String</Id>
<IsGiven>false</IsGiven>
<JPId>String</JPId>
<LocationId>String</LocationId>
<LocationName>String</LocationName>
<SlipId>String</SlipId>
</LastJackpotInfo>
<Round>
<Configuration>
<CountdownDurationInSeconds>0</CountdownDurationInSeconds>
<RTPStrategy>RNG</RTPStrategy>
<RaceDurationInSeconds>0</RaceDurationInSeconds>
<ResultsDurationInSeconds>0</ResultsDurationInSeconds>
</Configuration>
<CreatedAt>0001-01-01T00:00:00</CreatedAt>
<Id>String</Id>
<IsCalculated>false</IsCalculated>
<IsLocked>false</IsLocked>
<JackpotInfo>
<AddressLine>String</AddressLine>
<Amount>0</Amount>
<AmountAccumulated>0</AmountAccumulated>
<Id>String</Id>
<IsGiven>false</IsGiven>
<JPId>String</JPId>
<LocationId>String</LocationId>
<LocationName>String</LocationName>
<SlipId>String</SlipId>
</JackpotInfo>
<Odds xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:KeyValueOfintRound.OutcomeBB7LCH9U>
<d3p1:Key>0</d3p1:Key>
<d3p1:Value>
<Id>0</Id>
<Odds>0</Odds>
<Status>Unknown</Status>
</d3p1:Value>
</d3p1:KeyValueOfintRound.OutcomeBB7LCH9U>
</Odds>
<Progress>
<Stage>None</Stage>
<Step>0</Step>
<Steps>0</Steps>
<UTCTimestamp>0001-01-01T00:00:00</UTCTimestamp>
</Progress>
<Sequence>String</Sequence>
<Status>Pending</Status>
<UpdatedAt>0001-01-01T00:00:00</UpdatedAt>
</Round>
</Feed>