Greyhounds.WebApi

<back to all web services

GetOdds

The following routes are available for this service:
All Verbs/feed/odds
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

Namespace Global

    Namespace Greyhounds.ReadModel

        Public Partial Class AvailableRounds
            Public Overridable Property Id As String
            Public Overridable Property Rounds As List(Of Round)

            Public Partial Class Round
                Public Overridable Property Id As String
                Public Overridable Property CreatedAt As Date
                Public Overridable Property UpdatedAt As Date
                Public Overridable Property Status As RoundStatus
                Public Overridable Property Configuration As RoundConfiguration
                Public Overridable Property Odds As Dictionary(Of Integer, Outcome)
                Public Overridable Property JackpotInfo As JackpotInfo
                Public Overridable Property Sequence As String
                Public Overridable Property Progress As RoundProgress
                Public Overridable Property IsLocked As Boolean
                Public Overridable Property IsCalculated As Boolean

                Public Enum RoundStatus
                    Pending = 0
                    InProgress = 1
                    Ended = 2
                End Enum

                Public Enum Stages
                    None = 0
                    Countdown = 1
                    Processing = 2
                    Race = 3
                    Results = 4
                End Enum

                Public Partial Class RoundProgress
                    Public Overridable Property Stage As Stages
                    Public Overridable Property [Step] As Integer
                    Public Overridable Property Steps As Integer
                    Public Overridable Property UTCTimestamp As Date
                End Class

                Public Partial Class Outcome
                    Public Overridable Property Id As Integer
                    Public Overridable Property Odds As Single
                    Public Overridable Property Status As OutcomeStatus
                End Class

                Public Enum OutcomeStatus
                    Unknown = 0
                    Lost = 1
                    Won = 2
                    Void = 3
                End Enum
            End Class
        End Class

        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 Round
            Public Overridable Property Id As String
            Public Overridable Property CreatedAt As Date
            Public Overridable Property UpdatedAt As Date
            Public Overridable Property Status As RoundStatus
            Public Overridable Property Configuration As RoundConfiguration
            Public Overridable Property Odds As Dictionary(Of Integer, Outcome)
            Public Overridable Property JackpotInfo As JackpotInfo
            Public Overridable Property Sequence As String
            Public Overridable Property Progress As RoundProgress
            Public Overridable Property IsLocked As Boolean
            Public Overridable Property IsCalculated As Boolean

            Public Enum RoundStatus
                Pending = 0
                InProgress = 1
                Ended = 2
            End Enum

            Public Enum Stages
                None = 0
                Countdown = 1
                Processing = 2
                Race = 3
                Results = 4
            End Enum

            Public Partial Class RoundProgress
                Public Overridable Property Stage As Stages
                Public Overridable Property [Step] As Integer
                Public Overridable Property Steps As Integer
                Public Overridable Property UTCTimestamp As Date
            End Class

            Public Partial Class Outcome
                Public Overridable Property Id As Integer
                Public Overridable Property Odds As Single
                Public Overridable Property Status As OutcomeStatus
            End Class

            Public Enum OutcomeStatus
                Unknown = 0
                Lost = 1
                Won = 2
                Void = 3
            End Enum
        End Class

        Public Partial Class RoundConfiguration
            Public Overridable Property CountdownDurationInSeconds As Integer
            Public Overridable Property RaceDurationInSeconds As Integer
            Public Overridable Property ResultsDurationInSeconds As Integer
            Public Overridable Property RTPStrategy As RTPStrategies
        End Class

        Public Enum RTPStrategies
            RNG = 0
            [Default] = 1
        End Enum
    End Namespace

    Namespace Greyhounds.WebApi.ServiceModel

        Public Partial Class GetOdds
        End Class
    End Namespace
End Namespace

VB.NET GetOdds DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

POST /feed/odds HTTP/1.1 
Host: grh1.api.bettor.webhop.biz 
Accept: application/json
Content-Type: application/json
Content-Length: length

{}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"id":"String","rounds":[{"id":"String","odds":[{"id":0,"val":0}]}]}