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 .other suffix or ?format=other

HTTP + OTHER

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: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"id":"String","round":{"id":"String","createdAt":"0001-01-01T00:00:00.0000000Z","updatedAt":"0001-01-01T00:00:00.0000000Z","status":0,"configuration":{"countdownDurationInSeconds":0,"raceDurationInSeconds":0,"resultsDurationInSeconds":0,"rtpStrategy":0},"odds":{"0":{"id":0,"odds":0,"status":0}},"jackpotInfo":{"isGiven":false,"id":"String","slipId":"String","jpId":"String","amount":0,"locationId":"String","locationName":"String","addressLine":"String","amountAccumulated":0},"sequence":"String","progress":{"stage":0,"step":0,"steps":0,"utcTimestamp":"0001-01-01T00:00:00.0000000Z"},"isLocked":false,"isCalculated":false},"lastJackpotInfo":{"isGiven":false,"id":"String","slipId":"String","jpId":"String","amount":0,"locationId":"String","locationName":"String","addressLine":"String","amountAccumulated":0}}