Greyhounds.WebApi

<back to all web services

GetRace

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

namespace Greyhounds.ReadModel
{
    public partial class JackpotInfo
    {
        public virtual bool IsGiven { get; set; }
        public virtual string? Id { get; set; }
        public virtual string? SlipId { get; set; }
        public virtual string? JPId { get; set; }
        public virtual decimal Amount { get; set; }
        public virtual string? LocationId { get; set; }
        public virtual string? LocationName { get; set; }
        public virtual string? AddressLine { get; set; }
        public virtual decimal AmountAccumulated { get; set; }
    }

    public partial class Race
    {
        public virtual string? Id { get; set; }
        public virtual string? Sequence { get; set; }
        public virtual List<Pool>? InputAccumulation { get; set; }
        public virtual List<Pool>? OutputAccumulation { get; set; }
        public virtual RoundOutcome? Outcome { get; set; }
        public virtual JackpotInfo? JackpotInfo { get; set; }
    }

    public partial class RaceOutcomeRecap
    {
        public virtual int Id { get; set; }
        public virtual float Coef { get; set; }
        public virtual int WinCount { get; set; }
        public virtual decimal Win { get; set; }
        public virtual bool IsWin { get; set; }
        public virtual string? Results { get; set; }
    }

    public partial class RoundOutcome
    {
        public virtual List<RaceOutcomeRecap>? RaceOutcomeRecaps { get; set; }
        public virtual decimal Stake { get; set; }
        public virtual decimal Winnings { get; set; }
        public virtual decimal Balance { get; set; }
        public virtual decimal ReturnToPlayer { get; set; }
    }

}

namespace Greyhounds.WebApi.ServiceModel
{
    public partial class GetRace
    {
        public virtual string? Id { get; set; }
    }

}

C# GetRace 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 /rounds/race HTTP/1.1 
Host: grh1.api.bettor.webhop.biz 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<GetRace xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Greyhounds.WebApi.ServiceModel">
  <Id>String</Id>
</GetRace>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<Race xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Greyhounds.ReadModel">
  <Id>String</Id>
  <InputAccumulation>
    <Accumulation.Pool>
      <Amount>0</Amount>
      <Id>0</Id>
      <Name>String</Name>
    </Accumulation.Pool>
  </InputAccumulation>
  <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>
  <Outcome>
    <Balance>0</Balance>
    <RaceOutcomeRecaps>
      <RaceOutcomeRecap>
        <Coef>0</Coef>
        <Id>0</Id>
        <IsWin>false</IsWin>
        <Results>String</Results>
        <Win>0</Win>
        <WinCount>0</WinCount>
      </RaceOutcomeRecap>
    </RaceOutcomeRecaps>
    <ReturnToPlayer>0</ReturnToPlayer>
    <Stake>0</Stake>
    <Winnings>0</Winnings>
  </Outcome>
  <OutputAccumulation>
    <Accumulation.Pool>
      <Amount>0</Amount>
      <Id>0</Id>
      <Name>String</Name>
    </Accumulation.Pool>
  </OutputAccumulation>
  <Sequence>String</Sequence>
</Race>