| 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
{
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
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/jsv
Content-Type: text/jsv
Content-Length: length
{
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
id: String,
round:
{
id: String,
createdAt: 0001-01-01,
updatedAt: 0001-01-01,
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-01
},
isLocked: False,
isCalculated: False
},
lastJackpotInfo:
{
isGiven: False,
id: String,
slipId: String,
jpId: String,
amount: 0,
locationId: String,
locationName: String,
addressLine: String,
amountAccumulated: 0
}
}