Greyhounds.WebApi

<back to all web services

GetFeed

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

namespace Greyhounds.ReadModel
{
    public partial class Feed
    {
        public virtual string? Id { get; set; }
        public virtual Round? Round { get; set; }
        public virtual JackpotInfo? LastJackpotInfo { get; set; }
    }

    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 Round
    {
        public virtual string? Id { get; set; }
        public virtual DateTime CreatedAt { get; set; }
        public virtual DateTime UpdatedAt { get; set; }
        public virtual RoundStatus Status { get; set; }
        public virtual RoundConfiguration? Configuration { get; set; }
        public virtual Dictionary<int, Outcome>? Odds { get; set; }
        public virtual JackpotInfo? JackpotInfo { get; set; }
        public virtual string? Sequence { get; set; }
        public virtual RoundProgress? Progress { get; set; }
        public virtual bool IsLocked { get; set; }
        public virtual bool IsCalculated { get; set; }
        public enum RoundStatus
        {
            Pending = 0,
            InProgress = 1,
            Ended = 2,
        }

        public enum Stages
        {
            None = 0,
            Countdown = 1,
            Processing = 2,
            Race = 3,
            Results = 4,
        }

        public partial class RoundProgress
        {
            public virtual Stages Stage { get; set; }
            public virtual int Step { get; set; }
            public virtual int Steps { get; set; }
            public virtual DateTime UTCTimestamp { get; set; }
        }

        public partial class Outcome
        {
            public virtual int Id { get; set; }
            public virtual float Odds { get; set; }
            public virtual OutcomeStatus Status { get; set; }
        }

        public enum OutcomeStatus
        {
            Unknown = 0,
            Lost = 1,
            Won = 2,
            Void = 3,
        }

    }

    public partial class RoundConfiguration
    {
        public virtual int CountdownDurationInSeconds { get; set; }
        public virtual int RaceDurationInSeconds { get; set; }
        public virtual int ResultsDurationInSeconds { get; set; }
        public virtual RTPStrategies RTPStrategy { get; set; }
    }

    public enum RTPStrategies
    {
        RNG = 0,
        Default = 1,
    }

}

namespace Greyhounds.WebApi.ServiceModel
{
    public partial class GetFeed
    {
    }

}

C# 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>