Greyhounds.WebApi

<back to all web services

GetFeed

The following routes are available for this service:
All Verbs/feed
namespace Greyhounds.WebApi.ServiceModel

open System
open System.IO
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations

    type RoundStatus =
        | Pending = 0
        | InProgress = 1
        | Ended = 2

    type RTPStrategies =
        | RNG = 0
        | Default = 1

    [<AllowNullLiteral>]
    type RoundConfiguration() = 
        member val CountdownDurationInSeconds:Int32 = new Int32() with get,set
        member val RaceDurationInSeconds:Int32 = new Int32() with get,set
        member val ResultsDurationInSeconds:Int32 = new Int32() with get,set
        member val RTPStrategy:RTPStrategies = new RTPStrategies() with get,set

    type OutcomeStatus =
        | Unknown = 0
        | Lost = 1
        | Won = 2
        | Void = 3

    [<AllowNullLiteral>]
    type Outcome() = 
        member val Id:Int32 = new Int32() with get,set
        member val Odds:Single = new Single() with get,set
        member val Status:OutcomeStatus = new OutcomeStatus() with get,set

    [<AllowNullLiteral>]
    type JackpotInfo() = 
        member val IsGiven:Boolean = new Boolean() with get,set
        member val Id:String = null with get,set
        member val SlipId:String = null with get,set
        member val JPId:String = null with get,set
        member val Amount:Decimal = new Decimal() with get,set
        member val LocationId:String = null with get,set
        member val LocationName:String = null with get,set
        member val AddressLine:String = null with get,set
        member val AmountAccumulated:Decimal = new Decimal() with get,set

    type Stages =
        | None = 0
        | Countdown = 1
        | Processing = 2
        | Race = 3
        | Results = 4

    [<AllowNullLiteral>]
    type RoundProgress() = 
        member val Stage:Stages = new Stages() with get,set
        member val Step:Int32 = new Int32() with get,set
        member val Steps:Int32 = new Int32() with get,set
        member val UTCTimestamp:DateTime = new DateTime() with get,set

    [<AllowNullLiteral>]
    type Round() = 
        member val Id:String = null with get,set
        member val CreatedAt:DateTime = new DateTime() with get,set
        member val UpdatedAt:DateTime = new DateTime() with get,set
        member val Status:RoundStatus = new RoundStatus() with get,set
        member val Configuration:RoundConfiguration = null with get,set
        member val Odds:Dictionary<Int32, Outcome> = null with get,set
        member val JackpotInfo:JackpotInfo = null with get,set
        member val Sequence:String = null with get,set
        member val Progress:RoundProgress = null with get,set
        member val IsLocked:Boolean = new Boolean() with get,set
        member val IsCalculated:Boolean = new Boolean() with get,set

    [<AllowNullLiteral>]
    type Feed() = 
        member val Id:String = null with get,set
        member val Round:Round = null with get,set
        member val LastJackpotInfo:JackpotInfo = null with get,set

    [<AllowNullLiteral>]
    type GetFeed() = 
        class end

F# GetFeed DTOs

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

HTTP + 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>