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

{"id":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
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}}