Greyhounds.WebApi

<back to all web services

GetRace

The following routes are available for this service:
All Verbs/rounds/race
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports Greyhounds.WebApi.ServiceModel
Imports Greyhounds.ReadModel
Imports Greyhounds.ReadModel.BackOffice

Namespace Global

    Namespace Greyhounds.ReadModel

        Public Partial Class JackpotInfo
            Public Overridable Property IsGiven As Boolean
            Public Overridable Property Id As String
            Public Overridable Property SlipId As String
            Public Overridable Property JPId As String
            Public Overridable Property Amount As Decimal
            Public Overridable Property LocationId As String
            Public Overridable Property LocationName As String
            Public Overridable Property AddressLine As String
            Public Overridable Property AmountAccumulated As Decimal
        End Class

        Public Partial Class Race
            Public Overridable Property Id As String
            Public Overridable Property Sequence As String
            Public Overridable Property InputAccumulation As List(Of Pool)
            Public Overridable Property OutputAccumulation As List(Of Pool)
            Public Overridable Property Outcome As RoundOutcome
            Public Overridable Property JackpotInfo As JackpotInfo
        End Class

        Public Partial Class RaceOutcomeRecap
            Public Overridable Property Id As Integer
            Public Overridable Property Coef As Single
            Public Overridable Property WinCount As Integer
            Public Overridable Property Win As Decimal
            Public Overridable Property IsWin As Boolean
            Public Overridable Property Results As String
        End Class

        Public Partial Class RoundOutcome
            Public Overridable Property RaceOutcomeRecaps As List(Of RaceOutcomeRecap)
            Public Overridable Property Stake As Decimal
            Public Overridable Property Winnings As Decimal
            Public Overridable Property Balance As Decimal
            Public Overridable Property ReturnToPlayer As Decimal
        End Class
    End Namespace

    Namespace Greyhounds.WebApi.ServiceModel

        Public Partial Class GetRace
            Public Overridable Property Id As String
        End Class
    End Namespace
End Namespace

VB.NET GetRace DTOs

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

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /rounds/race HTTP/1.1 
Host: grh1.api.bettor.webhop.biz 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

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

{"id":"String","sequence":"String","inputAccumulation":[{"id":0,"name":"String","amount":0}],"outputAccumulation":[{"id":0,"name":"String","amount":0}],"outcome":{"raceOutcomeRecaps":[{"id":0,"coef":0,"winCount":0,"win":0,"isWin":false,"results":"String"}],"stake":0,"winnings":0,"balance":0,"returnToPlayer":0},"jackpotInfo":{"isGiven":false,"id":"String","slipId":"String","jpId":"String","amount":0,"locationId":"String","locationName":"String","addressLine":"String","amountAccumulated":0}}